/* ============================================
   Scotland Aurora Borealis Forecast - Page Styles
   ============================================ */

/* Probability Level Colours */
:root {
    --aurora-0: #4a4a5a;     /* Very Unlikely - muted grey */
    --aurora-0-bg: #f0f0f4;
    --aurora-0-text: #4a4a5a;
    --aurora-1: #6366f1;     /* Unlikely - indigo */
    --aurora-1-bg: #eef2ff;
    --aurora-1-text: #3730a3;
    --aurora-2: #8b5cf6;     /* Possible - purple */
    --aurora-2-bg: #f5f3ff;
    --aurora-2-text: #5b21b6;
    --aurora-3: #22d3ee;     /* Likely - cyan */
    --aurora-3-bg: #ecfeff;
    --aurora-3-text: #155e75;
    --aurora-4: #10b981;     /* Very Likely - green */
    --aurora-4-bg: #ecfdf5;
    --aurora-4-text: #065f46;
    --aurora-5: #34d399;     /* Excellent - bright green */
    --aurora-5-bg: #d1fae5;
    --aurora-5-text: #064e3b;
}

.aurora-section-title {
    text-align: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--scottish-blue-deep);
    margin-bottom: 1.5rem;
}

/* ============================================
   Night Selector
   ============================================ */
.aurora-night-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0.25rem 0;
}

.aurora-night-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 1.5rem;
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.15);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.aurora-night-btn:hover {
    border-color: var(--scottish-blue);
    background: var(--highland-mist);
}

.aurora-night-btn.active {
    background: var(--scottish-blue);
    color: var(--saltire-white);
    border-color: var(--scottish-blue);
}

.aurora-night-day {
    font-size: 0.85rem;
    font-weight: 600;
}

.aurora-night-date {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* ============================================
   Map + Detail Layout
   ============================================ */
.aurora-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 1024px) {
    .aurora-layout {
        grid-template-columns: 3fr 2fr;
    }
}

/* ============================================
   SVG Map Container
   ============================================ */
.aurora-map-container {
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.aurora-svg-map {
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

/* Map Marker Circles */
.aurora-svg-map circle[data-region] {
    cursor: pointer;
    fill: #e2e8f0;
    stroke: #fff;
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
    transition: fill 0.3s ease, stroke-width 0.2s ease, filter 0.2s ease;
}

.aurora-svg-map circle[data-region]:hover {
    stroke-width: 3.5;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.aurora-svg-map circle[data-region].selected {
    stroke-width: 4;
    stroke: #fff;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.4));
}

/* Score Number Inside Markers */
.aurora-marker-score {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    fill: #fff;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}

/* Region Name Labels */
.aurora-map-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    fill: var(--scottish-blue-deep);
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 3;
    paint-order: stroke fill;
    pointer-events: none;
    text-anchor: middle;
    font-weight: 600;
}

/* ============================================
   Legend
   ============================================ */
.aurora-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding: 1.25rem 0 0;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(26, 58, 92, 0.08);
}

.aurora-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--stone-grey);
}

.aurora-legend-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================
   Kp Gauge
   ============================================ */
