/* City Forecast Page Styles — dark theme, phone mockup, mobile-first */

/* ── Page container ──────────────────────────────────── */
.forecast-page {
    width: 100%;
    margin: 0 auto;
}

/* Override global h2 { max-width: 11ch } from styles.css */
.forecast-page h2 {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

/* ── Hero ─────────────────────────────────────────────── */
.forecast-hero {
    padding: 80px 20px 24px;
    text-align: center;
}

.forecast-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--aurora);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 6px;
}

.forecast-hero h1 {
    font-family: "Space Grotesk", "Manrope", sans-serif;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 12px;
}

.forecast-hero h1 .city-highlight {
    color: var(--aurora);
}

/* ── Share button ────────────────────────────────────── */
.forecast-share-row {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 20px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition);
    text-decoration: none;
}

.share-button:hover {
    border-color: var(--aurora);
    color: var(--text);
}

.share-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.forecast-hero-subtitle {
    font-size: 16px;
    color: var(--text-soft);
    max-width: 480px;
    margin: 0 auto;
}

/* ── Educational Section ─────────────────────────────── */
.edu-section {
    padding: 0 20px 48px;
    max-width: 720px;
    margin: 0 auto;
}

.edu-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    text-align: center;
}

.edu-section p {
    font-size: 15px;
    color: var(--text-soft);
    line-height: 1.7;
    margin-bottom: 16px;
}

.edu-section p:last-child {
    margin-bottom: 0;
}

.edu-section h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin: 28px 0 10px;
}

.edu-section h3:first-of-type {
    margin-top: 0;
}

.edu-section strong {
    color: var(--text);
    font-weight: 600;
}

.edu-factors {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.edu-factors li {
    font-size: 15px;
    color: var(--text-soft);
    line-height: 1.7;
    padding: 6px 0 6px 20px;
    position: relative;
}

.edu-factors li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent, #00E5A0);
}

.edu-highlight {
    background: rgba(0, 229, 160, 0.08);
    border-left: 3px solid var(--accent, #00E5A0);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

/* ── Primary CTA ──────────────────────────────────────── */
.cta-primary {
    padding: 0 20px 40px;
}

.cta-primary-inner {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
}

.cta-primary h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.cta-advantages {
    list-style: none;
    text-align: left;
    max-width: 400px;
    margin: 0 auto 24px;
}

.cta-advantages li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-soft);
    line-height: 1.5;
}

.cta-advantages li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--aurora);
    font-weight: 700;
}

.cta-factors-note {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.cta-primary .app-store-button,
.cta-secondary .app-store-button {
    margin-top: 8px;
}

.cta-button-sm {
    display: inline-block;
    background: var(--aurora);
    color: #000;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    margin-top: 12px;
    transition: opacity var(--transition-fast);
}

.cta-button-sm:hover {
    opacity: 0.85;
}

/* ── Phone Mockup ─────────────────────────────────────── */
.forecast-phone-section {
    padding: 0 20px 48px;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 100%;
    max-width: 375px;
}

.phone-bezel {
    background: #1a1a2e;
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.08),
        0 30px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
}

.phone-notch {
    width: 120px;
    height: 28px;
    background: #1a1a2e;
    border-radius: 0 0 18px 18px;
    margin: 0 auto 8px;
    position: relative;
    z-index: 2;
}

.phone-screen {
    background: linear-gradient(180deg, #0a1220 0%, #08111d 100%);
    border-radius: 28px;
    min-height: 500px;
    padding: 20px 16px;
    overflow: hidden;
}

.phone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.phone-city {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.phone-updated {
    font-size: 11px;
    color: var(--text-muted);
}

.phone-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-soft);
    margin: 20px 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading state */
.phone-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-muted);
    font-size: 14px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--line);
    border-top-color: var(--aurora);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error state */
.phone-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Night cards (inside phone) ───────────────────────── */
.night-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}

.night-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.night-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.night-card-date {
    font-size: 12px;
    color: var(--text-muted);
}

