/* ============================================
   EVENT DETAIL — Technical Seismic Report
   Clean, scientific, instrument-grade.
   ============================================ */

/* ── Hero Section ── */
.ed-hero {
    background: rgba(0, 8, 16, 0.92);
    border-bottom: 1px solid rgba(0, 229, 255, 0.12);
    padding: 20px 28px 20px;
    position: relative;
}

.ed-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--event-color, #ef4444) 30%, transparent 70%);
    opacity: 0.5;
}

.ed-hero-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.ed-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid rgba(0, 229, 255, 0.15);
    background: rgba(0, 12, 24, 0.6);
    color: rgba(0, 229, 255, 0.5);
    cursor: pointer;
    font-size: 0.6rem;
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.15s;
}

.ed-back-btn:hover {
    background: rgba(0, 229, 255, 0.06);
    color: rgba(0, 229, 255, 0.8);
    border-color: rgba(0, 229, 255, 0.3);
}

/* ── Hero Header ── */
.ed-hero-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 4px;
}

.ed-hero-mag {
    font-size: 2.8rem;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    line-height: 1;
    color: var(--event-color, #ef4444);
    text-shadow: 0 0 20px color-mix(in srgb, var(--event-color, #ef4444) 25%, transparent);
}

.ed-hero-place {
    font-size: 0.85rem;
    color: rgba(0, 229, 255, 0.7);
    font-weight: 600;
    font-family: var(--font-mono, monospace);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ed-hero-time {
    font-size: 0.6rem;
    color: rgba(0, 229, 255, 0.3);
    font-family: var(--font-mono, monospace);
    margin-top: 6px;
    letter-spacing: 0.03em;
}

.ed-hero-usgs-link {
    font-size: 0.55rem;
    color: rgba(0, 229, 255, 0.25);
    font-family: var(--font-mono, monospace);
    text-decoration: none;
    margin-top: 4px;
    display: inline-block;
    letter-spacing: 0.02em;
}

.ed-hero-usgs-link:hover {
    color: rgba(0, 229, 255, 0.5);
}

/* ── Stats Strip ── */
.ed-stats-strip {
    display: flex;
    gap: 0;
    margin-top: 16px;
    border: 1px solid rgba(0, 229, 255, 0.1);
    overflow: hidden;
    background: rgba(0, 12, 24, 0.5);
}

.ed-stat {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    border-right: 1px solid rgba(0, 229, 255, 0.06);
}

.ed-stat:last-child {
    border-right: none;
}

.ed-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    color: rgba(0, 229, 255, 0.8);
    line-height: 1.2;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

.ed-stat-label {
    font-size: 0.45rem;
    color: rgba(0, 229, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-mono, monospace);
    margin-top: 4px;
}

/* ── Content Layout ── */
.ed-content {
    padding: 20px 28px;
    max-width: 1400px;
    margin: 0 auto;
}

.ed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Section Label ── */
.ed-section-label {
    font-size: 0.55rem;
    font-weight: 600;
    color: rgba(0, 229, 255, 0.4);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: var(--font-mono, monospace);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

/* ── Map Card ── */
.ed-map-card {
    background: rgba(0, 12, 24, 0.7);
    border: 1px solid rgba(0, 229, 255, 0.1);
    overflow: hidden;
    position: relative;
    grid-column: 1 / -1;
}

.ed-map-card::before {
    content: 'EPICENTER';
    position: absolute;
    top: 10px;
    left: 14px;
    font-size: 0.45rem;
    font-family: var(--font-mono, monospace);
    color: rgba(0, 229, 255, 0.3);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 451;
    text-shadow: 0 0 6px rgba(0, 229, 255, 0.15);
}

.ed-map {
    width: 100%;
    height: 420px;
}

.ed-map-caption {
    padding: 8px 14px;
    font-size: 0.55rem;
    color: rgba(0, 229, 255, 0.35);
    font-family: var(--font-mono, monospace);
    border-top: 1px solid rgba(0, 229, 255, 0.06);
    letter-spacing: 0.02em;
    display: flex;
    justify-content: space-between;
}

/* ── Tectonic Context ── */
.ed-tectonic-card {
    background: rgba(0, 12, 24, 0.5);
    border: 1px solid rgba(0, 229, 255, 0.08);
    padding: 16px;
}

.ed-tectonic-text {
    font-size: 0.65rem;
    color: rgba(0, 229, 255, 0.5);
    line-height: 1.7;
    font-family: var(--font-mono, monospace);
}

/* ── Technical Parameters Table ── */
.ed-params-card {
    background: rgba(0, 12, 24, 0.5);
    border: 1px solid rgba(0, 229, 255, 0.08);
    padding: 16px;
}

.ed-params-table {
    width: 100%;
    border-collapse: collapse;
}

.ed-params-table tr {
    border-bottom: 1px solid rgba(0, 229, 255, 0.04);
}

.ed-params-table tr:last-child {
    border-bottom: none;
}

.ed-params-table td {
    padding: 6px 0;
    font-size: 0.6rem;
    font-family: var(--font-mono, monospace);
    vertical-align: top;
}

.ed-params-table td:first-child {
    color: rgba(0, 229, 255, 0.3);
    padding-right: 16px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: 120px;
}

.ed-params-table td:last-child {
    color: rgba(0, 229, 255, 0.65);
}

/* ── USGS Product Cards ── */
.ed-products-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.ed-product-card {
    background: rgba(0, 12, 24, 0.5);
    border: 1px solid rgba(0, 229, 255, 0.08);
    overflow: hidden;
}

.ed-product-card-header {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ed-product-card-title {
    font-size: 0.5rem;
    font-weight: 600;
    color: rgba(0, 229, 255, 0.4);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--font-mono, monospace);
}

.ed-product-card-source {
    font-size: 0.45rem;
    color: rgba(0, 229, 255, 0.2);
    font-family: var(--font-mono, monospace);
}

.ed-product-img {
    width: 100%;
    display: block;
    background: #0a0a0f;
}

.ed-product-caption {
    padding: 8px 14px;
    font-size: 0.5rem;
    color: rgba(0, 229, 255, 0.25);
    font-family: var(--font-mono, monospace);
    border-top: 1px solid rgba(0, 229, 255, 0.04);
}

.ed-usgs-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: rgba(0, 229, 255, 0.4);
    font-family: var(--font-mono, monospace);
    font-size: 0.55rem;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.15s;
}

.ed-usgs-link:hover {
    color: rgba(0, 229, 255, 0.7);
}

/* ── Tectonic Summary (from USGS) ── */
.ed-tectonic-summary {
    grid-column: 1 / -1;
    background: rgba(0, 12, 24, 0.5);
    border: 1px solid rgba(0, 229, 255, 0.08);
    padding: 20px;
}

.ed-tectonic-summary-text {
    font-size: 0.65rem;
    color: rgba(0, 229, 255, 0.5);
    line-height: 1.8;
    font-family: var(--font-mono, monospace);
    max-height: 200px;
    overflow-y: auto;
}

.ed-tectonic-summary-text a {
    color: rgba(0, 229, 255, 0.6);
}

.ed-tectonic-summary-text p {
    margin: 0 0 8px;
}

/* ── Impact Section ── */
.ed-impact {
    grid-column: 1 / -1;
}

.ed-impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.ed-impact-card {
    background: rgba(0, 12, 24, 0.5);
    border: 1px solid rgba(0, 229, 255, 0.08);
    padding: 14px;
    text-align: center;
}

.ed-impact-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    line-height: 1;
    text-shadow: 0 0 12px currentColor;
}

.ed-impact-label {
    font-size: 0.45rem;
    color: rgba(0, 229, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-mono, monospace);
    margin-top: 6px;
}

/* ── Nearby Events ── */
.ed-nearby {
    grid-column: 1 / -1;
}

.ed-nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.ed-nearby-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(0, 12, 24, 0.4);
    border: 1px solid rgba(0, 229, 255, 0.06);
    cursor: pointer;
    transition: all 0.15s;
}

.ed-nearby-item:hover {
    background: rgba(0, 229, 255, 0.04);
    border-color: rgba(0, 229, 255, 0.15);
}

.ed-nearby-mag {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    min-width: 44px;
    text-align: center;
}

.ed-nearby-info {
    flex: 1;
    min-width: 0;
}

.ed-nearby-place {
    font-size: 0.6rem;
    color: rgba(0, 229, 255, 0.6);
    font-family: var(--font-mono, monospace);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ed-nearby-meta {
    font-size: 0.5rem;
    color: rgba(0, 229, 255, 0.25);
    font-family: var(--font-mono, monospace);
    margin-top: 2px;
}

/* ── Loading ── */
.ed-loading {
    text-align: center;
    padding: 48px;
    color: rgba(0, 229, 255, 0.3);
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    letter-spacing: 0.04em;
}

.ed-loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(0, 229, 255, 0.08);
    border-top-color: rgba(0, 229, 255, 0.4);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: ed-spin 0.8s linear infinite;
}

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

/* ── Focal Mechanism ── */
.ed-focal-card {
    background: rgba(0, 12, 24, 0.5);
    border: 1px solid rgba(0, 229, 255, 0.08);
    padding: 16px;
    text-align: center;
}

.ed-focal-svg {
    display: block;
    margin: 8px auto;
}

.ed-focal-caption {
    font-size: 0.5rem;
    color: rgba(0, 229, 255, 0.25);
    font-family: var(--font-mono, monospace);
    margin-top: 8px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .ed-grid {
        grid-template-columns: 1fr;
    }

    .ed-hero {
        padding: 16px;
    }

    .ed-hero-mag {
        font-size: 2rem;
    }

    .ed-hero-place {
        font-size: 0.7rem;
    }

    .ed-stats-strip {
        flex-wrap: wrap;
    }

    .ed-stat {
        min-width: 33%;
    }

    .ed-content {
        padding: 12px;
    }

    .ed-map {
        height: 300px;
    }

    .ed-products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ed-hero-mag {
        font-size: 1.6rem;
    }

    .ed-stat {
        min-width: 50%;
    }

    .ed-stat-value {
        font-size: 0.9rem;
    }
}