.aurora-kp-gauge {
    max-width: 700px;
    margin: 0 auto 2rem;
    text-align: center;
}
.aurora-kp-gauge-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--scottish-blue-deep, #0f2540);
    margin-bottom: 1rem;
}
.aurora-kp-bar {
    margin: 0 auto;
}
.aurora-kp-bar-track {
    position: relative;
    width: 100%;
    height: 24px;
    border-radius: 12px;
    overflow: visible;
    display: flex;
}
.aurora-kp-band {
    position: absolute;
    top: 0;
    height: 100%;
}
.aurora-kp-band:first-child { border-radius: 12px 0 0 12px; }
.aurora-kp-band:nth-child(9) { border-radius: 0 12px 12px 0; }
.aurora-kp-band[data-level="quiet-low"]     { background: #4a5568; }
.aurora-kp-band[data-level="quiet"]         { background: #5a6577; }
.aurora-kp-band[data-level="unsettled-low"] { background: #6366f1; }
.aurora-kp-band[data-level="unsettled"]     { background: #7c3aed; }
.aurora-kp-band[data-level="active"]        { background: #8b5cf6; }
.aurora-kp-band[data-level="minor-storm"]   { background: #06b6d4; }
.aurora-kp-band[data-level="moderate-storm"]{ background: #10b981; }
.aurora-kp-band[data-level="major-storm"]   { background: #34d399; }
.aurora-kp-band[data-level="severe-storm"]  { background: #f59e0b; }

.aurora-kp-marker {
    position: absolute;
    top: -8px;
    width: 6px;
    height: 40px;
    background: var(--scottish-blue-deep, #0f2540);
    border-radius: 3px;
    transform: translateX(-50%);
    transition: left 0.6s ease;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.aurora-kp-marker-value {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--scottish-blue-deep, #0f2540);
    white-space: nowrap;
}
.aurora-kp-labels {
    display: flex;
    justify-content: space-between;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.4rem;
    padding: 0 0.5%;
}
.aurora-kp-summary {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #374151;
}
.aurora-kp-status {
    font-weight: 700;
    color: var(--scottish-blue-deep, #0f2540);
    margin-right: 0.5rem;
}
.aurora-kp-description {
    color: #6b7280;
}

/* ============================================
   Detail Panel
   ============================================ */
.aurora-detail-panel {
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 12px;
    padding: 2rem;
}

@media (min-width: 1024px) {
    .aurora-detail-panel {
        position: sticky;
        top: 90px;
        align-self: start;
    }
}

.aurora-detail-region h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--scottish-blue-deep);
    margin: 0 0 0.25rem;
}

.aurora-detail-subtitle {
    font-size: 0.9rem;
    color: var(--stone-grey);
    margin: 0 0 1.5rem;
}

/* Score Display */
.aurora-score-display {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.aurora-detail-score {
    font-family: 'DM Sans', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    transition: color 0.3s ease;
}

.aurora-detail-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    margin: 0.75rem 0;
    overflow: hidden;
}

.aurora-detail-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease, background-color 0.3s ease;
    width: 0%;
}

.aurora-detail-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.3s ease;
}

.aurora-detail-desc {
    font-size: 0.9rem;
    color: var(--stone-grey);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Conditions Breakdown */
.aurora-conditions-breakdown {
    margin-bottom: 1.5rem;
}

.aurora-conditions-breakdown h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stone-grey);
    margin: 0 0 0.75rem;
}

.aurora-condition-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(26, 58, 92, 0.06);
    font-size: 0.9rem;
}

.aurora-condition-row:last-child {
    border-bottom: none;
}

.aurora-condition-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--peat);
}

.aurora-condition-label svg {
    flex-shrink: 0;
    color: var(--stone-grey);
}

.aurora-condition-value {
    font-weight: 500;
    color: var(--scottish-blue-deep);
}

/* Tips */
.aurora-tips {
    background: var(--highland-mist);
    border-radius: 8px;
    padding: 1.25rem;
}

.aurora-tips h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stone-grey);
    margin: 0 0 0.5rem;
}

.aurora-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aurora-tips li {
    font-size: 0.85rem;
    color: var(--peat);
    padding: 0.3rem 0;
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.5;
}

.aurora-tips li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--stone-grey);
}

/* ============================================
   Region Cards
   ============================================ */
.aurora-region-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 0 0 3rem;
}

.aurora-region-card {
    padding: 1.25rem 1rem;
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
}

.aurora-region-card:hover {
    box-shadow: 0 4px 16px rgba(26, 58, 92, 0.1);
    transform: translateY(-2px);
}

.aurora-region-card.selected {
    border-color: var(--scottish-blue);
    box-shadow: 0 0 0 2px var(--scottish-blue);
}

.aurora-card-score {
    font-family: 'DM Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.aurora-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--scottish-blue-deep);
    margin-bottom: 0.15rem;
}

.aurora-card-subtitle {
    font-size: 0.75rem;
    color: var(--stone-grey);
    margin-bottom: 0.5rem;
}

.aurora-card-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* ============================================
   Tooltip
   ============================================ */
.aurora-tooltip {
    position: fixed;
    pointer-events: none;
    background: var(--scottish-blue-deep);
    color: var(--saltire-white);
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.aurora-tooltip.visible {
    opacity: 1;
}

/* ============================================
   Email Signup
   ============================================ */
.aurora-email-signup {
    max-width: 560px;
    margin: 0 auto 3rem;
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.aurora-email-signup h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--scottish-blue-deep);
    margin: 0 0 0.5rem;
}

