/* ------------------------------------------------------------------
   Travel Weather V0.1 layout
   This is intentionally self-contained so it overrides older assets.
   ------------------------------------------------------------------ */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    background: #f7f8fa;
}

body {
    overflow: hidden;
}

#_dash-app-content {
    width: 100%;
    height: 100vh;
}

.app-shell {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header ----------------------------------------------------------- */

.header {
    height: 64px;
    min-height: 64px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0 28px;
    box-sizing: border-box;
}

.header-content {
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.logo {
    margin: 0;
    font-size: 24px;
    font-weight: 750;
    letter-spacing: -0.5px;
    color: #111827;
}

.tagline {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

/* Main ------------------------------------------------------------- */

.main {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Controls occupy the full width ---------------------------------- */

.search-section {
    flex: 0 0 auto;
    width: 100%;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 24px 12px;
    box-sizing: border-box;
}

.search-title {
    margin: 0 0 14px;
    font-size: 19px;
    font-weight: 700;
    color: #111827;
}

.search-form {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1.35fr 1.35fr auto;
    gap: 14px;
    align-items: start;
}

.input-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.input-label {
    height: 18px;
    margin-bottom: 5px;
    line-height: 18px;
}

.input {
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    padding: 0 11px;
    font-size: 14px;
    background: white;
}

.activity-dropdown {
    width: 100%;
}

.activity-dropdown .Select-control {
    height: 40px;
    min-height: 40px;
    border-radius: 7px;
    border-color: #d1d5db;
}

.date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.date-picker {
    width: 100%;
}

.date-picker .DateInput,
.date-picker .DateInput_input {
    width: 100%;
    box-sizing: border-box;
}

.date-picker .DateInput_input {
    height: 40px;
    padding: 8px 9px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 13px;
}

.travel-slider-group {
    padding: 0 4px;
}

.search-button {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 7px;
    background: #111827;
    color: white;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-top: 23px;
}

.search-button:hover {
    background: #374151;
}

.error-message {
    margin-top: 8px;
    color: #b91c1c;
    font-size: 13px;
}

/* Results header --------------------------------------------------- */

.results-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#results-header {
    flex: 0 0 auto;
    background: #f7f8fa;
    padding: 0px 22px 10px;
}

.results-title {
    margin: 0;
    font-size: 18px;
    color: #111827;
}

.results-subtitle {
    margin: 3px 0 0;
    color: #6b7280;
    font-size: 12px;
}

/* Sidebar + map ---------------------------------------------------- */

.results-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr) 360px;
    background: #f7f8fa;
}

.results-sidebar {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 12px 24px 22px;
    box-sizing: border-box;
    scrollbar-width: thin;
    background: #ffffff;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-panel,
.results-map {
    min-width: 0;
    min-height: 0;
    height: 100%;
    background: #e5e7eb;
    border-left: 1px solid #e5e7eb;
}

.map-panel .dash-graph,
.results-map .dash-graph {
    height: 100% !important;
}

/* Cards ------------------------------------------------------------ */

.destination-card {
    width: 100%;
    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #e1e5ea;
    border-radius: 10px;

    padding: 15px 16px 13px;

    cursor: pointer;

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.destination-card:hover {
    border-color: #b8c0ca;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    transform: translateY(-1px);
}


/* Selected --------------------------------------------------------- */

.destination-card.selected {
    border-color: #2563eb;
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.08),
        0 3px 10px rgba(0, 0, 0, 0.06);
}

.destination-card.selected:hover {
    border-color: #2563eb;
}


/* Header ----------------------------------------------------------- */

.destination-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 12px;
}

.destination-title {
    min-width: 0;

    display: flex;
    align-items: flex-start;

    gap: 9px;
}

.destination-rank {
    flex: 0 0 auto;

    padding-top: 2px;

    font-size: 12px;
    line-height: 1.2;

    font-weight: 700;

    color: #9ca3af;
}

.destination-name {
    margin: 0;

    font-size: 16px;
    line-height: 1.2;

    font-weight: 700;

    color: #111827;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Destination metadata -------------------------------------------- */

.destination-meta {
    margin-top: 4px;

    font-size: 11px;
    line-height: 1.3;

    color: #8a929d;
}


/* Score ------------------------------------------------------------ */

.score {
    flex: 0 0 auto;

    display: flex;
    align-items: baseline;

    gap: 2px;
}

.score-value {
    font-size: 23px;
    line-height: 1;

    font-weight: 750;

    color: #111827;
}

.score-label {
    font-size: 11px;

    color: #9ca3af;
}


/* Reasons ---------------------------------------------------------- */

.reasons {
    margin-top: 12px;

    display: flex;
    flex-direction: column;

    gap: 6px;
}

.reason {
    display: grid;

    grid-template-columns:
        18px
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 5px;

    font-size: 12px;
    line-height: 1.3;
}

.reason-icon {
    font-weight: 700;
}

.reason-icon.positive {
    color: #198754;
}

.reason-icon.negative {
    color: #d97706;
}

.reason-label {
    color: #4b5563;
}

.reason-value {
    color: #111827;

    font-weight: 600;

    white-space: nowrap;
}


/* Travel ----------------------------------------------------------- */

.travel-info {
    margin-top: 12px;
    padding-top: 10px;

    border-top: 1px solid #f0f1f3;

    color: #6b7280;

    font-size: 12px;
    line-height: 1.3;
}


/* Empty state ------------------------------------------------------ */

.empty-results {
    padding: 18px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    color: #6b7280;

    font-size: 13px;
}

/* Hide the old detail panel from the main layout for now.
   We can later turn it into a map popup / selected card. */
/* Detail panel ----------------------------------------------------- */

.detail-panel {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;

    background: white;
    border-left: 1px solid #e5e7eb;

    padding: 16px 20px 28px;

    scrollbar-width: thin;
}
/* Footer ----------------------------------------------------------- */

.footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 2px 24px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    flex-shrink: 0;
}

.footer-contact {
    flex-shrink: 0;
}

.footer-attribution {
    margin-left: auto;
    text-align: right;
}

.footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 820px) {
    .footer {
        flex-wrap: wrap;
        padding: 12px 16px;
    }
}

