/* --- START OF FILE frontend/prashna-chart/prashna-styles.css (Yellowish Orange Theme for Prashna) --- */

/* Root colors for easier theme management */
:root {
    --color-primary: #E65100; /* Deep Orange - Main Accent */
    --color-primary-dark: #BF360C; /* Darker Orange for hover/active */
    --color-secondary: #FFB74D; /* Light Orange - Secondary Accent */
    --color-secondary-dark: #FF9800;
    --color-background: #FFF8E1; /* Very Light Cream/Yellow - Main Background */
    --color-surface: #FFFFFF;    /* White - For cards, forms, messages */
    --color-surface-alt: #FFFDE7; /* Slightly off-white for subtle distinctions */
    --color-border: #FFD180; /* Light Orange/Yellow - Borders */
    --color-divider: #FFF59D; /* Very Light Yellow - Dividers, collapsible triggers */
    --color-text-dark: #4E342E;  /* Dark Brown - Headings, strong text */
    --color-text-medium: #6D4C41;/* Medium Brown - Default text */
    --color-text-light: #8D6E63; /* Light Brown - Subtle text, placeholders */
    --color-text-on-primary: #FFFFFF; /* White text on primary color buttons */

    /* Status & Feedback Colors */
    --color-success: #2E7D32; /* Green for "Yes" */
    --color-success-bg: #E8F5E9;
    --color-error: #C62828;   /* Red for "No" or errors */
    --color-error-bg: #FFEBEE;
    --color-info: #0277BD;    /* Blue for informational messages */
    --color-info-bg: #E1F5FE;

    /* AI Chat Specifics */
    --color-ai-question-bg: #E3F2FD; /* Light blue for user questions */
    --color-ai-question-border: #90CAF9;
}

/* Basic Reset & Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: var(--color-background);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text-medium);
    line-height: 1.6;
    font-size: 20px; /* Increased base font size */
    padding-bottom: 40px;
}

/* Dashboard Layout */
.astrology-dashboard {
    max-width: 1600px;
    margin: 25px auto;
    padding: 25px;
    background-color: var(--color-surface-alt);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
}

.dashboard-container {
    display: flex;
    gap: 35px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.left-panel {
    flex: 1;
    min-width: 380px;
    max-width: 480px; /* Adjusted max-width slightly for balance with increased font */
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.left-panel > .initial-question-section,
.left-panel > #loadingIndicator,
.left-panel > #fulfillmentResult,
.left-panel > #chartContainer,
.left-panel > #suggestedQuestionsSection,
.left-panel > #errorMessage {
    margin-bottom: 0;
}


.right-panel {
    flex: 2.5;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 110px - var(--agbd-nav-h, 0px)); /* Adjusted slightly for overall balance */
}
.chart-section.ai-analysis {
    display: flex;
    flex-direction: column;
    height: 100%;
}


/* Headings */
h1 {
    color: var(--color-primary);
    font-size: 28px; /* Increased */
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    letter-spacing: 0.5px;
}

.chart-section h2, .ai-analysis h2, .initial-question-section h2 {
    color: var(--color-text-dark);
    font-size: 22px; /* Increased */
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}
.initial-question-section h2 {
    text-align: center;
    color: var(--color-primary);
}


/* Initial Prashna Question Section */
.initial-question-section {
    background: var(--color-surface);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    border: 1px solid var(--color-border);
}

.form-section {
    margin-bottom: 18px;
}
.form-section h3 {
    color: var(--color-text-dark);
    font-size: 18px; /* Increased */
    font-weight: 600;
    margin-bottom: 8px;
}

