/*
 * =========================================
 * Strawberry Brand Style Implementation
 * =========================================
 * This stylesheet defines the visual appearance for the Strawberry
 * Conference Environmental Footprint Calculator, including layout,
 * typography, color scheme, and responsive behavior.
 * =========================================
 */

/* --- Font Import & Universal Box Sizing --- */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

/* --- CSS Variables (Color Palette & Styles) --- */
/*
Design Token Hierarchy (Purpose over Hex):
--------------------------------------------------------------------------
Tiers & Intent
1. Brand (immutable core): strawberry-* tokens should only appear when
    reinforcing identity (primary buttons, hero headers). Avoid using
    raw brand colors for large background fills unless for highlight/CTA.
2. Functional Roles (semantic mappings): color-primary, color-accent,
    color-success, color-danger, color-warning, color-info represent
    meaning (action, positive, negative, caution, informational). Prefer
    these over directly referencing brand hues in components.
3. Text Tokens: text-* ensure WCAG AA contrast. Never use surface tokens
    directly for text; always map through a text-* role.
4. Surfaces: surface-* establish elevation hierarchy (page < panel < section
    < accent/highlight). Keep adjacent surface contrast ΔL >= 4 for clarity.
5. Borders & Shadows: border-* + shadow-* separate layers subtly; rely on a
    single shadow depth per container—do not stack multiple shadows.
6. States: *-hover, *-active, focus-ring reflect interactive affordances.
    Define them only adjacent to their base token.

Usage Rules
• Components reference semantic tokens (color-primary) not brand hexes.
• Introduce new tokens by adding at end of relevant category with comment.
• Never repurpose a token (e.g., color-danger cannot mean warning).
• Prefer "*-subtle" surfaces for inset panels vs lowering opacity of a base.
• Do not create one-off inline colors; extend tokens here instead.

Extension Guidelines
• Dark mode: mirror semantic sets (e.g., color-primary-dark) then swap in a
  media query or data-theme attr—never conditionally override per-component.
• Theming: expose only semantic layer (color-primary, surface-panel, etc.).
• Auditing: grep for '#' in code; any usage outside this block requires review.

Contrast & Accessibility
• Minimum text contrast: 4.5:1 regular, 3:1 large. Validate new tokens.
• Focus rings must be visible against all surfaces (semi-transparent accent).

Do / Don't Examples
✔ Button background: var(--color-primary)
✘ Button background: var(--strawberry-burgundy)
✔ Error alert bg: var(--surface-danger-bg)
✘ Error alert text: var(--surface-danger-bg)

Adding Tokens Checklist
1. Determine semantic category (Brand / Functional / Surface / State).
2. Name with kebab-case, prefix by layer (color-, surface-, text-, border-).
3. Provide a brief usage comment.
4. Check contrast (use a11y tool) & test hover/active clarity.
--------------------------------------------------------------------------
*/
:root {
    /* Brand palette */
    --strawberry-coral: #fc5e58; /* Light accent (use dark text) */
    --strawberry-burgundy: #9B2226; /* Primary brand (use white text) */
    --strawberry-black: #212529;
    --strawberry-white: #FFFFFF;

    /* Neutral scale - warmer tones for clear hierarchy */
    --warm-gray-light: #F8F9FA;
    --warm-gray-medium: #E9ECEF;
    --warm-gray-dark: #6C757D;
    --neutral-300: #CFC4BC;
    --neutral-400: #B8ACA4;
    /* Extended neutrals for subtle depth tiers - warmer progression */
    --neutral-soft-50: #FFFFFF;
    --neutral-soft-100: #FAF8F6;
    --neutral-soft-150: #F5F2EE;
    --neutral-soft-200: #F0EBE6;
    --neutral-soft-250: #EBE4DE;

    /* Functional color roles */
    --color-primary: var(--strawberry-burgundy);
    --color-primary-hover: #821C20;
    --color-primary-active: #6A1519;
    --color-accent: var(--strawberry-coral);
    --color-accent-subtle: #FFE7E5;
    /* Accent modulation for reduced saturation usage */
    --color-accent-tint: #FFD8D6; /* Mid-level tint (unused currently) */
    --color-accent-border: #E84F49; /* Darker coral for borders (unused) */
    /* Harmonized success & danger tones (slightly lighter, warmer for theme cohesion) */
    --color-success: #65A866; /* base success (lighter) */
    --color-success-hover: #509252; /* hover maintains clarity */
    --color-success-active: #437C45; /* active */
    --color-danger: #DD5555; /* base danger (lighter) */
    --color-danger-hover: #C54444; /* hover */
    --color-danger-active: #AA3838; /* active */
    --color-warning: #FFA000;
    --color-info: #1E88E5;
    --color-info-hover: #1565C0;
     /* Action-specific vivid tokens (distinct from semantic success/danger)
         Use only for direct object manipulation (add/remove rows/items). Avoid
         mixing these with status messaging to preserve semantic clarity. */
    --action-add: #2FA866; /* vibrant green add */
    --action-add-hover: #279358;
    --action-add-active: #207C49;
    --action-remove: #E04949; /* vivid remove */
    --action-remove-hover: #C83D3D;
    --action-remove-active: #AD3434;

    /* Text roles - ensuring WCAG AA contrast */
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-on-primary: var(--strawberry-white);
    --text-on-accent: var(--strawberry-black);
    --text-danger: var(--color-danger);
    --text-success: var(--color-success);

    /* Surfaces - warmer hierarchy */
    --surface-page: #FAF8F6; /* Page background (outermost) */
    --surface-panel: #F3EEE8; /* Major container (results pane, primary form groups) */
    --surface-panel-alt: #E9E2DB; /* Nested grouping panels (F&B day sets, travel block) increased contrast */
    --surface-panel-deep: #DFD7CF; /* Deeper nested panel (active accordion body) */
    --surface-panel-soft: #F7F3EF; /* Soft elevated subsection (results inner content) */
    --surface-panel-deep: #DFD7CF; /* Deeper nested panel (inner accordion body) */
    --surface-panel-soft: #F7F3EF; /* Soft elevated section (summary blocks) */
    --surface-section: #FFFFFF; /* High-focus content blocks & input interiors */
    --surface-accent: var(--color-accent-subtle);
    --surface-highlight: #FDD7D4;
    --surface-hover: #F8F6F4;
    --surface-hover-strong: #F0EBE6;
    --surface-row-hover: #F9F7F5;
    --surface-danger-bg: #FDE7E9;
    --surface-success-bg: #E8F5E9;

    /* Borders - standardized neutral tones */
    --border-color: rgba(0,0,0,0.1);
    --border-strong: rgba(0,0,0,0.12);
    --border-soft: rgba(0,0,0,0.1);
    --border-soft-strong: rgba(0,0,0,0.12);

    /* Shadows - three defined levels only */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.10);
    /* Legacy aliases removed - use explicit levels */

    /* Feedback */
    --error-color: var(--color-danger);
    --error-background: var(--surface-danger-bg);

    /* Focus */
    --focus-ring: rgba(252,94,88,0.45);

    /* Inputs */
    --input-border: var(--neutral-300);
    --input-border-hover: var(--neutral-400);
    --input-border-focus: var(--strawberry-coral);
    --input-shadow: var(--shadow-xs);
    --input-shadow-focus: 0 0 0 3px rgba(252,94,88,0.25), var(--shadow-xs);

    /* Radii */
    --radius-pane: 16px;
    --radius-card: 12px;
    --radius-row: 8px;
    --radius-control: 6px;

    /* Accordion spacing */
    --accordion-pad-y: 14px;
    --accordion-pad-x: 22px;
    --accordion-right-pad: 45px;
    --accordion-indicator-width: 4px;
}

