/**
 * Gemini Meal Analyzer - Healthy Ideas Precise Theme
 * Color palette and design matched exactly to healthyideas.org.in
 */

/* Main Container - Mimics the homepage cards */
#gma-container {
    max-width: 800px;
    margin: 40px auto;
    /* Using the exact card color from your homepage */
    background-color: #1C1E2A; 
    /* Using the soft, complementary border color */
    border: 1px solid #333548; 
    border-radius: 16px; /* Matching your card's border radius */
    padding: 35px;
    font-family: sans-serif;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Headings - Crisp white for main titles */
#gma-container h2, #gma-container h3 {
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#gma-container h3 {
    text-align: left;
    margin-top: 40px;
    border-bottom: 1px solid #333548;
    padding-bottom: 15px;
}

/* Upload Form Styling */
#gma-meal-upload-form {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Custom File Input to match the theme */
#gma-meal-upload-form input[type="file"] {
    color: #A9AEC2; /* Soft secondary text color */
}
#gma-meal-upload-form input[type="file"]::file-selector-button {
    background-color: transparent;
    border: 1px solid #00BFFF; /* Vibrant Cyan accent border */
    border-radius: 8px;
    padding: 10px 20px;
    color: #00BFFF; /* Vibrant Cyan text */
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}
#gma-meal-upload-form input[type="file"]::file-selector-button:hover {
    background-color: #00BFFF;
    color: #0D0F18; /* Dark background color for text on hover */
}

/* Analyze Button - Using the primary Cyan accent */
#gma-meal-upload-form button {
    background-color: #00BFFF;
    color: #0D0F18; /* High contrast text */
    font-weight: bold;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    padding: 14px 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#gma-meal-upload-form button:hover {
    background-color: #4dd2ff; /* A slightly lighter cyan for hover */
    transform: translateY(-2px);
}

/* Loader and Spinner Styling */
#gma-loader {
    text-align: center;
    padding: 20px;
    font-size: 1.2em;
    color: #A9AEC2;
}
#gma-loader p { margin-top: 15px; }
#gma-loader small { color: #6a6c7a; }

.gma-spinner {
    border: 5px solid #333548; /* Soft border color for the track */
    border-top: 5px solid #00BFFF; /* Cyan for the spinner */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: gma-spin 1.5s linear infinite;
    margin: 0 auto;
}
@keyframes gma-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Tables Styling */
#gma-results table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: none;
}

#gma-results th, #gma-results td {
    border: 1px solid #333548; /* Consistent soft border */
    padding: 14px 16px;
    text-align: left;
}

#gma-results th {
    background-color: #2a2d3e; /* Slightly darker header for tables */
    color: #FFFFFF;
    font-weight: 600;
}

#gma-results tbody tr {
    background-color: transparent;
    color: #A9AEC2; /* Soft secondary text for table data */
}

#gma-results tbody tr:nth-of-type(even) {
    background-color: rgba(13, 15, 24, 0.5); /* Use transparent main background for striping */
}

/* Recommendations Table Specifics */
#gma-recommendations-table td:last-child {
    line-height: 1.6;
}
#gma-recommendations-table td {
    color: #A9AEC2;
}

/* Error Cell Styling */
.error-cell {
    background-color: #4d1c1c !important;
    color: #ffbaba;
    font-weight: bold;
    text-align: center !important;
}