/* ── Satellite Tracker – sat-tracker.css ────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Exo+2:wght@300;600&display=swap');

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.sat-tracker-wrap {
    font-family: 'Exo 2', sans-serif;
    background: #0a0e1a;
    border: 1px solid #1e2d4a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(33, 150, 243, 0.12), 0 4px 24px rgba(0,0,0,0.5);
    margin: 1.5em 0;
    color: #c8d8f0;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.sat-tracker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 18px 10px;
    background: linear-gradient(90deg, #0d1829 0%, #101e38 100%);
    border-bottom: 1px solid #1e2d4a;
}

.sat-tracker-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sat-icon {
    font-size: 1.5em;
    animation: orbit-spin 8s linear infinite;
    display: inline-block;
}

@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.sat-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.15em;
    color: #64b5f6;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sat-tracker-meta {
    font-size: 0.72em;
    color: #607d9e;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0.04em;
}

/* ── Map ──────────────────────────────────────────────────────────────────── */
.sat-tracker-map {
    width: 100%;
    background: #0d1829;
    position: relative;
}



/* ── Satellite marker ─────────────────────────────────────────────────────── */
.sat-marker {
    transition: filter 0.4s ease;
}

/* ── Info row ─────────────────────────────────────────────────────────────── */
.sat-tracker-info {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    border-top: 1px solid #1e2d4a;
    background: #0a0e1a;
}

.sat-info-block {
    padding: 7px 10px;
    border-right: 1px solid #1a2540;
    border-bottom: 1px solid #1a2540;
    min-width: 0;
}

.sat-info-block:last-child {
    border-right: none;
}

.info-label {
    display: block;
    font-size: 0.58em;
    color: #3f6080;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
    font-weight: 600;
}

.info-label-updated {
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 0;
}

.info-value {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.78em;
    color: #90caf9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sat-tracker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 8px;
    background: #060a14;
    border-top: 1px solid #1a2540;
    padding: 7px 18px;
}

.sat-tracker-footer-left {
    display: contents;
}

.sat-tracker-credit {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6em;
    color: #2e4a66;
    letter-spacing: 0.04em;
    width: 100%;
    order: 99;
}

/* ── Status bar ───────────────────────────────────────────────────────────── */
.sat-tracker-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72em;
    font-family: 'Share Tech Mono', monospace;
    color: #607d9e;
    letter-spacing: 0.05em;
    padding: 0;
    background: none;
    border: none;
}

/* ── N2YO external link ───────────────────────────────────────────────────── */
.sat-n2yo-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72em;
    font-family: 'Share Tech Mono', monospace;
    color: #2196f3;
    text-decoration: none;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border: 1px solid #1a3a5c;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.sat-n2yo-link:hover {
    background: #0d2a4a;
    color: #64b5f6;
    border-color: #2196f3;
    text-decoration: none;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #607d9e;
    flex-shrink: 0;
    animation: pulse-grey 2s ease-in-out infinite;
}

.status-dot.ok {
    background: #4caf50;
    animation: pulse-green 1.8s ease-in-out infinite;
}

@keyframes pulse-grey {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0   rgba(76,175,80,0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(76,175,80,0);   }
}

/* ── Leaflet popup override ───────────────────────────────────────────────── */
.sat-tracker-map .leaflet-popup-content-wrapper {
    background: rgba(10, 18, 36, 0.96);
    color: #90caf9;
    border: 1px solid #1e3a5f;
    border-radius: 6px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8em;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.sat-tracker-map .leaflet-popup-tip {
    background: rgba(10, 18, 36, 0.96);
}

.sat-tracker-map .leaflet-popup-close-button {
    color: #607d9e !important;
}

/* ── Leaflet attribution ──────────────────────────────────────────────────── */
.sat-tracker-map .leaflet-control-attribution {
    background: rgba(6, 10, 20, 0.8) !important;
    color: #3f6080;
    font-size: 0.65em;
}

.sat-tracker-map .leaflet-control-attribution a {
    color: #2196f3;
}

/* ── Zoom controls ────────────────────────────────────────────────────────── */
.sat-tracker-map .leaflet-control-zoom a {
    background: #0d1829 !important;
    color: #64b5f6 !important;
    border-color: #1e2d4a !important;
}

.sat-tracker-map .leaflet-control-zoom a:hover {
    background: #152340 !important;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .sat-tracker-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sat-tracker-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── UTC / Local toggle button ────────────────────────────────────────────── */
.sat-tz-toggle {
    background: #0a0e1a;
    border: 1px solid #1e3a5f;
    border-radius: 20px;
    color: #607d9e;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9em;
    letter-spacing: 0.06em;
    padding: 1px 3px;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    transition: border-color 0.2s;
    white-space: nowrap;
    vertical-align: middle;
    margin-left: 6px;
}

.sat-tz-toggle:hover {
    border-color: #2196f3;
}

.tz-opt {
    padding: 2px 8px;
    border-radius: 14px;
    transition: background 0.2s, color 0.2s;
    color: #3f6080;
}

.tz-opt.active {
    background: #1a3a5f;
    color: #64b5f6;
}

.tz-sep {
    color: #1e3a5f;
    font-size: 0.85em;
}

/* ── Next Pass section ────────────────────────────────────────────────────── */
.sat-pass-section {
    border-top: 1px solid #1e2d4a;
    background: #090d18;
}

.sat-pass-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px 18px 7px;
    border-bottom: 1px solid #141e32;
}

.sat-pass-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sat-pass-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8em;
    color: #4caf50;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sat-pass-observer {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7em;
    color: #607d9e;
    letter-spacing: 0.04em;
}

.sat-pass-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
}

.sat-pass-block {
    padding: 7px 10px;
    border-right: 1px solid #141e32;
    border-bottom: 1px solid #141e32;
    min-width: 0;
}

.sat-pass-block:last-child {
    border-right: none;
}

.pass-label {
    display: block;
    font-size: 0.58em;
    color: #3f6080;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
    font-weight: 600;
}

.pass-value {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.78em;
    color: #a5d6a7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sat-pass-status {
    padding: 6px 18px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.68em;
    color: #607d9e;
    letter-spacing: 0.05em;
    min-height: 24px;
}

@media (max-width: 700px) {
    .sat-tracker-info {
        grid-template-columns: repeat(3, 1fr);
    }
    .sat-pass-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .sat-tracker-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .sat-tracker-map {
        height: 260px !important;
    }
}