/* Responsive ------------------------------------------------------ */

@media (max-width: 1100px) and (min-width: 701px) {
    .results-layout {
        grid-template-columns: 320px minmax(0, 1fr) 320px;
    }
   
    .search-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-button {
        grid-column: span 2;
    }
}

@media (max-width: 700px) {
    body {
        overflow: auto;
    }

    #_dash-app-content,
    .app-shell {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .search-button {
        grid-column: auto;
    }

    .results-layout {
        display: flex;
        flex-direction: column;
        min-height: 900px;
    }

    .results-sidebar {
        overflow: visible;
        padding: 10px 14px;
        order: 3;
    }

    .results-map {
        height: 55vh;
        min-height: 400px;
        order: 1;
    }

    .detail-panel {
        order: 2;
        max-height: none;
        overflow: visible;
        border-left: 0;
        border-top: 1px solid #e5e7eb;
        padding: 20px 14px;
    }
}


/* ------------------------------------------------------------------
   Destination selection / period context
   ------------------------------------------------------------------ */

.results-period-note {
    margin: 2px 0 0;
    color: #8a93a1;
    font-size: 11px;
}

.destination-card.selected {
    border-color: #111827;
    box-shadow: 0 0 0 1px #111827, 0 4px 14px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.destination-card.selected .destination-rank {
    color: #111827;
}

.destination-card.selected .score-value {
    color: #111827;
}

/* Map hover is intentionally left to Plotly. */

.detail-section {
    margin-top: 20px;
}

.detail-section-title {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.score-breakdown-label {
    font-size: 13px;
    color: #4b5563;
}

.score-breakdown-value {
    font-size: 15px;
    color: #111827;
}

.detail-stability {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-reliability {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.weather-metrics {
    margin-top: 18px;
}

.travel-metrics {
    margin-top: 18px;
}

.destination-detail {
    width: 100%;
    box-sizing: border-box;
}

.empty-detail {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 220px;
    color: #6b7280;
}

.empty-detail h3 {
    margin: 0 0 8px;
    color: #374151;
    font-size: 16px;
}

.empty-detail p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    /* padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb; */
}

.detail-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 750;
    color: #111827;
}

.detail-subtitle {
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
}

.detail-score {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.detail-score-value {
    font-size: 28px;
    line-height: 1;
    font-weight: 750;
    color: #111827;
}

.detail-score-label {
    font-size: 11px;
    color: #9ca3af;
}

.detail-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.weather-metrics {
    margin-top: 18px;
}

.travel-metrics {
    margin-top: 18px;
}

.detail-metrics .metric {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
}

.metric-icon {
    flex: 0 0 auto;
    font-size: 17px;
}

.metric-label {
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-metrics strong {
    display: block;
    font-size: 13px;
    color: #111827;
}

/* =========================================================
   PERIOD OUTLOOK
   ========================================================= */

.period-summary {
    margin-top: 20px;
}

.period-summary-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.period-summary-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #777;
}

.period-overall {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.period-overall-score {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.period-overall-max {
    font-size: 11px;
    color: #999;
}


/* Daily timeline */

.period-section {
    margin-top: 14px;
}

.period-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.period-daily-timeline {
    display: flex;
    gap: 6px;
}

.period-day {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 7px 4px;
    border-radius: 6px;
    background: #f6f6f6;
}

.period-day-name {
    font-size: 10px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
}

.period-day-date {
    font-size: 11px;
    color: #666;
    margin-top: 1px;
}

.period-day-score {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

.period-day-score.excellent {
    color: #2f7d4a;
}

.period-day-score.good {
    color: #4f8a5b;
}

.period-day-score.moderate {
    color: #a27632;
}

.period-day-score.poor {
    color: #a34b43;
}


/* Best / watch-out rows */

.period-highlights {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.period-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.period-best .period-icon {
    background: #e8f3eb;
    color: #39784b;
}

.period-watch .period-icon {
    background: #f7ece9;
    color: #a34b43;
}

.period-highlight {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    gap: 7px;
    padding: 7px 0;
    border-top: 1px solid #eeeeee;
}

.period-highlight:first-child {
    border-top: none;
}

.period-highlight-title {
    font-size: 12px;
    font-weight: 500;
    color: #444;
}

.period-highlight-score {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-top: 0;
}


/* Weather overview */

.period-weather-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
}

.period-weather-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 1px solid #eeeeee;
    padding-top: 6px;
}

.period-weather-label {
    font-size: 11px;
    color: #888;
}

.period-weather-value {
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

.daily-variable-selector-container {
    width: 150px;
    margin: 6px 0 2px auto;
}

.daily-variable-dropdown .Select-control {
    min-height: 30px;
    height: 30px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 11px;
}

.daily-variable-dropdown .Select-value-label {
    font-size: 11px;
}

.daily-variable-dropdown .Select-menu-outer {
    font-size: 11px;
}

.forecast-evolution-chart {
    margin-top: -4px;
}

.daily-breakdown {
    margin-top: 18px;
    padding: 0;
    background: transparent;
    border: none;
}

.daily-breakdown-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 12px 0 0 0;
}

.daily-selector {
    font-size: 13px;
}

.daily-selector .Select-control {
    border-radius: 10px;
    border: 1px solid #e2e2e2;
    box-shadow: none;
    min-height: 38px;
}

.daily-selector .Select-value-label {
    font-size: 13px;
}

.daily-weather-summary {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid #eeeeee;
}

.daily-summary-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    opacity: 0.55;
}

.daily-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    row-gap: 14px;
}

.daily-summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.daily-summary-icon {
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.daily-summary-label {
    font-size: 11px;
    color: #777;
    margin-bottom: 2px;
}

.daily-summary-value {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.detail-empty-state {
    padding: 60px 20px;
    text-align: center;
    font-size: 13px;
    opacity: 0.5;
}

.destination-detail-empty {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reasons-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 16px;
}

.reason-item {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    align-items: baseline;
    column-gap: 7px;
    min-height: 18px;
}

.reason-status {
    width: 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.reason-good {
    color: #2e9b55;
}

.reason-neutral {
    color: #d39b25;
}

.reason-poor {
    color: #d9534f;
}

.reason-text {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.reason-value {
    font-size: 11px;
    color: #777;
    text-align: right;
    white-space: nowrap;
}

.origin-dropdown .Select-control {
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 42px;
}

.air-quality-reason {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f0f1f3;
}

.forecast-availability-note {
    margin-top: 4px;
    font-size: 10px;
    line-height: 14px;
    color: #8a8f98;
}

.results-summary-description {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.results-summary-description {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #6b7280;
    font-size: 0.85rem;
}

.forecast-note {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.forecast-note-icon {
    font-size: 0.75rem;
}

.forecast-note-text {
    color: #6b7280;
    font-size: 0.75rem;
}

.results-empty-state {
    padding: 28px 16px;
}

.results-empty-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.results-empty-description {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #6b7280;
}

.accommodation-cta {
    /* margin-top: 20px; */
    padding: 16px 0px;
    border-bottom: 1px solid #e5e7eb;
}

.accommodation-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.accommodation-text {
    font-size: 13px;
    color: #777;
    margin-bottom: 12px;
}

.accommodation-button {
    flex-shrink: 0;
    padding: 9px 14px;
    border: 1px solid #7fcfc3;
    border-radius: 7px;
    background: #e8f7f4;
    color: #246b63;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    /* width: 100%; */
    display: block;
    text-align: center;
    text-decoration: none;
}

.accommodation-button:hover {
    background: #d8f1ed;
}

#destination-map .js-plotly-plot {
    cursor: default;
}

#destination-map .scatterlayer .trace {
    cursor: pointer;
}

/* ==================================================================
   DECISION-ORIENTED DESTINATION DETAIL
   ================================================================== */

.detail-source-context {
    margin-top: 12px; padding-bottom: 16px; border-bottom: 1px solid #eef0f2;
    display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px;
}
.detail-source-badge {
    display: inline-flex; align-items: center; width: fit-content;
    padding: 4px 8px; border-radius: 999px;
    font-size: 10px; line-height: 1.2; font-weight: 700; letter-spacing: 0.03em;
}
.detail-source-badge::before {
    content: ""; width: 6px; height: 6px; margin-right: 6px;
    border-radius: 50%; background: currentColor;
}
.detail-source-forecast { background: #eff6ff; color: #2563eb; }
.detail-source-climatology { background: #f3f4f6; color: #6b7280; }
.detail-source-mixed { background: #f5f3ff; color: #7c3aed; }
.detail-source-unknown { background: #f3f4f6; color: #6b7280; }
.detail-typical-comparison { font-size: 11px; line-height: 1.35; color: #4b5563; }
.detail-source-note {
    flex-basis: 100%; font-size: 11px; line-height: 1.45; color: #8a929d;
}

.detail-reasons-section { margin-top: 18px; }
.detail-reasons-section .reasons-list { margin-top: 0; }

.day-by-day-section { margin-top: 22px; }
.day-by-day-list { display: flex; flex-direction: column; gap: 10px; }
.day-summary-card {
    border: 1px solid #e5e7eb; border-radius: 10px;
    background: #ffffff; overflow: hidden;
}
.day-summary-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 10px 12px 5px;
}
.day-summary-weekday { font-size: 13px; line-height: 1.2; font-weight: 700; color: #111827; }
.day-summary-date {
    margin-top: 2px; font-size: 10px; line-height: 1.2; color: #8a929d;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.day-summary-score { font-size: 19px; line-height: 1; font-weight: 750; color: #111827; }
.day-summary-source {
    margin: 0 12px 9px; font-size: 9px; line-height: 1.2;
    font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase;
}
.day-summary-source-forecast { color: #2563eb; }
.day-summary-source-climatology { color: #8a929d; }
.day-summary-source-mixed { color: #7c3aed; }
.day-summary-source-unknown { color: #9ca3af; }

.dayparts-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border-top: 1px solid #eef0f2;
}
.daypart-card { min-width: 0; padding: 10px 12px 12px; background: #fafbfc; }
.daypart-card + .daypart-card { border-left: 1px solid #e8ebef; }
.daypart-header {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.daypart-name { font-size: 11px; line-height: 1.2; font-weight: 700; color: #374151; }
.daypart-score { font-size: 13px; line-height: 1; font-weight: 700; color: #111827; }
.daypart-source { margin-top: 3px; font-size: 9px; line-height: 1.2; color: #9ca3af; }
.daypart-source-forecast { color: #6b8fc9; }
.daypart-source-climatology { color: #9ca3af; }
.daypart-source-mixed { color: #8b75bd; }
.daypart-conditions { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.daypart-condition {
    min-width: 0; font-size: 11px; line-height: 1.35;
    color: #4b5563; overflow-wrap: anywhere;
}
.daypart-condition:first-child { font-size: 12px; font-weight: 650; color: #111827; }
.daypart-empty { margin-top: 8px; font-size: 11px; color: #9ca3af; }

.best-watch-section { margin-top: 20px; padding-top: 2px; }
.best-watch-section .period-section { margin-top: 14px; }
.best-watch-section .period-section:first-child { margin-top: 0; }
.best-watch-section .period-section-title {
    margin-bottom: 6px; font-size: 10px; line-height: 1.2;
    font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #8a929d;
}
.best-watch-section .period-highlight {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    align-items: center; gap: 8px 12px; padding: 10px 11px;
    border: 1px solid #e5e7eb; border-radius: 9px; background: #fafbfc;
}
.best-watch-section .period-highlight > div:first-child {
    display: flex; align-items: center; gap: 8px; min-width: 0;
}
.best-watch-section .period-best { border-color: #dce9df; background: #f7fbf8; }
.best-watch-section .period-watch { border-color: #f0dfda; background: #fdf9f8; }
.best-watch-section .period-highlight-title { font-size: 12px; font-weight: 650; color: #374151; }
.best-watch-section .period-highlight-score { font-size: 12px; font-weight: 700; color: #111827; }
.period-highlight-reason {
    grid-column: 1 / -1; padding-left: 26px;
    font-size: 11px; line-height: 1.35; color: #7c625d;
}

.destination-detail .travel-metrics {
    margin-top: 20px; padding-top: 18px; border-top: 1px solid #eef0f2;
}
.destination-detail .accommodation-cta { margin-top: 4px; padding-top: 18px; }
.day-by-day-section .empty-state {
    padding: 12px; border: 1px dashed #dfe3e8; border-radius: 8px;
    font-size: 12px; line-height: 1.4; color: #8a929d; background: #fafbfc;
}
.detail-accommodation-button {
    display: inline-block;
    width: auto;
    margin-top: 10px;
    padding: 7px 11px;

    font-size: 11px;
}

@media (max-width: 1100px) and (min-width: 701px) {
    .detail-panel { padding-left: 14px; padding-right: 14px; }
    .daypart-card { padding-left: 9px; padding-right: 9px; }
    .daypart-condition { font-size: 10px; }
    .daypart-condition:first-child { font-size: 11px; }
}
@media (max-width: 700px) {
    .detail-source-context { margin-top: 14px; }
    .day-by-day-list { gap: 12px; }
    .day-summary-header { padding: 12px 14px 6px; }
    .day-summary-source { margin-left: 14px; margin-right: 14px; }
    .daypart-card { padding: 11px 14px 13px; }
}
@media (max-width: 420px) {
    .dayparts-grid { grid-template-columns: 1fr; }
    .daypart-card + .daypart-card { border-left: 0; border-top: 1px solid #e8ebef; }
}

/* NEW LAYOUT */

/* ==================================================================
   WHEN-TO-GO PLANNER
   New activity → destination → time workflow
   ================================================================== */


/* ------------------------------------------------------------------
   Main planner layout
   ------------------------------------------------------------------ */

.planner-layout {
    flex: 1;
    min-height: 0;

    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);

    background: #f7f8fa;
}


/* ------------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------------ */

.planner-sidebar {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;

    padding: 28px 26px 32px;

    box-sizing: border-box;

    background: #ffffff;
    border-right: 1px solid #e5e7eb;

    scrollbar-width: thin;
}


.planner-title {
    margin: 0;

    font-size: 21px;
    line-height: 1.25;

    font-weight: 750;
    letter-spacing: -0.25px;

    color: #111827;
}


.planner-description {
    margin: 7px 0 0;

    font-size: 13px;
    line-height: 1.5;

    color: #6b7280;
}


/* ------------------------------------------------------------------
   Controls
   ------------------------------------------------------------------ */

.planner-control {
    margin-top: 28px;
}


.planner-control .input-label {
    display: block;

    height: auto;
    margin: 0 0 8px;

    font-size: 12px;
    line-height: 1.3;

    font-weight: 700;

    color: #374151;
}


/* ------------------------------------------------------------------
   Dash dropdowns
   ------------------------------------------------------------------ */

.activity-dropdown,
.destination-dropdown,
.trip-days-dropdown {
    width: 100%;
}


.activity-dropdown .Select-control,
.destination-dropdown .Select-control,
.trip-days-dropdown .Select-control {
    min-height: 42px;

    border: 1px solid #d7dce2;
    border-radius: 8px;

    box-shadow: none;

    background: #ffffff;
}


.activity-dropdown .Select-control:hover,
.destination-dropdown .Select-control:hover,
.trip-days-dropdown .Select-control:hover {
    border-color: #aeb6c1;
}


.activity-dropdown.is-focused .Select-control,
.destination-dropdown.is-focused .Select-control,
.trip-days-dropdown.is-focused .Select-control {
    border-color: #6b7280;
    box-shadow: 0 0 0 1px rgba(107, 114, 128, 0.08);
}


.activity-dropdown .Select-placeholder,
.activity-dropdown .Select-value-label,
.destination-dropdown .Select-placeholder,
.destination-dropdown .Select-value-label,
.trip-days-dropdown .Select-placeholder,
.trip-days-dropdown .Select-value-label {
    font-size: 13px;
}


.destination-dropdown .Select-value {
    border-radius: 5px;

    background: #f3f4f6;
    border-color: #e5e7eb;

    color: #374151;
}


/* ------------------------------------------------------------------
   Help text
   ------------------------------------------------------------------ */

.control-help {
    margin: 7px 0 0;

    font-size: 11px;
    line-height: 1.45;

    color: #8a929d;
}


/* ------------------------------------------------------------------
   Selected destinations
   ------------------------------------------------------------------ */

.selected-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 9px;
}


.selected-header .input-label {
    margin: 0;
}


.selected-count {
    flex: 0 0 auto;

    font-size: 10px;
    line-height: 1.2;

    color: #8a929d;
}


.selected-destinations {
    display: flex;
    flex-direction: column;

    gap: 6px;

    max-height: 150px;
    overflow-y: auto;
}


.selected-destination-item {
    padding: 9px 11px;

    border: 1px solid #e5e7eb;
    border-radius: 7px;

    background: #fafbfc;

    font-size: 12px;
    line-height: 1.3;

    font-weight: 600;

    color: #374151;
}


.empty-selection {
    margin: 0;

    padding: 11px;

    border: 1px dashed #dfe3e8;
    border-radius: 7px;

    background: #fafbfc;

    font-size: 11px;
    line-height: 1.4;

    color: #9ca3af;
}


/* ------------------------------------------------------------------
   Primary action
   ------------------------------------------------------------------ */

.planner-sidebar .search-button {
    width: 100%;
    height: 44px;

    margin-top: 30px;

    border: 0;
    border-radius: 8px;

    background: #111827;
    color: #ffffff;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.15s ease,
        opacity 0.15s ease;
}


.planner-sidebar .search-button:hover:not(:disabled) {
    background: #303743;
}


.planner-sidebar .search-button:disabled {
    background: #d1d5db;
    color: #f9fafb;

    cursor: default;
    opacity: 1;
}


/* ------------------------------------------------------------------
   Map
   ------------------------------------------------------------------ */

.planner-map {
    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;

    background: #e5e7eb;
}


.map-header {
    flex: 0 0 auto;

    min-height: 52px;

    padding: 10px 18px;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: center;

    gap: 2px;

    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}


.map-header strong {
    font-size: 12px;
    line-height: 1.3;

    font-weight: 700;

    color: #374151;
}


.map-subtitle {
    font-size: 11px;
    line-height: 1.3;

    color: #8a929d;
}


.map-graph-container {
    flex: 1;
    min-height: 0;
}


.map-graph-container .dash-graph,
#destination-map {
    width: 100%;
    height: 100% !important;
}


/* ------------------------------------------------------------------
   Back button
   ------------------------------------------------------------------ */

.back-button {
    display: inline-flex;
    align-items: center;

    margin: 0 0 24px;
    padding: 0;

    border: 0;

    background: transparent;

    color: #6b7280;

    font-size: 11px;
    line-height: 1.3;

    font-weight: 600;

    cursor: pointer;
}


.back-button:hover {
    color: #111827;
}


/* ------------------------------------------------------------------
   Step 2: selected trip context
   ------------------------------------------------------------------ */

.trip-selection-summary {
    margin-top: 16px;
    padding: 12px 13px;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    background: #fafbfc;
}


.trip-selection-summary > div {
    display: flex;
    flex-direction: column;

    gap: 3px;
}


.trip-summary-destination {
    font-size: 13px;
    line-height: 1.35;

    font-weight: 700;

    color: #111827;
}


.trip-summary-activity {
    font-size: 11px;
    line-height: 1.3;

    color: #6b7280;
}


/* ------------------------------------------------------------------
   Date picker
   ------------------------------------------------------------------ */

#when-date-range {
    width: 100%;
}


#when-date-range .DateRangePicker {
    width: 100%;
}


#when-date-range .DateRangePickerInput {
    width: 100%;

    display: flex;
    align-items: center;

    box-sizing: border-box;

    border: 1px solid #d7dce2;
    border-radius: 8px;

    background: #ffffff;
}


#when-date-range .DateInput {
    flex: 1;
    width: auto;
}


#when-date-range .DateInput_input {
    width: 100%;
    height: 40px;

    box-sizing: border-box;

    padding: 8px 10px;

    border: 0;

    background: transparent;

    font-size: 12px;

    color: #374151;
}


#when-date-range .DateRangePickerInput_arrow {
    padding: 0 3px;

    color: #9ca3af;
}


/* ------------------------------------------------------------------
   Day constraint
   ------------------------------------------------------------------ */

.day-constraint-input {
    display: flex;
    flex-direction: column;

    gap: 9px;
}


.day-constraint-input label {
    display: flex !important;
    align-items: center;

    gap: 8px;

    margin: 0 !important;

    font-size: 12px;
    line-height: 1.35;

    color: #4b5563;

    cursor: pointer;
}


.day-constraint-input input {
    margin: 0;
}


/* ------------------------------------------------------------------
   Custom weekdays
   ------------------------------------------------------------------ */

.custom-weekdays-container {
    margin-top: 12px;
}


/* ------------------------------------------------------------------
   Errors
   ------------------------------------------------------------------ */

.planner-sidebar .error-message {
    margin-top: 10px;

    font-size: 11px;
    line-height: 1.4;

    color: #b91c1c;
}


/* ------------------------------------------------------------------
   Future when-to-go results
   ------------------------------------------------------------------ */

.when-results-section {
    flex: 0 0 auto;

    padding: 28px;

    background: #f7f8fa;

    border-top: 1px solid #e5e7eb;
}


/* ==================================================================
   RESPONSIVE
   ================================================================== */


@media (max-width: 1000px) and (min-width: 701px) {

    .planner-layout {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .planner-sidebar {
        padding: 24px 20px 28px;
    }
}


@media (max-width: 700px) {

    body {
        overflow: auto;
    }

    #_dash-app-content,
    .app-shell {
        height: auto;
        min-height: 100vh;

        overflow: visible;
    }

    .header {
        height: auto;
        min-height: 60px;

        padding: 14px 18px;
    }

    .header-content {
        align-items: flex-start;
        flex-direction: column;

        gap: 3px;
    }

    .tagline {
        font-size: 11px;
    }

    .main {
        display: block;
    }

    .planner-layout {
        display: flex;
        flex-direction: column;
    }

    .planner-sidebar {
        order: 1;

        overflow: visible;

        padding: 22px 18px 26px;

        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .planner-map {
        order: 2;

        height: 55vh;
        min-height: 420px;
    }

    .planner-control {
        margin-top: 24px;
    }

    .map-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    .when-results-section {
        padding: 22px 18px;
    }
}

/* ==================================================================
   WHEN-TO-GO OPPORTUNITIES
   ================================================================== */

.when-results-list {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(280px, 1fr)
    );
    gap: 12px;
}


.when-opportunity-card {
    min-width: 0;

    padding: 16px 17px 15px;

    background: #ffffff;

    border: 1px solid #e2e6ea;
    border-radius: 10px;

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}


.when-opportunity-card:hover {
    border-color: #c7cdd5;

    box-shadow:
        0 5px 16px rgba(0, 0, 0, 0.055);

    transform: translateY(-1px);
}


/* Header ---------------------------------------------------------- */

.when-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 14px;
}


.when-card-date-group {
    min-width: 0;

    display: flex;
    align-items: baseline;

    gap: 8px;
}


.when-card-rank {
    flex: 0 0 auto;

    font-size: 10px;
    line-height: 1;

    font-weight: 700;

    color: #a0a7b1;
}


.when-card-date {
    font-size: 15px;
    line-height: 1.2;

    font-weight: 750;
    letter-spacing: 0.015em;

    color: #111827;
}


/* Score ----------------------------------------------------------- */

.when-card-score {
    flex: 0 0 auto;

    display: flex;
    align-items: baseline;

    gap: 2px;
}


.when-card-score-value {
    font-size: 20px;
    line-height: 1;

    font-weight: 750;

    color: #111827;
}


.when-card-score-max {
    font-size: 9px;

    color: #9ca3af;
}


/* Destination ----------------------------------------------------- */

.when-card-destination {
    margin-top: 9px;

    font-size: 13px;
    line-height: 1.3;

    font-weight: 650;

    color: #374151;
}


/* Suitability ----------------------------------------------------- */

.when-card-suitability {
    margin-top: 13px;

    font-size: 12px;
    line-height: 1.35;

    color: #6b7280;
}


.when-card-suitability strong {
    font-weight: 700;

    color: #2f7d4a;
}


/* Context --------------------------------------------------------- */

.when-card-context {
    margin-top: 5px;

    font-size: 10px;
    line-height: 1.35;

    color: #9ca3af;
}

/* ==================================================================
   SEASONAL OVERVIEW
   ================================================================== */

.seasonal-overview {
    margin-bottom: 34px;
    padding: 20px 22px 14px;

    background: #ffffff;
    border: 1px solid #e2e6ea;
    border-radius: 11px;
}


.seasonal-header {
    margin-bottom: 6px;
}


.seasonal-title {
    margin: 0;

    font-size: 18px;
    line-height: 1.25;

    font-weight: 750;

    color: #111827;
}


.seasonal-description {
    margin: 5px 0 0;

    font-size: 12px;
    line-height: 1.4;

    color: #6b7280;
}


.seasonal-chart {
    width: 100%;
    height: 270px;
}


.seasonal-note {
    margin-top: -3px;

    font-size: 10px;
    line-height: 1.35;

    color: #9ca3af;
}


.travel-opportunities {
    margin-top: 0;
}


@media (max-width: 700px) {

    .seasonal-overview {
        padding: 17px 12px 12px;
    }

    .seasonal-chart {
        height: 240px;
    }
}

/* Right side of the planner */
.planner-content {
    min-width: 0;
    width: 100%;
}

/* Map + recommendation sidebar */
.planner-main-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
}

/* Seasonal section exists only when Dash makes it visible */
.seasonal-results-section {
    width: 100%;
    padding: 18px 24px 20px;
    background: #f7f8fa;
    border-top: 1px solid #e5e7eb;
    display: none;
}

.planner-map {
    min-width: 0;
}

.when-opportunities-sidebar {
    min-width: 0;

    padding: 20px 16px;

    background: #f8f9fa;
    border-left: 1px solid #e5e7eb;

    overflow-y: auto;
    max-height: 620px;
}

.opportunities-sidebar-header {
    margin-bottom: 14px;
}

.opportunities-sidebar-title {
    margin: 0;

    font-size: 16px;
    font-weight: 750;

    color: #111827;
}

.opportunities-sidebar-description {
    margin: 4px 0 0;

    font-size: 10px;

    color: #9ca3af;
}

.opportunities-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.when-opportunities-sidebar .when-opportunity-card {
    padding: 13px 14px;
}

.when-opportunities-sidebar .when-card-date {
    font-size: 13px;
}

.when-opportunities-sidebar .when-card-score-value {
    font-size: 17px;
}

.when-opportunities-sidebar .when-card-destination {
    margin-top: 6px;
}

.when-opportunities-sidebar .when-card-suitability {
    margin-top: 9px;
}

.when-opportunities-sidebar .when-card-context {
    display: none;
}

.seasonal-overview {
    padding: 16px 18px 10px;

    background: #ffffff;

    border: 1px solid #e2e6ea;
    border-radius: 10px;
}

.seasonal-chart {
    width: 100%;
    height: 190px;
}

/* Trip pattern radio controls ------------------------------------- */
.trip-weekday-radios,
.trip-duration-radios {
    display: grid;
    gap: 6px;
    width: 100%;
    min-width: 0;
    font-family: inherit;
}

.trip-weekday-radios {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trip-duration-radios {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.trip-weekday-radios label,
.trip-duration-radios label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 36px;
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    background: #ffffff;
    color: #475467;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease,
                color 0.15s ease, box-shadow 0.15s ease;
}

.trip-weekday-radios input[type="radio"],
.trip-duration-radios input[type="radio"] {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin: 0;
    accent-color: #246b63;
    cursor: pointer;
}

.trip-weekday-radios label:hover,
.trip-duration-radios label:hover {
    background: #f8fafc;
    border-color: #aeb7c4;
    color: #1f2937;
}

.trip-weekday-radios label:has(input:checked),
.trip-duration-radios label:has(input:checked) {
    border-color: #9bd8cf;
    background: #eaf8f5;
    color: #246b63;
}

.trip-weekday-radios label:has(input:focus-visible),
.trip-duration-radios label:has(input:focus-visible) {
    outline: 2px solid #7fcfc3;
    outline-offset: 2px;
}

.trip-weekday-radios label:has(input:disabled),
.trip-duration-radios label:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}