/* --- General Body & Typography --- */
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Figtree', sans-serif;
    background-color: var(--surface-page);
    color: var(--text-primary);    
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
}

.input-pane > h1 {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: var(--strawberry-coral);
    color: var(--strawberry-white);
    font-size: 1.2em;
    font-weight: 600;
    padding: 10px 15px;
    margin: 0 0 0 0;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.header-logo {
    height: 24px;
    width: auto;
    flex-shrink: 0;
    .remove-leg:active, .remove-fnb-item:active { background-color: var(--color-danger-active); }
    transform: scale(1.33);
}
.header-title-text {
    #addTravelLeg:active, .add-fnb-item:active { background-color: var(--color-success-active); }
    flex-grow: 1;
    text-align: center;
}

.container {
    flex: 1 1 auto;
    min-height: 0; 
    display: flex;
    max-width: 2400px;
    margin: 10px auto;
    width: calc(100% - 40px);
    padding: 0 20px;
    gap: 15px;
    align-items: flex-start;
}

.input-pane { 
    width: 75%;
    height: 100%;
    overflow-y: auto;
    overflow-x: visible; /* Allow horizontal expansion if needed */
    padding: 0 0 400px 0; /* Increased bottom padding to allow space for expanded dropdowns */
    margin-left: 0;
    position: relative;
}
.results-pane { /* major panel tier */
    width: 25%; 
    height: fit-content; /* Only expand to fit content, not fill container */
    max-height: 100%; /* Don't exceed viewport */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pane);
    background-color: var(--surface-panel);
    box-shadow: var(--shadow-md);
    position: relative;
    margin-right: 0;
    align-self: flex-start; /* Don't stretch to match container height */
}

h2, h3, h4 { color: var(--text-primary); font-weight: 600; letter-spacing: .3px; }
h3 { margin: 0; padding: 0; font-size: 1.2em; font-weight: 600; }
h4 { font-size: 1.1em; margin-bottom: 15px; margin-top: 0; text-align: center; color: var(--text-primary); font-weight: 600; }

/* --- Informational Blocks & Actions --- */
.main-actions-container, .error-messages-container {
    margin-bottom: 15px;
}
.main-actions-container {
    position: relative;
    z-index: 1;
    background-color: var(--surface-panel);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    box-shadow: none;
    padding: 15px;
    margin-top: -1px;
}
.error-messages-container { padding: 15px; background-color: var(--error-background); border: 1px solid var(--error-color); color: var(--error-color); border-radius: var(--radius-row); }
.error-messages-container:empty { display: none; }


/* --- Section Headers & Card Integration --- */
.input-block.conference-details-main-block,
#foodBeveragePerDayContainer,
.travel-section-container {
    margin-bottom: 15px;
}

.section-header {
    background-color: var(--strawberry-coral);
    color: var(--strawberry-white);
    padding: 12px 15px;
    font-size: 1.25em;
    font-weight: 600;
    border: 1px solid var(--strawberry-coral);
    border-bottom: none;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    margin-bottom: 0;
}

.input-block.conference-details-main-block { /* major panel tier */
    margin-top: -1px; /* Joins with header */
    border-radius: 0 0 8px 8px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-top: none;
    background-color: var(--surface-panel);
    box-shadow: none;
    overflow: visible;
}

#foodBeveragePerDayContainer { 
    /* Container for F&B section - wraps header + all day sections */
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    background-color: var(--surface-panel-alt);
    box-shadow: none;
    padding: 0 20px 20px 20px;
    min-height: fit-content;
    height: auto;
    overflow: visible; /* Ensure content can expand beyond container */
}

#foodBeveragePerDayContainer > .section-header {
    background-color: var(--strawberry-coral);
    color: var(--strawberry-white);
    padding: 12px 15px;    
    border: 1px solid var(--strawberry-coral);
    border-bottom: none;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    margin: -1px -20px 20px -20px;
}
/* Travel container uses pure white for high-focus location & hotel inputs */
.travel-section-container {
    padding: 20px 22px 22px 22px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pane);
    background-color: var(--surface-panel-deep); /* darker neutral to separate from parent */
    box-shadow: none;
}
/* The actual travel panel uses #travelSectionMain as its id; apply white panel styling here */
#travelSectionMain {
    background-color: var(--surface-section);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pane);
    box-shadow: none;
}

.travel-section-container > .section-header {
    background-color: var(--strawberry-coral);
    color: var(--strawberry-white);
    border-color: var(--strawberry-coral);
    padding: 12px 15px;
    font-size: 1.2em;
    font-weight: 500;
    margin: -20px -22px 18px -22px;
    border-bottom: none;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.results-pane > .section-header {
    background-color: var(--strawberry-coral);
    color: var(--strawberry-white);
    padding: 10px 15px;
    margin: -15px -15px 15px -15px;
    border: 1px solid var(--strawberry-coral);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-food-section {
    padding: 0;
    margin-top: 0;
    background: transparent; /* Parent wrapper provides accent surface */
    position: relative;
    border: none; /* Remove enclosing border */
    box-shadow: none; /* Remove card shadow to avoid visual grouping box */
    z-index: auto; /* Don't create stacking context, let children manage z-index */
}
.day-food-section.active-wrapper,
.results-section.active-wrapper { position: relative; }
/* Indicator stripe fully removed for F&B and results */
.day-food-section.active-wrapper::before,
.results-section.active-wrapper::before { content: none; }
/* Hover effect handled on header; container has no hover style to reduce visual noise */
.day-food-section .accordion-header {
    position: relative;
    z-index: 1; /* Lower than dropdown wrapper active state (10002) */
}
.day-food-section + .day-food-section {
    margin-top: 12px; /* Space between day sections */
}


/* --- Buttons & Interactive Elements --- */
.action-buttons-header { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    align-items: stretch; 
}
.action-buttons-header > .utility-button {
    flex: 1 1 0;
    min-width: 0;
}
.config-actions-header { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 5px; 
    align-items: center;
    margin-top: 15px;
}

button, .utility-button, .reset-button, .config-button {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-control);
    padding: 8px 12px;
    cursor: pointer;    
    font-size: 1em;
    font-weight: 500;
    font-family: 'Figtree', sans-serif;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    position: relative;
}
button:hover, .utility-button:hover, .reset-button:hover, .config-button:hover { border-color: var(--border-strong); }
button:active, .utility-button:active, .reset-button:active, .config-button:active { transform: translateY(1px); }
button:disabled, .utility-button:disabled, .reset-button:disabled, .config-button:disabled { opacity:.55; cursor: not-allowed; }
button:focus-visible, .utility-button:focus-visible, input:focus, select:focus { 
    outline: none; 
    border-color: var(--strawberry-coral); 
    box-shadow: 0 0 0 3px var(--focus-ring); 
}
.config-button:focus-visible, .utility-button:focus-visible, .reset-button:focus-visible, .custom-select-display:focus-visible, .custom-select-dropdown:focus-visible, .meal-column button:focus-visible {
    outline: none;
    border-color: var(--strawberry-coral);
    box-shadow: 0 0 0 3px rgba(252,94,88,0.35);
}
.config-button:focus-visible { box-shadow: 0 0 0 3px rgba(252, 94, 88, 0.35); }

.utility-button,
#toggleTravelSectionButton {
    background-color: var(--surface-panel-deep);
    color: var(--text-primary);
    border: 1px solid var(--border-soft-strong);
}
.utility-button:hover,
#toggleTravelSectionButton:hover {
    background-color: var(--surface-hover);
    border-color: var(--border-strong);
}
.utility-button:active,
#toggleTravelSectionButton:active {
    background-color: var(--surface-panel-alt);
    color: var(--text-primary);
}

