/* =====================================================
   ISS Tracker – funkwelt.net
   ===================================================== */

#iss-tracker-wrap {
    max-width: 100%;
    margin: 0 auto;
    font-size: 14px;
    color: #1a1a2e;
}

/* ---- Header ---- */
#iss-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 10px 0 12px;
    border-bottom: 2px solid #0f3460;
    margin-bottom: 12px;
}

/* ---- ARISS Badge ---- */
.iss-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    border: 2px solid transparent;
}
.iss-badge-loading { background: #e8e8e8; color: #666; border-color: #ccc; }
.iss-badge-active  { background: #d4edda; color: #155724; border-color: #28a745; }
.iss-badge-school  { background: #cce5ff; color: #004085; border-color: #007bff; }
.iss-badge-inactive{ background: #f8d7da; color: #721c24; border-color: #dc3545; }
.iss-badge-unknown { background: #fff3cd; color: #856404; border-color: #ffc107; }

.iss-badge-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
    animation: iss-blink 2s infinite;
}
.iss-badge-active  .iss-badge-dot { background: #28a745; }
.iss-badge-school  .iss-badge-dot { background: #007bff; }
.iss-badge-inactive .iss-badge-dot { background: #dc3545; animation: none; }
.iss-badge-unknown .iss-badge-dot { background: #ffc107; }
.iss-badge-loading .iss-badge-dot { background: #999; }

@keyframes iss-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---- QTH-Form ---- */
#iss-qth-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
#iss-qth-form label { font-weight: 600; color: #0f3460; }
#iss-locator-input {
    width: 80px;
    padding: 5px 8px;
    border: 2px solid #0f3460;
    border-radius: 4px;
    font-size: 13px;
    text-transform: uppercase;
    font-family: monospace;
}
#iss-locator-btn {
    padding: 5px 12px;
    background: #0f3460;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
#iss-locator-btn:hover { background: #16213e; }
#iss-qth-display {
    font-size: 12px;
    color: #555;
    font-style: italic;
}

/* ---- Info-Kacheln ---- */
#iss-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
@media (max-width: 700px) {
    #iss-tiles { grid-template-columns: repeat(2, 1fr); }
}

.iss-tile {
    background: #0f3460;
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
}
.iss-tile-label {
    font-size: 11px;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.iss-tile-value {
    font-size: 17px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #e94560;
}
.iss-tile-value.above-horizon { color: #4ecca3; }

/* ---- Karte ---- */
#iss-map {
    width: 100%;
    border-radius: 8px;
    border: 2px solid #0f3460;
    margin-bottom: 0;
}

/* ISS Icon */
.iss-icon-img {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 0 6px #e94560);
}

/* ---- Tabs ---- */
#iss-tabs {
    display: flex;
    gap: 0;
    margin-top: 10px;
    border-bottom: 2px solid #0f3460;
}
.iss-tab-btn {
    padding: 8px 20px;
    background: #f0f0f0;
    border: 2px solid #0f3460;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #0f3460;
    margin-right: 4px;
    transition: background 0.15s;
}
.iss-tab-btn:hover { background: #d0d8e8; }
.iss-tab-btn.active {
    background: #0f3460;
    color: #fff;
}

/* ---- Tab-Inhalte ---- */
.iss-tab-content {
    padding: 14px 0;
}

/* ---- Ueberflug-Tabelle ---- */
#iss-passes-table,
#iss-aprs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
#iss-passes-table th,
#iss-passes-table td,
#iss-aprs-table th,
#iss-aprs-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}
#iss-passes-table th,
#iss-aprs-table th {
    background: #0f3460;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
}
#iss-passes-table tr:hover,
#iss-aprs-table tr:hover {
    background: #f5f8ff;
}
#iss-passes-table .next-pass {
    background: #fff8e1;
    font-weight: 600;
}

/* Qualitats-Badges */
.q-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.q-excellent { background: #d4edda; color: #155724; }
.q-good      { background: #cce5ff; color: #004085; }
.q-fair      { background: #fff3cd; color: #856404; }
.q-poor      { background: #f8d7da; color: #721c24; }

/* ---- TLE Info ---- */
#iss-tle-text {
    background: #1a1a2e;
    color: #4ecca3;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 12px;
    overflow-x: auto;
    white-space: pre;
}

.iss-freq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 14px;
}
.iss-freq-table th,
.iss-freq-table td {
    padding: 6px 10px;
    border: 1px solid #ddd;
}
.iss-freq-table th { background: #0f3460; color: #fff; }

/* ---- Lade/Fehler ---- */
.iss-loading {
    padding: 16px;
    color: #555;
    font-style: italic;
    text-align: center;
}
.iss-error {
    padding: 12px 16px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

/* Countdown */
#iss-next-pass-countdown {
    display: inline-block;
    background: #e94560;
    color: #fff;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    font-family: monospace;
    font-size: 13px;
    margin-left: 8px;
}

/* Leaflet Overrides */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    font-size: 13px;
}