.aurora-email-signup p {
    font-size: 0.9rem;
    color: var(--stone-grey);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.aurora-email-form {
    display: flex;
    gap: 0.5rem;
    max-width: 420px;
    margin: 0 auto;
}

.aurora-email-form input[type="email"] {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(26, 58, 92, 0.15);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.aurora-email-form input[type="email"]:focus {
    border-color: var(--scottish-blue);
}

.aurora-email-form button {
    padding: 0.7rem 1.5rem;
    background: var(--scottish-blue);
    color: var(--saltire-white);
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.aurora-email-form button:hover {
    background: var(--scottish-blue-deep);
}

/* ============================================
   Info / SEO Content
   ============================================ */
.aurora-info-section {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 2rem 0;
}

.aurora-info-section h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    color: var(--scottish-blue-deep);
    margin-bottom: 1rem;
}

.aurora-info-section h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    color: var(--scottish-blue-deep);
    margin: 1.5rem 0 0.75rem;
}

.aurora-info-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--peat);
    margin-bottom: 1rem;
}

.aurora-info-section ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.aurora-info-section li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--peat);
    margin-bottom: 0.5rem;
}

/* ============================================
   FAQ
   ============================================ */
.aurora-faq {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.aurora-faq h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    color: var(--scottish-blue-deep);
    margin-bottom: 1.25rem;
    text-align: center;
}

.aurora-faq-item {
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.aurora-faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 500;
    color: var(--scottish-blue-deep);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.aurora-faq-item summary::-webkit-details-marker {
    display: none;
}

.aurora-faq-item summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--stone-grey);
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.2s ease;
}

.aurora-faq-item[open] summary::after {
    content: '\2212';
}

.aurora-faq-item summary:hover {
    background: var(--highland-mist);
}

.aurora-faq-item p {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--peat);
    margin: 0;
}

/* ============================================
   Alert Signup
   ============================================ */
.aurora-alert-signup {
    max-width: 700px;
    margin: 2.5rem auto;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #0f2540 0%, #1a3a5c 50%, #1e3a5f 100%);
    border-radius: 16px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.aurora-alert-signup::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(34,197,94,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.aurora-alert-icon {
    margin-bottom: 0.75rem;
    opacity: 0.7;
}
.aurora-alert-icon svg {
    color: #34d399;
}
.aurora-alert-signup h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: #fff;
}
.aurora-alert-signup p {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}
.aurora-alert-form {
    position: relative;
    z-index: 1;
}
.aurora-alert-fields {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    max-width: 560px;
    margin: 0 auto;
}
.aurora-alert-fields input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 0.7rem 1rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.2s;
}
.aurora-alert-fields input[type="email"]::placeholder {
    color: rgba(255,255,255,0.5);
}
.aurora-alert-fields input[type="email"]:focus {
    outline: none;
    border-color: #34d399;
    background: rgba(255,255,255,0.15);
}
.aurora-alert-fields select {
    padding: 0.7rem 0.85rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.85rem;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}
.aurora-alert-fields select:focus {
    outline: none;
    border-color: #34d399;
}
.aurora-alert-fields select option {
    background: #1a3a5c;
    color: #fff;
}
.aurora-alert-submit {
    padding: 0.7rem 1.5rem;
    background: #34d399;
    color: #0f2540;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}
.aurora-alert-submit:hover {
    background: #22c55e;
    transform: translateY(-1px);
}
.aurora-alert-note {
    font-size: 0.75rem !important;
    opacity: 0.55 !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 640px) {
    .aurora-night-selector {
        gap: 0.4rem;
    }

    .aurora-night-btn {
        padding: 0.5rem 1rem;
        flex: 1;
        min-width: 0;
    }

    .aurora-night-day {
        font-size: 0.78rem;
    }

    .aurora-night-date {
        font-size: 0.68rem;
    }

    .aurora-region-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .aurora-detail-panel {
        padding: 1.5rem;
    }

    .aurora-detail-score {
        font-size: 2.8rem;
    }

    .aurora-map-container {
        padding: 1rem;
    }

    .aurora-email-form {
        flex-direction: column;
    }

    .aurora-email-form button {
        width: 100%;
    }
}