.btn-icon { width: 20px; height: 20px; fill: currentColor; transition: color .18s ease-in-out, fill .18s ease-in-out; }
.utility-button:hover .btn-icon,
#toggleTravelSectionButton:hover .btn-icon,
button:hover .btn-icon { color: var(--color-primary-hover); }
.utility-button:active .btn-icon,
#toggleTravelSectionButton:active .btn-icon,
button:active .btn-icon { color: var(--color-primary-active); }
.btn-icon.hidden { display: none; }

#addTravelLeg, .add-fnb-item { background-color: var(--action-add); color: var(--text-on-primary); transition: background-color .18s ease-in-out; }
#addTravelLeg:hover, .add-fnb-item:hover { background-color: var(--action-add-hover); }
#addTravelLeg:active, .add-fnb-item:active { background-color: var(--action-add-active); }
#addTravelLeg:focus-visible, .add-fnb-item:focus-visible { 
    outline: none; 
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.4); 
    background-color: var(--action-add-hover); 
}
.remove-leg, .remove-fnb-item {
    background-color: var(--action-remove);
    color: var(--text-on-primary);
    padding: 5px;
    width: 20px;
    height: 32px;
    transition: background-color .18s ease-in-out;
}
.remove-leg:hover, .remove-fnb-item:hover { background-color: var(--action-remove-hover); }
.remove-leg:active, .remove-fnb-item:active { background-color: var(--action-remove-active); }
.remove-leg:focus-visible, .remove-fnb-item:focus-visible { 
    outline: none; 
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.4); 
    background-color: var(--action-remove-hover); 
}

.config-button { background-color: var(--warm-gray-medium); color: var(--text-primary); padding: 6px 8px 6px 12px; }
.config-button.active { background-color: var(--color-primary); color: var(--text-on-primary); font-weight: 700; }
.config-name-input { height: 18px; padding: 2px 4px; border: 1px solid var(--strawberry-coral); border-radius: 3px; }
.edit-config-name { background: none; border: none; box-shadow: none; padding: 0; margin-left: 5px; cursor: pointer; opacity: 0.6; display: none; }
.config-button.active .edit-config-name { display: inline-flex; align-items: center; }
.edit-config-name:hover { opacity: 1; }
.edit-config-name svg { width: 16px; height: 16px; fill: currentColor; }

.remove-comparison-button { background-color: var(--warm-gray-dark); color: white; padding: 5px; width: 28px; height: 28px; }
.add-comparison-button { background-color: var(--green-accent); color: white; padding: 5px; width: 28px; height: 28px; font-size: 1.2em; }
.add-comparison-button:hover { background-color: #3f8f43; }
.add-comparison-button:disabled { background-color: var(--warm-gray-dark); cursor: not-allowed; opacity: 0.6; box-shadow: var(--shadow-sm); }

/* --- Inputs & Forms --- */
label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 1em; color: var(--text-primary); }
.column-header-label { font-size: 1.15em; font-weight: 600; margin-bottom: 10px; }
input[list="hotelList"], input[type="number"], input[type="text"], select {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-control);
    width: 100%;
    background-color: var(--strawberry-white);
    font-size: 1em;    
    font-family: 'Figtree', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 38px;
}
    input[list="hotelList"], input[type="number"], input[type="text"], select {
        border: 1px solid var(--input-border);
    }
    input[list="hotelList"]:hover, input[type="number"]:hover, input[type="text"]:hover, select:hover { border-color: var(--input-border-hover); }
    input[list="hotelList"]:focus, input[type="number"]:focus, input[type="text"]:focus, select:focus { border-color: var(--input-border-focus); box-shadow: var(--input-shadow-focus); }

/* Style for dropdown options */
select option {
    padding: 10px;
    background-color: white;
    color: var(--text-primary);
    font-size: 1em;
}

/* Style for dropdown options when selected/focused */
select option:checked,
select option:focus,
select option:hover {
    background-color: var(--strawberry-coral) !important;
    color: white !important;
    font-weight: normal;
}

.short-input-conf-details { width: 70px !important; min-width: 70px !important; flex-grow: 0 !important; flex-shrink: 0 !important; }
.input-error { border-color: var(--error-color) !important; background-color: var(--error-background); }
select:disabled { background-color: var(--warm-gray-medium); cursor: not-allowed; opacity: 0.7; }

/* --- Hotel Filter Layout --- */
.hotel-selection-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 18px 20px 14px 20px;
    background: var(--surface-panel-deep); /* darker neutral to stand out within conference details block while inputs remain white */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pane);
    box-shadow: none;
}
.filter-group-wrapper {
    flex: 1;
    min-width: 260px;
    display: flex;
    gap: 15px;
}
.filter-group-wrapper .filter-group {
    flex: 1;
    background: transparent;
}
.filter-group.hotel-input-group {
    flex: 1;
    min-width: 260px;
}

/* Autocomplete wrapper for custom dropdown */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.input-with-clear { position: relative; display: flex; width: 100%; align-items: center; }
.input-with-clear input { width: 100%; }
.dropdown-toggle-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    padding: 5px 8px;
    line-height: 1;
    transition: color 0.2s;
}
.dropdown-toggle-btn:hover { color: var(--text-primary); }

.clear-input-btn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: none;
    transition: color 0.2s, transform 0.2s;
}
.clear-input-btn:hover { color: var(--text-primary); transform: translateY(-50%) scale(1.1); }

/* Custom autocomplete dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-control) var(--radius-control);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: var(--warm-gray-light);
}

.autocomplete-item.active {
    background-color: var(--strawberry-coral);
    color: white;
}

.autocomplete-no-results {
    padding: 10px;
    color: #999;
    text-align: center;
    font-style: italic;
}

/* --- Custom Select Dropdown Styles --- */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    z-index: 1; /* Normal stacking */
}

.custom-select-wrapper.active {
    z-index: 10002 !important; /* Elevated when dropdown is open, above tooltips and all other elements */
}

.custom-select-display {
    width: 100%;
    padding: 8px 30px 8px 10px;
    border: 1px solid var(--input-border);    
    border-radius: var(--radius-control);
    background-color: var(--strawberry-white);
    font-size: 1em;    
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-display:after {
    content: '▼';
    font-size: 0.7em;
    color: var(--warm-gray-dark);
    margin-left: 10px;
}

.custom-select-display:hover {
    border-color: var(--input-border-hover);
}

.custom-select-display:focus {
    outline: none;
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.custom-select-dropdown {
    position: fixed; /* Changed from absolute to fixed to escape stacking contexts */
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-control) var(--radius-control);
    box-shadow: var(--shadow-md);
    z-index: 10001 !important; /* Higher than tooltips (10000) and all other elements */
    display: none;
}

.custom-select-dropdown.show {
    display: block;
}

.custom-select-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
    font-size: 1em;    
    color: var(--text-primary);
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
}

.custom-select-item:last-child {
    border-bottom: none;
}

.custom-select-item:hover,
.custom-select-item.selected {
    background-color: var(--warm-gray-light);
}

.custom-select-item.active {
    background-color: var(--strawberry-coral);
    color: white;
}

/* --- Conference Details Layout & Sub-cards --- */
.conference-details-flex-container { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 10px; }
.conference-details-col { 
    flex: 1; 
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 14px;    
    background-color: var(--surface-panel-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pane);
    padding: 20px 22px 24px 22px;
    box-shadow: none;
}
.input-group { display: flex; align-items: center; width: 100%; }
.input-group label.inline-label { margin-right: 8px; margin-bottom: 0; font-weight: 400; font-size: 1em; }
.input-group label.inline-label { margin-right: 8px; margin-bottom: 0; font-weight: 500; font-size: 1em; }