#firstPrashnaQuestion {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 16px; /* Increased */
    min-height: 80px;
    color: var(--color-text-medium);
    background-color: var(--color-surface);
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#firstPrashnaQuestion::placeholder {
    color: var(--color-text-light);
    opacity: 0.8;
}
#firstPrashnaQuestion:focus {
     outline: none;
     border-color: var(--color-primary);
     box-shadow: 0 0 0 3px rgba(var(--color-primary, #E65100), 0.15);
}

/* Buttons */
.generate-btn {
    background: var(--color-primary);
    color: var(--color-text-on-primary);
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 17px; /* Increased */
    font-weight: 600;
    width: 100%;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.generate-btn:hover:not(:disabled) {
    background: var(--color-primary-dark);
    box-shadow: 0 2px 8px rgba(var(--color-primary, #E65100), 0.3);
    transform: translateY(-1px);
}
.generate-btn:active:not(:disabled) {
    transform: translateY(0px);
    box-shadow: 0 1px 4px rgba(var(--color-primary, #E65100), 0.2);
}
.generate-btn:disabled {
    background-color: #BDBDBD;
    color: #757575;
    cursor: not-allowed;
    opacity: 0.8;
}
.generate-btn.small {
    padding: 9px 18px;
    font-size: 15px; /* Increased */
    width: auto;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

/* Loading Indicator */
#loadingIndicator {
    text-align: center;
    padding: 25px;
    color: var(--color-text-medium);
}
.spinner {
    border: 5px solid rgba(var(--color-primary, #E65100), 0.2);
    border-top: 5px solid var(--color-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 12px;
}
.spinner.small {
    width: 24px;
    height: 24px;
    border-width: 3px;
    margin-bottom: 8px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fulfillment Result Display */
#fulfillmentResult {
    padding: 18px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid transparent;
    font-weight: 500;
    background-color: var(--color-surface);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
#fulfillmentResult h3 {
    margin: 0;
    font-size: 19px; /* Increased */
    color: var(--color-text-dark);
}
#fulfillmentResult #fulfillmentStatusText {
    font-weight: bold;
    font-size: 1.1em; /* Kept relative, will scale with parent */
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-left: 8px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    color: var(--color-text-medium);
}

/* Fulfillment Percentage Text Styles */
#fulfillmentStatusText.status-high-chance {
    color: #ffffff;
    background-color: #2E7D32;
    border-color: #1B5E20;
}
#fulfillmentStatusText.status-good-chance {
    color: #ffffff;
    background-color: #4CAF50;
    border-color: #388E3C;
}
#fulfillmentStatusText.status-moderate-chance {
    color: var(--color-text-dark);
    background-color: #FFF59D;
    border-color: #FBC02D;
}
#fulfillmentStatusText.status-some-challenges {
    color: #ffffff;
    background-color: #FF9800;
    border-color: #F57C00;
}
#fulfillmentStatusText.status-low-chance {
    color: #ffffff;
    background-color: #C62828;
    border-color: #B71C1C;
}
#fulfillmentResult #fulfillmentStatusText.status-yes {
    color: var(--color-success);
    background-color: var(--color-success-bg);
    border: 1px solid var(--color-success);
}
#fulfillmentResult #fulfillmentStatusText.status-no {
    color: var(--color-error);
    background-color: var(--color-error-bg);
    border: 1px solid var(--color-error);
}
#fulfillmentResult #fulfillmentStatusText.status-undetermined {
    color: var(--color-text-medium);
    background-color: #e0e0e0;
    border: 1px solid #bdbdbd;
}


/* Chart Display Area */
#chartContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chart-section {
    background: var(--color-surface);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    border: 1px solid var(--color-border);
}
.chart-display {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    padding: 10px;
}
.chart-display svg {
    max-width: 100%;
    height: auto;
    display: block;
}
#chartRotationInfo {
    text-align: center;
    font-size: 14px; /* Increased */
    color: var(--color-text-light);
    margin-top: 10px;
    padding: 6px 10px;
    background-color: var(--color-divider);
    border-radius: 4px;
    border: 1px dashed var(--color-border);
}

/* Error Message */
#errorMessage {
    color: var(--color-error);
    padding: 15px;
    background: var(--color-error-bg);
    border: 1px solid var(--color-error);
    border-left-width: 5px;
    border-radius: 4px;
    font-size: 16px; /* Increased */
    box-shadow: 0 2px 5px rgba(var(--color-error), 0.1);
}