.night-card-peak {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

/* ── Locked night cards ──────────────────────────────── */
.night-card-locked {
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.night-card-locked .night-card-header {
    margin-bottom: 0;
}

.locked-badge {
    color: var(--text-muted) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.locked-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 0 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.locked-overlay svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* Hourly bars */
.hourly-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 48px;
}

.hourly-bar {
    flex: 1;
    min-width: 0;
    border-radius: 3px 3px 0 0;
    transition: height var(--transition);
}

.hourly-labels {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}

.hourly-label {
    flex: 1;
    min-width: 0;
    font-size: 8px;
    color: var(--text-muted);
    text-align: center;
}

/* ── Score colors (matching app gradient: dark → teal → green) ── */
/* App gradient: #1A2A38 (0%) → #2A5A6E (50%) → #3DC9A0 (100%) */
.score-bg-0   { background: rgba(255, 255, 255, 0.04); }
.score-bg-10  { background: #1E3040; }
.score-bg-20  { background: #213A4D; }
.score-bg-30  { background: #25455A; }
.score-bg-40  { background: #285067; }
.score-bg-50  { background: #2A5A6E; }
.score-bg-60  { background: #2E7079; }
.score-bg-70  { background: #328684; }
.score-bg-80  { background: #369C8F; }
.score-bg-90  { background: #3AB298; }
.score-bg-100 { background: #3DC9A0; }

.score-color-low    { color: #6E8A98; background: rgba(42, 90, 110, 0.25); }
.score-color-medium { color: #2E9E8A; background: rgba(42, 90, 110, 0.25); }
.score-color-high   { color: #3DC9A0; background: rgba(61, 201, 160, 0.2); }

/* ── 30-Night Outlook (outside phone) ─────────────────── */
.forecast-outlook-section {
    padding: 0 20px 48px;
    max-width: 900px;
    margin: 0 auto;
}

.forecast-outlook-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    text-align: center;
}

.outlook-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 20px;
}

.daily-grid-30 {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

/* Fog of war cards */
.daily-card-fog {
    filter: blur(var(--fog-blur, 2px));
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
}

.daily-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}

.daily-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.daily-score {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.daily-kp {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Secondary CTA ────────────────────────────────────── */
.cta-secondary {
    padding: 48px 20px;
    text-align: center;
}

.cta-secondary-inner {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(83, 230, 189, 0.08), rgba(45, 154, 255, 0.08));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
}

.cta-secondary h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.cta-secondary p {
    font-size: 15px;
    color: var(--text-soft);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ── Other Cities ─────────────────────────────────────── */
.other-cities {
    padding: 48px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.other-cities h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    text-align: center;
}

.other-cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.city-link {
    display: block;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
    transition: border-color var(--transition), color var(--transition);
}

.city-link:hover {
    border-color: var(--aurora);
    color: var(--text);
}

.fog-score {
    color: var(--text-muted) !important;
    background: none !important;
}

/* ── Country Page City Cards ──────────────────────────── */
.country-cities {
    padding: 0 20px 48px;
    max-width: 900px;
    margin: 0 auto;
}

.country-cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.country-city-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--transition), transform var(--transition);
}

.country-city-card:hover {
    border-color: var(--aurora);
    transform: translateY(-2px);
}

.country-city-name {
    font-size: 17px;
    font-weight: 600;
}

.country-city-stats {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Mobile responsive ────────────────────────────────── */
@media (max-width: 768px) {
    .forecast-hero {
        padding: 70px 16px 20px;
    }

    .cta-primary-inner,
    .cta-secondary-inner {
        padding: 24px 20px;
    }

    .daily-grid-30 {
        grid-template-columns: repeat(5, 1fr);
    }

    .other-cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .country-cities-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .daily-grid-30 {
        grid-template-columns: repeat(4, 1fr);
    }

    .phone-mockup {
        max-width: 100%;
    }

    .phone-bezel {
        border-radius: 32px;
        padding: 8px;
    }

    .phone-screen {
        border-radius: 24px;
        padding: 16px 12px;
    }
}