/* Removed copy-to-all-conf button per updated UX */
#participantDaysContainer .input-group, #overnightGuestsContainer .input-group, .conference-details-col > .input-group { gap: 8px; margin-bottom: 12px; }
#participantDaysContainer .input-group, #overnightGuestsContainer .input-group, .conference-details-col > .input-group {
    background: var(--surface-panel-deep);
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    align-items: center;
    min-height: 58px;
    position: relative;
    box-shadow: none;
    transition: border-color .25s ease, background-color .25s ease;
}
#participantDaysContainer .input-group:hover, #overnightGuestsContainer .input-group:hover, .conference-details-col > .input-group:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}
#participantDaysContainer .custom-number-input, #overnightGuestsContainer .custom-number-input, .conference-details-col > .input-group .custom-number-input { margin-left: auto; }

/* --- Custom Number Input --- */
.custom-number-input { display: flex; align-items: center; }
.custom-number-input button {
    background-color: #b0b8c0;
    border: 1px solid var(--border-color);
    color: #3a3a3a;
    padding: 0;
    width: 22px;
    height: 38px;
    font-size: 1.2em;
    line-height: 36px;
    gap: 0;
    box-shadow: none;
}
.custom-number-input button:hover { background-color: #9ca5af; box-shadow: none; }
.custom-number-input input[type="number"] { text-align: center; border-left: none; border-right: none; border-radius: 0; margin: 0; padding: 8px 4px; height: 38px; -moz-appearance: textfield; appearance: textfield; }
.custom-number-input input[type="number"] { text-align: center; border-left: 1px solid var(--input-border); border-right: 1px solid var(--input-border); border-radius: 0; margin: 0; padding: 8px 4px; height: 38px; -moz-appearance: textfield; appearance: textfield; background-color: var(--strawberry-white); box-shadow: none; }
.custom-number-input input[type="number"]:hover { border-color: var(--input-border-hover); }
.custom-number-input input[type="number"]:focus { border-color: var(--input-border-focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.custom-number-input input[type="number"]::-webkit-inner-spin-button, .custom-number-input input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.custom-number-input button.decrement-btn { border-radius: var(--radius-control) 0 0 var(--radius-control); }
.custom-number-input button.increment-btn { border-radius: 0 var(--radius-control) var(--radius-control) 0; }

/* --- F&B and Travel Specific Layout --- */
.travel-section { padding-top: 15px; }
.travel-leg-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border-color); flex-wrap: nowrap; }
.travel-leg-row .travel-desc { flex: 3 1 150px; }
.travel-leg-row .custom-number-input { flex-shrink: 0; }
.travel-leg-row .custom-number-input input.travel-distance { width: 100px; }
.travel-leg-row .custom-number-input input.travel-persons { width: 80px; }
.travel-leg-row .travel-mode { flex: 2 1 140px; }
.travel-leg-row .leg-co2 { flex-shrink: 0; margin-left: auto; font-size: 0.9em; }
.travel-leg-row .remove-leg { height: 38px; width: 28px; }

.meal-group-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(max(220px, calc((100% - 60px) / 4)), 1fr));
    gap: 15px;
    padding: 15px 15px 8px 15px;
    margin: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    margin-bottom: 6px;
    overflow: visible;
}
/* Distinct meal group background tints inside expanded F&B days */
.accordion-content.active .lunch-group .meal-column,
.accordion-content.active .dinner-group .meal-column,
.accordion-content.active .breaks-group .meal-column { 
    background: var(--surface-panel-deep);
}
.accordion-content.active .lunch-group .meal-column:hover,
.accordion-content.active .dinner-group .meal-column:hover,
.accordion-content.active .breaks-group .meal-column:hover { 
    background: var(--surface-hover);
}
.meal-group-wrapper:last-child {
    margin-bottom: 0;
}
.meal-group-title {
    grid-column: 1 / -1;
    font-size: 1.08em;
    font-weight: 600;
    letter-spacing: .7px;
    color: var(--text-primary);
    width: 100%;
    margin: 0 0 6px 0;
    padding: 2px 0 0 0;
    border: none;
    text-transform: uppercase;
    text-align: left;
}
.meal-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 14px 14px 16px 14px;
    background: var(--surface-panel-deep);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
    transition: background-color 0.25s, border-color .25s ease;
    box-shadow: none;
    z-index: auto; /* Don't create stacking context unless needed */
}
.meal-column:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
}
.meal-column:active { transform: translateY(1px); }
.meal-column-header { display: flex; justify-content: flex-start; align-items: center; gap: 10px; margin-bottom: 8px; }
.meal-column-header label { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 1em; margin-bottom: 0; white-space: nowrap; }
.fnb-category-container { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    min-width: 0; 
    width: 100%;
    overflow-x: visible;
    overflow-y: visible;
}
.food-item-row { 
    display: grid; 
    grid-template-columns: minmax(0, 1fr) auto auto; 
    gap: 5px; 
    align-items: flex-end; 
    width: 100%;
}
.food-item-row > select { 
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 38px; 
    padding: 8px 10px;
    font-size: 1em;
    background-color: var(--strawberry-white);
    box-sizing: border-box;
    text-overflow: ellipsis;
}
.fnb-portions-controls { display: flex; align-items: flex-end; flex-shrink: 0; }
.custom-number-input.custom-number-input-fnb button { width: 20px; height: 38px; font-size: 1em; line-height: 36px; }
.custom-number-input.custom-number-input-fnb input.fnb-item-portions { width: 40px; height: 38px; font-size: 1em; padding: 0 4px; }

/* Compact vertical button stack for add and remove */
.fnb-action-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 4px;
}

.fnb-action-buttons-stack .add-fnb-item,
.fnb-action-buttons-stack .remove-fnb-item { 
    height: 18px; 
    width: 24px; 
    padding: 2px; 
    margin: 0;
    font-size: 0.75em;
    line-height: 1;
    border-radius: var(--radius-control);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portions-label-above { font-size: 0.9em; margin-bottom: 2px; font-weight: 400; text-align: center; }

/* Ensure inputs and dropdowns within meal columns remain white */
.meal-column input[type="number"],
.meal-column input[type="text"],
.meal-column .custom-select-display {
    background-color: var(--strawberry-white);
}

/* Ensure inputs and dropdowns within conference details sections remain white */
.input-block.conference-details-main-block input[type="number"],
.input-block.conference-details-main-block input[type="text"],
.input-block.conference-details-main-block input[list="hotelList"],
.input-block.conference-details-main-block select,
.input-block.conference-details-main-block .custom-select-display,
.conference-details-col input[type="number"],
.conference-details-col input[type="text"],
.conference-details-col .custom-select-display {
    background-color: var(--strawberry-white);
}

.copy-feedback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(76, 175, 80, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-control);
    font-weight: bold;
    animation: fadeInOut 2s ease-in-out forwards;
    pointer-events: none;
}
@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  10%, 80% { opacity: 1; }
}

/* --- Results Pane --- */
.results-section { 
    padding: 0;
    overflow: visible;
    margin-bottom: 20px;
    border: none;
    border-radius: 0;
    background: transparent; /* Transparent wrapper so only header shape is visible when collapsed */
    box-shadow: none; /* Remove square elevation in collapsed state */
    transition: box-shadow 0.25s, background-color 0.25s;
}
/* Remove hover shadow on wrapper; header handles hover feedback */
.results-section:hover { box-shadow: none; }
/* Drop alternating backgrounds to avoid square container impression */
.results-pane > .results-section:first-of-type { border-top: none; }
.results-pane > .results-section:last-of-type { padding-bottom: 18px; margin-bottom: 0; }
/* Deprecated alternating and active-block styles replaced by active-wrapper logic */
/* .results-pane .results-section:nth-of-type(odd),
.results-pane .results-section:nth-of-type(even),
.results-pane .results-section.active-block { } */