/* AI Chat Styles */
.language-tabs {
    display: flex;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--color-border);
}
.language-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px; /* Increased */
    color: var(--color-text-light);
    outline: none;
    transition: color 0.2s ease, border-bottom-color 0.2s ease, background-color 0.2s ease;
}
.language-tab:hover:not(.active) {
    color: var(--color-text-medium);
    background-color: rgba(var(--color-primary, #E65100), 0.05);
}
.language-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

.ai-chat-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    flex-grow: 1;
    overflow: hidden;
}
.ai-response {
    background: var(--color-surface-alt);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex-grow: 1;
    max-height: calc(100% - 160px); /* Adjusted for potentially larger input/quick questions */
    min-height: 350px;
}

.ai-message {
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.07);
    font-size: 20px; /* Increased */
    line-height: 1.6;
    word-break: break-word;
    background-color: var(--color-surface);
    flex-shrink: 0;
}
.ai-message.ai-intro {
    background: var(--color-info-bg);
    border-left: 4px solid var(--color-info);
    color: var(--color-text-dark);
    box-shadow: none;
}
.ai-message.ai-intro p, .ai-message.ai-intro ul { margin-bottom: 0.5em; }
.ai-message.ai-intro ul { padding-left: 20px; }
.ai-message.ai-intro li { margin-bottom: 0.3em; }

.ai-message.ai-question, .ai-message.ai-question-hindi {
    background: var(--color-ai-question-bg);
    border-left: 4px solid var(--color-ai-question-border);
    color: var(--color-text-dark);
    align-self: flex-end;
    max-width: 80%;
    margin-left: auto;
}
.ai-message.ai-error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
    border-left: 4px solid var(--color-error);
}

.ai-message h3, .ai-message h4 {
    color: var(--color-primary);
    margin-top: 1em; margin-bottom: 0.5em;
    font-size: 1.2em; /* Adjusted relative size */
    font-weight: 600;
    padding-bottom: 0.3em; border-bottom: 1px dashed var(--color-border);
}
.ai-message h3:first-child, .ai-message h4:first-child { margin-top: 0; }
.ai-message ul { list-style-type: disc; padding-left: 25px; margin: 0.8em 0; }
.ai-message li { margin-bottom: 0.4em; }
.ai-message p { margin: 0.8em 0; }
.ai-message p:first-child { margin-top: 0; }
.ai-message p:last-child { margin-bottom: 0; }
.ai-message strong { font-weight: 600; color: var(--color-text-dark); }

.ai-message table {
    width: 100%; border-collapse: collapse; margin: 1em 0;
    overflow: auto; display: block; max-width: 100%; font-size: 0.98em; /* Slightly increased */
}
.ai-message table th, .ai-message table td {
    border: 1px solid var(--color-border); padding: 10px; text-align: left;
}
.ai-message table th { background-color: var(--color-divider); color: var(--color-text-dark); font-weight: 600; }

