/* =========================================================================
   KATRAD ISS Tracker — sayfaya özel stiller (yalnızca ISS Takibi sayfası
   yükler; diğer sayfaların tasarımına dokunmaz).
   ========================================================================= */

/* ---- Yerleşim ---------------------------------------------------------- */

.isst-shell {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 22px;
    align-items: start;
}

/* ---- Harita kartı ------------------------------------------------------ */

.isst-map-card {
    position: relative;
    z-index: 0;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(0, 51, 160, 0.16);
    border-radius: 18px;
    background: var(--surface, #fff);
    box-shadow: 0 24px 60px rgba(2, 12, 34, 0.16), 0 0 0 4px rgba(0, 51, 160, 0.04);
}

.isst-map {
    position: relative;
    z-index: 0;
    height: clamp(360px, 58vh, 580px);
    background: #aad3df;
}

.isst-map .leaflet-container {
    height: 100%;
    font: inherit;
}

/* Leaflet kontrolleri — KATRAD teması */
.isst-map .leaflet-control-zoom a {
    width: 38px;
    height: 38px;
    line-height: 38px;
    font-size: 19px;
    font-weight: 900;
    color: #0033A0;
    border: 0;
}

.isst-map .leaflet-bar {
    border: 1px solid rgba(2, 12, 34, 0.14);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(2, 12, 34, 0.22);
}

.isst-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(2, 12, 34, 0.14);
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(2, 12, 34, 0.22);
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.isst-follow-btn:hover {
    transform: translateY(-1px);
}

.isst-follow-btn.is-on {
    background: #0033A0;
    border-color: #0033A0;
    color: #fff;
}

/* ---- Harita üstü işaretler -------------------------------------------- */

.isst-iss-icon {
    position: relative;
}

.isst-iss-body {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    filter: drop-shadow(0 0 6px rgba(255, 102, 0, 0.85)) drop-shadow(0 2px 4px rgba(2, 12, 34, 0.5));
}

.isst-iss-pulse {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 102, 0, 0.85);
    border-radius: 999px;
    animation: isst-pulse 2.6s ease-out infinite;
}

.isst-iss-pulse-2 {
    animation-delay: 1.3s;
}

@keyframes isst-pulse {
    0% { transform: scale(0.32); opacity: 0.95; }
    70% { transform: scale(1.15); opacity: 0.25; }
    100% { transform: scale(1.5); opacity: 0; }
}

.isst-home-icon {
    position: relative;
}

.isst-home-dot {
    position: absolute;
    inset: 0;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #0033A0;
    box-shadow: 0 0 0 3px rgba(0, 51, 160, 0.28);
}

.isst-home-label {
    position: absolute;
    left: 16px;
    top: -4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(2, 12, 34, 0.78);
    color: #fff;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.isst-user-icon {
    position: relative;
}

.isst-user-pin {
    position: absolute;
    inset: 0;
    border: 3px solid #fff;
    border-radius: 999px;
    background: #FF6600;
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.30), 0 4px 10px rgba(2, 12, 34, 0.35);
    animation: isst-user-pop 0.5s ease;
}