.result-item { 
    display: grid; 
    grid-template-columns: 1fr auto; /* label grows, value auto */
    align-items: center;
    padding: 8px 14px;
    background: var(--surface-section);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-row);
    box-shadow: none;
    gap: 10px;
    width: 100%;
    margin: 0 0 8px 0;
    transition: background-color 0.15s ease, border-color .15s ease;
}
.result-item:last-child { margin-bottom: 0; }
.result-item:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.result-item:active { transform: translateY(1px); }

.result-item span:first-child { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    color: var(--text-primary);
    font-weight: 600;
    padding-left: 2px; /* micro inset */
    min-width: 0;
}
.result-item strong {
    color: var(--text-primary);
}

.result-item span:last-child,
.result-item .value-with-tooltip > span:first-of-type { 
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    justify-content: flex-end;
}
.value-with-tooltip { display: inline-flex; align-items: center; gap: 8px; }

.icon { height: 1.1em; width: 1.1em; flex-shrink: 0; stroke-width: 2.5; vertical-align: middle; }
.icon-energy { stroke: #FFC107; }
.icon-water { stroke: #2196F3; }
.icon-emissions { stroke: var(--warm-gray-dark); }

/* --- Tooltip Styles --- */
.tooltip-container {
  display: inline-flex;
  align-items: center;
}
.tooltip-trigger {
  display: inline-flex;
  cursor: help;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
}
.tooltip-trigger,
.tooltip-trigger svg,
.tooltip-trigger svg * {
  pointer-events: auto;
  cursor: help;
}
.info-icon-svg {
  width: 18px;
  height: 18px;
}
.info-icon-svg circle {
  fill: #b0bec5;
  transition: fill 0.2s;
}
.tooltip-container:hover .info-icon-svg circle {
  fill: var(--strawberry-burgundy);
}
.info-icon-svg path {
  stroke: white;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
}
.tooltip-container .tooltip-text {
    display: none !important; /* Content is moved to the global tooltip */
}
#global-tooltip-element {
    visibility: hidden;
    min-width: 220px;
    max-width: 280px;
    background-color: var(--warm-gray-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: fixed;
    z-index: 10000;
    font-size: 0.9em;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: var(--shadow-md);
    white-space: normal;
    word-wrap: break-word;
    pointer-events: none;
}
#global-tooltip-element.visible {
  visibility: visible;
  opacity: 1;
}
/* Tooltip arrow */
#global-tooltip-element::after,
#global-tooltip-element::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-style: solid;
}
#global-tooltip-element::after {
  top: 100%;
  border-width: 6px;
  border-color: var(--border-color) transparent transparent transparent;
  z-index: 99;
}
#global-tooltip-element::before {
  top: calc(100% - 1px);
  border-width: 5px;
  border-color: var(--warm-gray-light) transparent transparent transparent;
  z-index: 101;
}
#global-tooltip-element.position-below::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent var(--border-color) transparent;
}
#global-tooltip-element.position-below::before {
  top: auto;
  bottom: calc(100% - 1px);
  border-color: transparent transparent var(--warm-gray-light) transparent;
}
.tooltip-trigger:focus-visible {
  outline: 2px solid var(--strawberry-burgundy);
  outline-offset: 2px;
}


/* --- Accordion Styles --- */
.accordion-header {
    cursor: pointer;
    position: relative;
    padding: 16px 45px 16px 18px;
    background-color: var(--surface-panel);
    transition: background-color 0.2s ease, box-shadow 0.25s ease;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    pointer-events: auto;
    user-select: none;
}
.accordion-header h3 {
    display: inline-block;
    color: var(--text-primary);
    font-size: 1.05em;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    transition: color 0.2s;
}
.results-section .accordion-header {
    padding: var(--accordion-pad-y) var(--accordion-right-pad) var(--accordion-pad-y) var(--accordion-pad-x);
    background-color: var(--surface-section);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: none;
    transition: background-color 0.2s ease;
}
.results-section .accordion-header:not(.active):hover {
    background-color: var(--surface-hover);
    border-color: var(--border-strong);
}
.results-section .accordion-header h3 {
    padding-left: 6px;
}
.results-section:last-of-type .accordion-header:not(.active) {
    border-radius: var(--radius-control);
}
.day-food-section .accordion-header {
    background-color: var(--surface-section);
    padding: var(--accordion-pad-y) var(--accordion-right-pad) var(--accordion-pad-y) var(--accordion-pad-x);
    cursor: pointer;
    pointer-events: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: none;
    transition: background-color 0.2s;
}
.day-food-section .accordion-header:not(.active):hover { border-color: var(--border-strong); }
.day-food-section:last-of-type .accordion-header:not(.active) {
    border-radius: var(--radius-control);
}
.accordion-header:hover {
    background-color: var(--surface-hover);
}
.accordion-header.active {
    background-color: var(--surface-accent);
    border-bottom: 1px solid var(--border-strong);
}
.accordion-header.active h3 {
    color: var(--text-primary);
}
.results-section .accordion-header:hover {
    background-color: var(--surface-hover);
}
.results-section .accordion-header.active {
    background-color: var(--surface-accent);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    box-shadow: none;
    position: relative;
    color: var(--text-primary);
}
.results-section.active-wrapper::before { content: none; }
.results-section.active-wrapper { box-shadow: none; background: transparent; }
.results-section.active-wrapper .accordion-content.active { 
    background: var(--surface-panel-deep);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-card) var(--radius-card); 
    box-shadow: none;
    padding-left: var(--accordion-pad-x); 
    padding-right: var(--accordion-pad-x);
}
.results-section .accordion-header.active::before { content: none; }
.day-food-section .accordion-header:hover {
    background-color: var(--surface-hover);
}
.day-food-section .accordion-header.active {
    background-color: var(--surface-accent);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    box-shadow: none;
    position: relative;
}
.day-food-section .accordion-header.active::before { content: none; }
.day-food-section .accordion-header:focus-visible {
    outline: 3px solid rgba(252,94,88,0.35);
    outline-offset: 2px;
}
.accordion-header::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: translateY(-75%) rotate(45deg);
    transition: all 0.3s ease;
}
.accordion-header:hover::after {
    border-color: var(--strawberry-coral);
}
.accordion-header.active::after {
    transform: translateY(-25%) rotate(225deg);
    border-color: var(--color-primary);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    position: relative;
    background: transparent;
    border: none;
    padding: 0;
}
.accordion-content.active {
    max-height: 5000px; /* Increased from 2000px to accommodate larger content */
    overflow: visible;
    background: var(--surface-panel);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    box-shadow: none;
    padding: calc(var(--accordion-pad-y) + 2px) var(--accordion-pad-x) calc(var(--accordion-pad-y) + 4px) var(--accordion-pad-x);
    z-index: auto; /* Don't create stacking context */
}
.results-section .accordion-content.active {
    border: 1px solid var(--border-color);
    border-top: none;
    box-shadow: none;
    background: var(--surface-panel-deep); /* matches other panels */
    border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.day-food-section .accordion-content { 
    background: transparent; 
    border: none; 
    box-shadow: none; 
    padding: 0;
    position: relative;
    z-index: 1; /* Lower than dropdown wrapper active state (10002) */
}
.day-food-section .accordion-content.active {
    background: var(--surface-panel-soft); /* Lighter tinted background matching results side */
    border: 1px solid var(--border-color); /* Align with header outline for cohesive edge */
    box-shadow: none; /* No shadow - container provides it */
    padding: calc(var(--accordion-pad-y) + 2px) var(--accordion-pad-x) calc(var(--accordion-pad-y) + 4px) var(--accordion-pad-x);
    border-radius: 0 0 var(--radius-row) var(--radius-row);
    margin: 0 0 8px 0;
    position: relative;
    z-index: 1; /* Lower than dropdown wrapper active state (10002) */
}
/* F&B keeps full padding; indicator stripe removed */
.day-food-section.active-wrapper .accordion-header,
.day-food-section.active-wrapper .accordion-content { padding-left: var(--accordion-pad-x); }
.day-food-section.active-wrapper { /* wrapper styling for active day grouping */
    background: transparent; /* Avoid duplicate surface panel */
    border: none;
    border-radius: var(--radius-card);
    box-shadow: none;
    padding-bottom: 4px; /* slight tightening */
}
/* Results accordions retain full padding to maintain consistent hover/active geometry */
.accordion-inner {
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
    overflow: visible;
    visibility: hidden;
}
.accordion-content.active .accordion-inner {
    opacity: 1;
    transition-delay: 0.1s;
    pointer-events: auto;
    visibility: visible;
}
.results-pane .accordion-inner {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: calc(var(--accordion-pad-y) + 2px) 12px calc(var(--accordion-pad-y) + 6px);
    margin: 0;
    box-shadow: none;
}
/* Charts accordion inner is the second level panel - darker tint, narrower, with border */
.results-pane .accordion-inner:has(#chartsContainer) {
    background: var(--surface-panel-soft);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 0 auto;
    width: 90%;
    border-radius: var(--radius-card);
    box-shadow: none;
}
.day-food-section .accordion-inner {
    padding-bottom: 20px; /* Reduced from 80px to minimize excess whitespace */
}

/* --- Chart Layout --- */
#chartsContainer { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: center; 
    gap: 24px;
    padding: 20px;
    background: white;
    border: 1px solid transparent;
    border-radius: var(--radius-card);
    margin: 0;
    width: 100%;
    box-shadow: none;
}
.chart-wrapper { 
    flex-grow: 1; 
    flex-shrink: 1; 
    flex-basis: 180px; 
    max-width: 250px; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    background: white;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}