.ai-message pre {
    background-color: #2d2d2d; color: #f0f0f0;
    border-radius: 6px; padding: 15px; overflow: auto;
    max-width: 100%; margin: 1em 0; white-space: pre-wrap; word-wrap: break-word;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace; font-size: 0.95em; /* Slightly increased */
    border: 1px solid #444;
}
.ai-message code {
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    color: var(--color-primary-dark);
    background-color: rgba(var(--color-primary, #E65100), 0.1);
    padding: 3px 6px; border-radius: 4px; word-break: break-all; font-size: 0.95em; /* Slightly increased */
}
.ai-message pre code {
    background-color: transparent; color: inherit; padding: 0; border-radius: 0;
}

.ai-input-container {
    display: flex; gap: 12px; align-items: center; flex-shrink: 0;
    padding-top: 15px;
}
.ai-input-container input[type="text"] {
    flex: 1; padding: 12px 15px; border: 1px solid var(--color-border);
    border-radius: 6px; font-size: 16px; /* Increased */
    color: var(--color-text-medium); background-color: var(--color-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ai-input-container input[type="text"]::placeholder {
    color: var(--color-text-light); opacity: 0.8;
}
.ai-input-container input[type="text"]:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary, #E65100), 0.15);
}
.ai-input-container input[type="text"]:disabled {
    background-color: #E0E0E0; cursor: not-allowed;
    border-color: #BDBDBD;
}

.quick-questions {
    margin-top: 15px; display: flex; align-items: center;
    flex-wrap: wrap; gap: 10px; flex-shrink: 0;
    padding-bottom: 5px;
}
.quick-questions p {
    margin: 0 8px 0 0; color: var(--color-text-medium);
    font-size: 15px; /* Increased */
    font-weight: 500;
}
.quick-question {
    display: inline-block; background: var(--color-surface);
    padding: 7px 14px; border-radius: 18px;
    cursor: pointer; transition: all 0.2s ease;
    font-size: 14px; /* Increased */
    user-select: none; color: var(--color-primary);
    border: 1px solid var(--color-secondary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.quick-question:hover:not([style*="pointer-events: none"]) {
    background: var(--color-secondary); color: var(--color-text-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(var(--color-primary, #E65100), 0.15);
}
.quick-question[style*="pointer-events: none"] {
    opacity: 0.6; cursor: not-allowed; transform: none;
    background-color: #EEEEEE; border-color: #DDDDDD; color: #9E9E9E;
}

.ai-collapsible-item {
    background: var(--color-surface); border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07); border: 1px solid var(--color-border);
    display: flex; flex-direction: column;
    transition: box-shadow 0.2s ease;
    overflow: hidden;
    width: 100%;
    flex-shrink: 0;
}
.ai-collapsible-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.collapsible-trigger {
    background-color: var(--color-divider); color: var(--color-text-dark);
    cursor: pointer; padding: 14px 18px; width: 100%; border: none; text-align: left;
    outline: none; font-size: 17px; /* Increased */
    font-weight: 600;
    display: flex; justify-content: space-between; align-items: center;
    transition: background-color 0.2s ease; user-select: none;
}
.ai-collapsible-item.active .collapsible-trigger {
    background-color: #FFF176;
    border-bottom: 1px solid var(--color-border);
}
.collapsible-trigger:hover { background-color: #FFFDE7; }
.collapsible-trigger .icon {
    font-weight: bold; margin-left: 12px; flex-shrink: 0; width: 1em;
    text-align: center; transition: transform 0.3s ease-out;
    font-size: 1.3em; line-height: 1; color: var(--color-text-light);
}
.collapsible-content {
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.25, 0.1, 0.25, 1), padding 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    overflow: hidden;
    padding: 0 18px;
    background-color: var(--color-surface);
}
.ai-collapsible-item.active .collapsible-content {
    max-height: 3000px;
    padding-top: 18px;
    padding-bottom: 18px;
}
.ai-collapsible-item.active .collapsible-trigger .icon { transform: rotate(180deg); }

.ai-collapsible-item.ai-initial-overview .collapsible-trigger {
     background-color: #FFF9C4;
     color: var(--color-text-dark);
     border-bottom: 1px dashed var(--color-secondary);
}
.ai-collapsible-item.ai-initial-overview.active .collapsible-trigger {
     background-color: #FFF59D;
}
.ai-collapsible-item.ai-initial-overview .collapsible-content {
    background-color: var(--color-surface-alt);
}

#suggestedQuestionsSection {
    background-color: #FEF9E7;
    border: 1px solid var(--color-secondary-dark);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(var(--color-primary, #E65100), 0.1);
}

#suggestedQuestionsSection h2 {
    color: var(--color-primary-dark);
    font-size: 20px; /* Increased */
    font-weight: 600;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: center;
}

#suggestedQuestionsButtons {
    justify-content: flex-start;
    padding-top: 5px;
    padding-bottom: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
#suggestedQuestionsButtons .quick-question {
    flex-grow: 1;
    min-width: 150px;
    text-align: center;
}


#suggestedQuestionsSection > p {
    font-size: 0.9em; /* Increased relative size */
    color: var(--color-text-medium);
    text-align: center;
    margin-top: 15px;
    padding: 0 10px;
}

@media (max-width: 1200px) {
    .astrology-dashboard { padding: 20px; }
    .dashboard-container { flex-direction: column; gap: 25px; }
    .left-panel, .right-panel {
        min-width: 100%;
        max-width: 100%;
        height: auto;
    }
    .right-panel { margin-top: 0; }
    .ai-response {
        max-height: 60vh;
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    body { font-size: 16px; } /* Responsive base font */
    h1 { font-size: 24px; margin-bottom: 20px; } /* Adjusted */
    .astrology-dashboard { padding: 15px; margin: 15px auto; }
    .chart-section h2, .ai-analysis h2, .initial-question-section h2, #suggestedQuestionsSection h2 { font-size: 20px; } /* Adjusted */
    .initial-question-section { padding: 20px; }
    #firstPrashnaQuestion { font-size: 15px; min-height: 70px; } /* Adjusted */
    .generate-btn { padding: 12px 20px; font-size: 16px; } /* Adjusted */
    .generate-btn.small { padding: 9px 15px; font-size: 14px; } /* Adjusted */
    #fulfillmentResult h3 { font-size: 18px; } /* Adjusted */
    .chart-display { min-height: 280px; }

    .right-panel { height: auto; }
    .ai-response {
        max-height: 55vh; /* Adjusted */
        min-height: 250px;
        padding: 12px;
        gap: 10px;
    }
    .ai-message { padding: 10px 12px; font-size: 15px; } /* Adjusted */
    .ai-message.ai-question, .ai-message.ai-question-hindi { max-width: 85%; }
    .ai-input-container { flex-direction: column; gap: 10px; }
    .ai-input-container input[type="text"] { font-size: 15px; padding: 10px 12px; } /* Adjusted */
    .quick-questions { gap: 8px; margin-top: 12px; }
    .quick-question { padding: 6px 12px; font-size: 13px; } /* Adjusted */
    .collapsible-trigger { padding: 12px 15px; font-size: 16px; } /* Adjusted */
    .collapsible-content, .ai-collapsible-item.active .collapsible-content { padding: 15px; }
    #suggestedQuestionsSection { padding: 15px; }
    #suggestedQuestionsSection > p { font-size: 0.85em; } /* Adjusted */
     #suggestedQuestionsButtons .quick-question {
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    body { font-size: 15px; } /* Responsive base font */
    h1 { font-size: 22px; } /* Adjusted */
    .astrology-dashboard { padding: 10px; margin: 10px auto; }
    .chart-section h2, .ai-analysis h2, .initial-question-section h2, #suggestedQuestionsSection h2 { font-size: 18px; margin-bottom: 12px; padding-bottom: 8px; } /* Adjusted */
    .initial-question-section { padding: 15px; }
    .generate-btn { padding: 10px 15px; font-size: 15px; } /* Adjusted */
    .generate-btn.small { padding: 8px 12px; font-size: 13px; } /* Adjusted */
    #fulfillmentResult h3 { font-size: 17px; } /* Adjusted */
    .quick-questions p { font-size: 14px; } /* Adjusted */
    .quick-question { font-size: 12px; padding: 5px 10px; } /* Adjusted */
    .language-tab { font-size: 15px; padding: 7px 12px; } /* Adjusted */
    .collapsible-trigger { font-size: 15px; padding: 10px 12px; } /* Adjusted */
     #suggestedQuestionsButtons .quick-question {
        width: 100%;
        min-width: 0;
        margin-bottom: 8px;
    }
    #suggestedQuestionsButtons {
        flex-direction: column;
        align-items: stretch;
    }
    .ai-response {
        max-height: 50vh; /* Adjusted */
        min-height: 200px;
    }
    #firstPrashnaQuestion, .ai-input-container input[type="text"], .ai-message { font-size: 14px; } /* Further adjustments for smallest screens */
}

.js-no-transition {
    transition: none !important;
}