@keyframes isst-user-pop {
    0% { transform: scale(0.2); }
    70% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Gelecek yörünge izi — akan kesikli çizgi */
.isst-track-future {
    animation: isst-dash 1.4s linear infinite;
}

@keyframes isst-dash {
    to { stroke-dashoffset: -28; }
}

.isst-time-dot {
    filter: drop-shadow(0 1px 3px rgba(2, 12, 34, 0.4));
}

/* ---- Harita altı istatistik şeridi ------------------------------------ */

.isst-statbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 0;
    border-top: 1px solid var(--border-color, #dbe5f0);
    background:
        radial-gradient(circle at 90% 0%, rgba(255, 102, 0, 0.07), transparent 42%),
        linear-gradient(180deg, var(--surface, #fff), var(--surface-soft, #eef5ff));
}

.isst-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 18px;
    border-right: 1px solid var(--border-color, #dbe5f0);
}

.isst-stat:last-child {
    border-right: 0;
}

.isst-stat span {
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
}

.isst-stat strong {
    font-size: 19px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary, #0f172a);
    transition: color 0.3s ease;
}

.isst-stat-live {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.1em;
    color: #16853a;
}

.isst-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: isst-live 1.8s ease-out infinite;
}

@keyframes isst-live {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.isst-attribution {
    margin: 0;
    padding: 8px 18px 10px;
    background: var(--surface-soft, #eef5ff);
    color: var(--text-muted, #64748b);
    font-size: 11.5px;
}

.isst-attribution a {
    color: inherit;
    text-decoration: underline;
}

/* ---- Yan kartlar ------------------------------------------------------- */

.isst-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.isst-side-card {
    border: 1px solid var(--border-color, #dbe5f0);
    border-radius: 14px;
    background: var(--surface, #fff);
    padding: 18px 20px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.isst-side-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 950;
    color: var(--text-primary, #0f172a);
}

.isst-next-card {
    border-color: rgba(0, 51, 160, 0.28);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 102, 0, 0.10), transparent 46%),
        linear-gradient(160deg, var(--surface, #fff), var(--surface-soft, #eef5ff));
}

.isst-next-count {
    font-size: 34px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    color: #0033A0;
    line-height: 1.15;
}

.isst-next-card.is-active {
    border-color: rgba(255, 102, 0, 0.55);
}

.isst-next-card.is-active .isst-next-count {
    color: #FF6600;
    font-size: 22px;
    animation: isst-blink 1.4s ease-in-out infinite;
}

@keyframes isst-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.isst-next-detail {
    margin: 8px 0 0;
    color: var(--text-secondary, #475569);
    font-size: 13.5px;
    font-weight: 650;
}

.isst-look-list,
.isst-freq-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.isst-look-list li,
.isst-freq-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color, #dbe5f0);
    font-size: 13.5px;
}

.isst-look-list li:last-child,
.isst-freq-list li:last-child {
    border-bottom: 0;
}

.isst-look-list span,
.isst-freq-list span {
    color: var(--text-muted, #64748b);
    font-weight: 700;
}

.isst-look-list strong,
.isst-freq-list strong {
    color: var(--text-primary, #0f172a);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.isst-horizon-badge {
    display: inline-block;
    margin: 12px 0 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
    font-size: 12.5px;
    font-weight: 900;
    animation: isst-blink 1.6s ease-in-out infinite;
}

.isst-note {
    margin: 12px 0 0;
    color: var(--text-muted, #64748b);
    font-size: 12.5px;
    line-height: 1.6;
}

/* ---- Konum arama ------------------------------------------------------- */

.isst-locate-card {
    border: 1px solid rgba(0, 51, 160, 0.18);
    border-radius: 16px;
    background:
        radial-gradient(circle at 0% 0%, rgba(0, 51, 160, 0.06), transparent 38%),
        var(--surface, #fff);
    padding: 20px 22px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    margin-bottom: 26px;
}

.isst-locate-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
}

.isst-locate-form input {
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 11px;
    background: var(--input-bg, #fff);
    color: var(--text-primary, #0f172a);
    font-size: 15px;
    font-weight: 650;
}

.isst-locate-form input:focus {
    outline: 2px solid rgba(0, 51, 160, 0.4);
    outline-offset: 1px;
    border-color: #0033A0;
}

.isst-btn-primary,
.isst-btn-secondary {
    min-height: 50px;
    padding: 0 22px;
    border-radius: 11px;
    font-size: 14.5px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.isst-btn-primary {
    border: 0;
    background: #0033A0;
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 51, 160, 0.28);
}

.isst-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
}

.isst-btn-secondary {
    border: 1.5px solid rgba(0, 51, 160, 0.4);
    background: transparent;
    color: #0033A0;
}

.isst-btn-secondary:hover:not(:disabled) {
    background: rgba(0, 51, 160, 0.07);
}

.isst-btn-primary:disabled,
.isst-btn-secondary:disabled {
    opacity: 0.55;
    cursor: wait;
}

.isst-locate-status {
    margin: 10px 2px 0;
    min-height: 20px;
    font-size: 13.5px;
    font-weight: 750;
    color: var(--text-secondary, #475569);
}

.isst-locate-status.is-error {
    color: #b91c1c;
}

.isst-locate-status.is-busy {
    display: flex;
    align-items: center;
    gap: 9px;
}

.isst-locate-status.is-busy::before {
    content: "";
    width: 15px;
    height: 15px;
    border: 2.5px solid rgba(0, 51, 160, 0.25);
    border-top-color: #0033A0;
    border-radius: 999px;
    animation: isst-spin 0.8s linear infinite;
}

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

/* ---- Geçiş kartları ---------------------------------------------------- */

.isst-pass-head h3 {
    margin: 0 0 14px;
    font-size: 19px;
    font-weight: 950;
    color: var(--text-primary, #0f172a);
    overflow-wrap: break-word;
    word-break: break-word;
}

.isst-pass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 14px;
}

.isst-pass-card {
    border: 1px solid var(--border-color, #dbe5f0);
    border-radius: 13px;
    background: var(--surface, #fff);
    padding: 15px 17px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.isst-pass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
    border-color: rgba(0, 51, 160, 0.35);
}

.isst-pass-card.is-live {
    border-color: rgba(255, 102, 0, 0.6);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 102, 0, 0.10), transparent 50%),
        var(--surface, #fff);
}

.isst-pass-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 9px;
}

.isst-pass-day {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 51, 160, 0.10);
    color: #0033A0;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.07em;
}

.isst-pass-count {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 102, 0, 0.14);
    color: #c2410c;
    font-size: 11px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.isst-pass-card.is-live .isst-pass-count {
    animation: isst-blink 1.4s ease-in-out infinite;
}

.isst-pass-times {
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin-bottom: 10px;
}

.isst-pass-times strong {
    font-size: 23px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary, #0f172a);
}

.isst-pass-arrow {
    color: var(--text-muted, #94a3b8);
    font-weight: 900;
}

.isst-pass-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.isst-chip {
    padding: 4px 10px;
    border: 1px solid var(--border-color, #dbe5f0);
    border-radius: 999px;
    background: var(--surface-soft, #f1f5f9);
    color: var(--text-secondary, #475569);
    font-size: 12px;
    font-weight: 800;
}

.isst-el-meter {
    height: 8px;
    border-radius: 999px;
    background: var(--surface-soft, #e2e8f0);
    overflow: hidden;
}

.isst-el-meter i {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
}

.isst-el-meter.is-low i {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

.isst-el-meter.is-mid i {
    background: linear-gradient(90deg, #3b82f6, #0033A0);
}

.isst-el-meter.is-high i {
    background: linear-gradient(90deg, #fb923c, #FF6600);
}

.isst-el-label {
    margin-top: 7px;
    font-size: 12.5px;
    font-weight: 750;
    color: var(--text-muted, #64748b);
}

.isst-el-label strong {
    color: var(--text-primary, #0f172a);
    font-weight: 950;
}

.isst-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 26px;
    border: 1px dashed var(--border-color, #cbd5e1);
    border-radius: 13px;
    color: var(--text-muted, #64748b);
    font-weight: 700;
    text-align: center;
}

.isst-pass-note {
    margin: 16px 2px 0;
    color: var(--text-muted, #94a3b8);
    font-size: 12.5px;
}

/* ---- Karanlık tema ----------------------------------------------------- */

html[data-theme="dark"] .isst-map {
    background: #0b1626;
}

html[data-theme="dark"] .isst-map .leaflet-tile {
    filter: invert(1) hue-rotate(196deg) brightness(0.92) contrast(0.9) saturate(0.55);
}

html[data-theme="dark"] .isst-map .isst-night {
    fill-opacity: 0.4;
}

html[data-theme="dark"] .isst-map-card {
    border-color: rgba(96, 165, 250, 0.22);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(59, 130, 246, 0.05);
}

html[data-theme="dark"] .isst-map .leaflet-control-zoom a,
html[data-theme="dark"] .isst-follow-btn {
    background: #101c30;
    color: #dbeafe;
    border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .isst-follow-btn.is-on {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

html[data-theme="dark"] .isst-next-count {
    color: #93c5fd;
}

html[data-theme="dark"] .isst-next-card.is-active .isst-next-count {
    color: #ff8a1d;
}

html[data-theme="dark"] .isst-pass-day {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

html[data-theme="dark"] .isst-pass-count {
    background: rgba(255, 138, 29, 0.16);
    color: #ffb066;
}

html[data-theme="dark"] .isst-btn-primary {
    background: #3b82f6;
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.3);
}

html[data-theme="dark"] .isst-btn-secondary {
    border-color: rgba(147, 197, 253, 0.5);
    color: #93c5fd;
}

html[data-theme="dark"] .isst-btn-secondary:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.12);
}

html[data-theme="dark"] .isst-locate-status.is-error {
    color: #fca5a5;
}

html[data-theme="dark"] .isst-horizon-badge {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
}

/* ---- Duyarlı düzen ----------------------------------------------------- */

@media (max-width: 1080px) {
    .isst-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .isst-map {
        height: clamp(300px, 48vh, 420px);
    }

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

    .isst-stat {
        border-bottom: 1px solid var(--border-color, #dbe5f0);
    }

    .isst-stat:nth-child(2n) {
        border-right: 0;
    }

    .isst-stat-live {
        grid-column: 1 / -1;
        justify-content: center;
        border-right: 0;
        border-bottom: 0;
    }

    .isst-locate-form {
        grid-template-columns: 1fr;
    }

    .isst-next-count {
        font-size: 28px;
    }
}

/* ---- Hareket azaltma tercihi ------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    .isst-iss-pulse,
    .isst-live-dot,
    .isst-track-future,
    .isst-next-card.is-active .isst-next-count,
    .isst-pass-card.is-live .isst-pass-count,
    .isst-horizon-badge {
        animation: none;
    }

    .isst-pass-card:hover {
        transform: none;
    }
}