.donut-chart-container { 
    position: relative; 
    width: 165px; 
    height: 165px; 
    margin: 10px auto; 
    flex-shrink: 0;
    background: white;
    border-radius: 50%;
    display: block;
}
.donut-chart-svg { 
    width: 100%; 
    height: 100%; 
    overflow: visible;
    background: white;
    border-radius: 50%;
}
.donut-chart-svg path { 
    transition: transform 0.2s ease, opacity 0.2s ease; 
    transform-origin: center; 
    transform-box: view-box; 
}
.donut-chart-svg:hover path { opacity: 0.7; }
.donut-chart-svg path:hover { opacity: 1; transform: scale(1.05); }
.donut-chart-center { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    font-size: 0.85em; 
    color: var(--text-primary);    
    line-height: 1.2; 
    pointer-events: none;
}
.donut-chart-center .total-value { font-size: 1.4em; font-weight: 700; }
.donut-legend { display: flex; flex-direction: column; align-items: flex-start; margin-top: 10px; padding-left: 10px; max-width: 250px; width: 100%; }
.legend-item { display: flex; align-items: center; margin-bottom: 4px; font-size: 0.9em; }
.legend-color { width: 10px; height: 10px; margin-right: 8px; border-radius: 3px; flex-shrink: 0; }

/* --- Contextual Info Cards --- */
.info-card {
    padding: 20px;
    border-radius: 8px;
    font-size: 0.95em;
    border: 1px solid;
    box-shadow: none;
    margin-top: 15px;
}
.equivalency-card { background-color: #FFF8E1; border-color: #FFECB3; }
.quick-wins-card { background-color: var(--surface-success-bg); border-color: #C8E6C9; }
.info-card h4 { margin-top: 0; margin-bottom: 15px; font-size: 1.2em; display: flex; align-items: center; gap: 10px; text-align: left; }
.equivalency-card h4 { color: #FFA000; }
.quick-wins-card h4 { color: #388E3C; }
.info-card h4 svg { width: 24px; height: 24px; flex-shrink: 0; }
.info-card ul { list-style: none; padding-left: 0; margin: 0; }
.info-card li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; line-height: 1.5; }
.info-card li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.info-card li > span { flex-grow: 1; }
.info-card li strong { color: var(--color-primary); }
.icon-idea { stroke: #FFC107; }
.hidden { display: none !important; }

/* --- Modal Styles --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay[style*="flex"] { display: flex; }
.modal-content {
    background-color: var(--strawberry-white);
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 500px;
    position: relative;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-scroll-content {
    padding: 25px 30px;
    overflow-y: auto;
    flex-grow: 1;
}
.modal-close-btn { position: absolute; top: 10px; right: 15px; background: transparent; border: none; font-size: 28px; font-weight: bold; color: #aaa; cursor: pointer; line-height: 1; padding: 0; z-index: 10; }
.modal-close-btn:hover { color: var(--text-primary); }
.modal-content h2 { margin-top: 0; color: var(--strawberry-burgundy); }
.modal-content ul { padding-left: 20px; line-height: 1.6; }
.modal-content a { color: var(--strawberry-burgundy); font-weight: 500; }
#usageInfoModal .modal-content ul li {
    margin-bottom: 12px;
}
#usageInfoModal .modal-content ul ul {
    margin-top: 10px;
}
#usageInfoModal .modal-content ol li {
    margin-bottom: 15px;
}
.modal-form { display: flex; flex-direction: column; gap: 15px; margin: 20px 0; }
.modal-form label { margin-bottom: -10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }

.modal-form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background-color: var(--surface-panel-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-control);
}
.modal-form-checkbox input[type="checkbox"] { width: auto; height: auto; }
.modal-form-checkbox label { margin-bottom: 0; font-weight: 500; }

/* Storage Modal Specifics */
.storage-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 25px;
}
.storage-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background-color: var(--surface-panel-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    cursor: pointer;
    transition: all 0.2s ease;
}
.storage-option-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--strawberry-coral);
    background-color: var(--surface-section);
}
.storage-option-btn .btn-icon { width: 32px; height: 32px; margin-bottom: 10px; color: var(--color-primary); }
.storage-option-btn span { font-size: 1.1em; font-weight: 600; color: var(--text-primary); }
.storage-option-btn small { font-size: 0.9em; color: var(--text-secondary); margin-top: 4px; }

/* F&B Template Modal Specifics */
.modal-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.modal-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.modal-section h3 { margin-top: 0; margin-bottom: 15px; font-size: 1.2em; color: var(--text-primary); }
.utility-button.danger { background-color: var(--color-danger); color: var(--text-on-primary); }
.utility-button.danger:hover { background-color: var(--color-danger-hover); }
.template-import-export { display: flex; gap: 10px; justify-content: center; }
.share-instructions { font-size: 0.95em; text-align: center; max-width: 400px; margin: 0 auto 15px auto; }
.share-code-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.share-code-container p {
    font-size: 0.95em;
    margin-bottom: 10px;
}
#shareCodeTextarea {
    width: 100%;
    height: 180px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    background-color: var(--surface-panel-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-control);
    padding: 10px;
}

/* Custom Notification System for F&B Template Modal */
.notification-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.notification-box {
    background-color: var(--surface-section);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    padding: 25px 35px;
    text-align: center;
    max-width: 90%;
    animation: notification-fade-in 0.3s ease-out;
}

@keyframes notification-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.notification-box.success {
    border-left: 5px solid var(--color-success);
    color: var(--text-primary);
}

.notification-box.confirm {
    border-left: 5px solid var(--color-danger);
}

.notification-box p { font-size: 1.1em; margin: 0 0 20px 0; color: var(--text-primary); }
.notification-box.success p { margin-bottom: 0; }
.notification-actions { display: flex; justify-content: center; gap: 15px; }

/* --- Custom Scrollbar Styles --- */
.input-pane::-webkit-scrollbar,
.results-pane::-webkit-scrollbar,
.modal-scroll-content::-webkit-scrollbar {
    width: 8px;
}

.input-pane::-webkit-scrollbar-track,
.results-pane::-webkit-scrollbar-track,
.modal-scroll-content::-webkit-scrollbar-track {
    background-color: transparent;
}

.input-pane::-webkit-scrollbar-thumb,
.results-pane::-webkit-scrollbar-thumb,
.modal-scroll-content::-webkit-scrollbar-thumb {
    background-color: var(--warm-gray-medium);
    border-radius: 10px;
}

.input-pane::-webkit-scrollbar-thumb:hover,
.results-pane::-webkit-scrollbar-thumb:hover,
.modal-scroll-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--warm-gray-dark);
}

/* --- Responsive & Print Styles --- */
@media (max-width: 1400px) { 
    .input-pane { width: 73%; } 
    .results-pane { width: 27%; }
}
@media (max-width: 1200px) { 
    .input-pane { width: 70%; } 
    .results-pane { width: 30%; }
}
@media (max-width: 992px) { 
    html, body { height: auto; overflow: auto; }
    .container {
        flex-direction: column;
        height: auto;
        margin: 10px auto;
        width: 100%;
        padding: 0 10px;
    } 
    .input-pane, .results-pane { 
        width: 100%; 
        border-right: none; 
        height: auto; 
        overflow-y: visible; 
        margin: 0;
        padding: 15px;
    } 
    .action-buttons-header { flex-direction: column; align-items: stretch; } 
    .conference-details-col { border-right: none !important; margin-bottom: 15px;} 
    .meal-group-wrapper { grid-template-columns: repeat(auto-fit, minmax(max(200px, calc((100% - 45px) / 3)), 1fr)); }
}
@media (max-width: 768px) {
    body { font-size: 13px; }
    .input-pane > h1 {
        font-size: 1.1em;
        padding: 10px 15px;
        gap: 15px;
    }
    .header-logo { height: 28px; }
    .input-pane, .results-pane { padding: 10px; }
    .input-block, #travelSectionMain, .day-food-section { padding: 15px; }
    .conference-details-flex-container { gap: 10px; }
    .conference-details-col { padding: 10px; }
    .conference-details-flex-container .input-group, .conference-details-col > .input-group { flex-wrap: wrap; }
    #participantDaysContainer .custom-number-input, #overnightGuestsContainer .custom-number-input, .conference-details-col > .input-group .custom-number-input { margin-left: 0; width: 100%; justify-content: flex-start; }
    .conference-details-flex-container .input-group .inline-label, .conference-details-col > .input-group .inline-label { flex-basis: 100%; margin-bottom: 3px; }
    .travel-leg-row { flex-wrap: wrap; }
    .travel-leg-row > * { width: 100% !important; margin-bottom: 8px; }
    .food-item-row { grid-template-columns: 1fr; }
    .chart-wrapper { min-width: 100%; flex-basis: 100%; }
    .hotel-selection-container { flex-direction: column; align-items: stretch; }
    .meal-group-wrapper { grid-template-columns: 1fr; gap: 10px; margin: 0 0 15px 0; padding: 10px; }
    .day-food-section .accordion-inner { padding: 10px; }
    .custom-select-dropdown { max-width: 100%; }
}

/* --- Accessibility / Preference Enhancements --- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    .accordion-content {
        transition: none !important;
        max-height: none !important; /* Present content without animated expansion */
    }
}

/* High contrast helper class (opt-in) */
.high-contrast body, body.high-contrast {
    --surface-page: #ffffff;
    --surface-accent: #f5f5f5;
    --surface-section: #ffffff;
    --border-color: #4a4a4a;
}
body.high-contrast .accordion-header.active h3 { color: #000; }
body.high-contrast .meal-group-title { color: #222; }

/* Improve visible focus for keyboard users on dark backgrounds */
body.high-contrast button:focus-visible,
body.high-contrast .config-button:focus-visible,
body.high-contrast .custom-select-display:focus-visible,
body.high-contrast input:focus-visible,
body.high-contrast select:focus-visible {
    box-shadow: 0 0 0 3px rgba(0,0,0,0.55) !important;
    outline: 2px solid var(--strawberry-coral);
    outline-offset: 1px;
}

@media print {
    @page { size: A4; margin: 1.5cm; }
    :root {
        --strawberry-coral: #fc5e58;
        --strawberry-burgundy: #9B2226;
        --strawberry-black: #212529;
    }
    body, html {
        height: auto;
        overflow: visible;
        font-family: 'Figtree', sans-serif;
        font-size: 10pt;
        padding: 0;
        margin: 0;
        background-color: var(--surface-page);
        color: var(--text-primary);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    body > *:not(#printSummaryContainer) { display: none !important; }
    #printSummaryContainer { display: block !important; }
    .print-header {
        display: flex;
        align-items: center;
        gap: 16px;
        justify-content: space-between;
        background: var(--strawberry-coral);
        color: #fff;
        padding: 8px 14px; /* slightly tighter to avoid second page */
        margin: 0 0 10px 0;
        border-radius: 12px; /* round bottom corners too */
    }
    #printLogo { height: 36px; width: auto; flex-shrink: 0; display: block; margin-left: 2px; }
    #printReportTitle {
        font-size: 11.5pt; /* unified, small enough to avoid overflow */
        color: #fff !important;
        background: none !important;
        text-align: left;
        padding: 0;
        margin: 0;
        line-height: 1.12;
    }
    #printReportTitle .title-main { font-size: inherit; font-weight: 700; }
    #printReportTitle .title-sep { opacity: .9; padding: 0 2px; }
    #printReportTitle .title-sub { font-size: inherit; font-weight: 500; opacity: .95; }
    .print-total-pill {
        margin-left: auto;
        font-size: 11pt;
        font-weight: 700;
        color: var(--text-primary);
        background: var(--surface-panel-alt);
        border: 1px solid var(--border-soft-strong);
        border-radius: 999px;
        padding: 6px 12px;
        white-space: nowrap;
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
        align-self: flex-start; /* top align the total pill */
        margin-top: 0;         /* avoid vertical drift */
    }
    .print-total-pill .label { font-weight: 600; opacity: .8; }
    .print-section { margin-bottom: 8px; }
    /* Top grid layout: left column has two stacked cards; right column is charts spanning both rows */
    .print-top-grid {
        display: grid;
        grid-template-columns: 0.92fr 1.08fr; /* Use fr units so gaps never cause overflow */
        grid-auto-rows: auto;
        column-gap: 10px;
        row-gap: 6px;
        align-items: stretch;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
    .print-top-grid > .print-top-left,
    .print-top-grid > .print-top-right { min-width: 0; }
    .print-top-grid > .print-top-left { grid-column: 1; }
    .print-top-grid > .print-top-right { grid-column: 2; grid-row: 1 / span 2; }
    .print-top-grid .print-card { height: 100%; }
    #printChartsContainer.print-top-right .print-card {
        height: 100%;
        display: grid;
        grid-template-rows: auto 1fr;
        background: var(--surface-panel); /* match other panels */
        border-radius: 12px;
        box-sizing: border-box;
        border: 1px solid var(--border-soft-strong);
        max-width: 100%; /* align with header width */
    }
    #printChartsContainer .print-charts-flex-container {
        flex: 1;
        display: grid !important;
        grid-template-rows: auto 1fr;
        align-items: start;
        justify-items: center;
    }
    #printChartsContainer .chart-wrapper {
        width: 100%;
        max-width: none;
        display: grid;
        justify-items: center;
        box-sizing: border-box;
        padding: 4px 6px 6px;
    }
    #printChartsContainer .donut-chart-container { width: 155px; height: 155px; }
    #printChartsContainer .donut-legend {
        margin-top: 4px;
        font-size: 6.4pt;
        width: 78%;
        margin-left: auto;
        margin-right: auto;
        column-count: 2;
        column-gap: 6px;
    }
    .print-inner-card { overflow: hidden; }
    /* White inner card to hold chart + legend */
    .print-inner-card {
        background: #fff;
        border: 1px solid var(--border-soft-strong);
        border-radius: 10px;
        padding: 4px 6px; /* slightly tighter to keep legend inside */
        margin-top: 6px;
        box-sizing: border-box;
    }
    .print-card {
        background-color: var(--surface-panel);
        border: 1px solid var(--border-soft-strong);
        border-radius: 12px;
        padding: 8px 12px; /* reduce vertical padding for shorter panels */
        page-break-inside: avoid;
        box-shadow: none;
        max-width: 100%;
        box-sizing: border-box;
    }
    .print-card--equivalency {
        background-color: var(--surface-panel-alt);
        border-color: var(--border-soft-strong);
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .print-card--quick-wins {
        background-color: var(--surface-accent);
        border-color: var(--color-accent-border);
    }
    .print-card h3, .print-card h4 {
        font-size: 10.5pt; /* smaller to save space */
        color: var(--color-primary);
        border-bottom: 1px solid var(--border-soft-strong);
        padding-bottom: 2px;
        margin-top: 0;
        margin-bottom: 6px;
        text-align: left;
    }
    /* reserved for potential future sublists under print cards */
    .print-value-display { display: flex; justify-content: space-between; padding: 2px 0; font-size: 9.5pt; align-items: baseline; }
    .print-value-display .label { font-weight: 500; color: var(--warm-gray-dark); }
    .print-value-display .value, .print-value-display span:not(.label) { font-weight: 600; color: var(--text-primary); }
    .print-value-display .value-strong { font-weight: 700; }
    .print-value-display .text-muted { color: var(--warm-gray-dark); font-style: italic; font-weight: 500; }
    .total-line { font-size: 11pt; padding-top: 6px; }
    .total-line .label { font-weight: 700; color: var(--color-primary); }
    hr { border: 0; border-top: 1px solid var(--border-soft-strong); margin: 8px 0; }
    #printChartsContainer .print-charts-flex-container { display: grid !important; grid-template-rows: auto 1fr; align-items: start; justify-items: center; gap: 0; margin-top: 0; }
    #printChartsContainer .chart-wrapper { min-width: 0; display: grid; justify-items: center; }
    #printChartsContainer .donut-chart-svg path { stroke-width: 0; }
    #printChartsContainer .donut-legend { font-size: 7.6pt; padding-left: 0; width: 92%; margin: 6px auto 0; column-count: 2; column-gap: 10px; }
    #printChartsContainer .legend-item { margin-bottom: 2px; }
    #printChartsContainer h4 { font-size: 11pt; text-align: center; margin-bottom: 10px; border-bottom: none; }
    #travel_print_summary ul, .print-card ul { margin: 0; padding-left: 18px; list-style-type: disc; }
    #travel_print_summary li, .print-card li { margin-bottom: 3px; }
    .print-summary-table { width: 100%; border-collapse: collapse; font-size: 8.7pt; margin-top: 8px; table-layout: fixed; background: #fff; }
    .print-summary-table thead { display: table-header-group; }
    .print-summary-table th, .print-summary-table td { border: 1px solid var(--border-soft-strong); padding: 5px; text-align: left; vertical-align: top; page-break-inside: avoid; background: #fff; }
    .print-summary-table th { color: var(--text-primary); font-weight: 700; border-bottom: 2px solid var(--border-strong); }
    .print-summary-table tbody td:last-child { font-weight: 600; }
    .print-card h3 { break-after: avoid; page-break-after: avoid; }

    /* Metric badges for resource estimates */
    .metric-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border-soft-strong); border-radius: 999px; background: #fff; font-weight: 700; }
    .print-summary-table td:nth-child(2), .print-summary-table td:nth-child(3) { text-align: right; }
    .print-footer {
        position: fixed;
        bottom: 0;
        left: 1.5cm;
        right: 1.5cm;
        text-align: center;
        font-size: 8pt;
        color: var(--warm-gray-dark);
        border-top: 1px solid var(--border-soft-strong);
        background: var(--surface-page);
        padding-top: 8px;
    }
}

/* --- Layout & Scrollbar Normalization --- */
/* Override legacy layout tweaks for day-food-section now that borders removed */
.day-food-section { overflow: visible !important; }
.day-food-section .accordion-content { overflow: visible; }
.day-food-section .accordion-content:not(.active) { overflow: hidden; }

.results-pane { scrollbar-gutter: stable both-edges; }

.input-pane, .results-pane {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.input-pane::-webkit-scrollbar,
.results-pane::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

html {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  scrollbar-gutter: stable both-edges;
}
html::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

:root {
  --pane-pad: 15px;
  --header-pad-x: 15px;
}
.results-pane > .section-header,
.results-pane > .results-header {
  margin-left: calc(-1 * var(--pane-pad)) !important;
  margin-right: calc(-1 * var(--pane-pad)) !important;
  padding-left: var(--header-pad-x) !important;
  padding-right: var(--header-pad-x) !important;
}
.results-pane .results-section,
.results-pane .accordion-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* Hierarchical depth visualization (right panel enhanced) */
.results-pane [data-depth] { position: relative; transition: width 0.25s ease, margin-left 0.25s ease, background-color .25s ease, padding-left .25s ease; }
.results-pane [data-depth="1"]:not(.result-item):not(.accordion-content):not(.accordion-inner):not(.results-section):not(.chart-wrapper) { width: 100%; margin-left: 0; background: var(--neutral-soft-150); padding-left: 0; box-shadow: none; border: 1px solid var(--border-color); border-radius: 0 0 var(--radius-card) var(--radius-card); }
.results-pane [data-depth="2"]:not(.result-item):not(.accordion-content):not(.accordion-inner):not(.results-section):not(#chartsContainer) { width: 90%; margin-left: 5%; background: var(--neutral-soft-200); padding-left: 8px; box-shadow: none; border: 1px solid var(--border-color); border-radius: var(--radius-card); }
.results-pane [data-depth="3"]:not(.result-item):not(.accordion-content):not(.accordion-inner):not(.results-section):not(.chart-wrapper) { width: 80%; margin-left: 10%; background: var(--neutral-soft-250); padding-left: 16px; box-shadow: none; border: 1px solid var(--border-color); border-radius: var(--radius-card); }
.results-pane [data-depth]:not(.result-item):not(.accordion-content):not(.accordion-inner):not(.results-section):not(.chart-wrapper):not(#chartsContainer):hover { border-color: var(--border-strong); }
.results-pane [data-depth]:not(.result-item):not(.accordion-content):not(.accordion-inner):not(.results-section):not(.chart-wrapper):not(#chartsContainer):active { transform: translateY(1px); }

/* Override depth styling for chartsContainer specifically */
#chartsContainer {
    width: 100% !important;
    margin: 0 !important;
    background: white !important;
    padding: 20px !important;
    box-shadow: none !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-card) !important;
}

@media (max-width: 992px) {
    .results-pane [data-depth]:not(.result-item) { width: 100% !important; margin-left: 0 !important; padding-left:0 !important; }
}
