/**
 * TARAFTAR.LOL — Taraftar Haritası CSS Stilleri
 * 81 İl SVG Haritası, Takım Logo Pinleri ve İl Detay Kartı
 */

/* ==========================================
   TARAFTAR HARİTASI TEMA DEĞİŞKENLERİ
   ========================================== */

/* Dark Mode (Varsayılan) */
:root {
    --map-wrapper-bg: #0c141e;
    --map-province-fill: #203144;
    --map-province-stroke: #4d6886;
    --map-province-stroke-width: 1.1px;
    --map-marker-circle-fill: #ffffff;
    --map-marker-circle-stroke: #334155;
    --map-legend-empty-dot: #203144;
    --map-empty-border: #4d6886;
}

/* Light Mode (Gündüz Modu - Korunan) */
[data-theme="light"] {
    --map-wrapper-bg: #f8fafc;
    --map-province-fill: #e2e8f0;
    --map-province-stroke: #94a3b8;
    --map-province-stroke-width: 0.85px;
    --map-marker-circle-fill: #ffffff;
    --map-marker-circle-stroke: #cbd5e1;
    --map-legend-empty-dot: #e2e8f0;
    --map-empty-border: #94a3b8;
}

.fan-map-section {
    margin-bottom: 28px;
}

.fan-map-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition-theme);
}

.fan-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.fan-map-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fan-map-header__icon {
    font-size: 1.8rem;
    line-height: 1;
}

.fan-map-header__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fan-map-header__desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

.fan-map-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(78, 205, 196, 0.12);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
}

.fan-map-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--bg-surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.fan-map-stats-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fan-map-stats-item strong {
    color: var(--text-primary);
}

/* SVG Harita Konteyneri */
.fan-map-wrapper {
    position: relative;
    width: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(78, 205, 196, 0.04) 0%, transparent 75%), var(--map-wrapper-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    box-sizing: border-box;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.fan-map-svg-container {
    width: 100%;
    height: auto;
    position: relative;
}

.fan-map-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* 81 İl SVG Yolları (Koyu Modda Net Görünürlük) */
.fan-map-province {
    fill: var(--map-province-fill);
    stroke: var(--map-province-stroke);
    stroke-width: var(--map-province-stroke-width);
    stroke-linejoin: round;
    stroke-linecap: round;
    cursor: pointer;
    transition: fill 0.2s ease, stroke 0.2s ease, stroke-width 0.2s ease, filter 0.2s ease;
}

.fan-map-province:hover {
    fill: rgba(78, 205, 196, 0.32) !important;
    stroke: var(--accent) !important;
    stroke-width: 1.8px !important;
    filter: drop-shadow(0 0 10px rgba(78, 205, 196, 0.5));
}

.fan-map-province--active {
    fill: rgba(245, 158, 11, 0.38) !important;
    stroke: var(--gold) !important;
    stroke-width: 2.2px !important;
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.6));
}

/* Logo & İkon Pinleri (SVG Markers) */
.fan-map-marker {
    cursor: pointer;
    pointer-events: all;
}

.fan-map-marker__circle {
    fill: var(--map-marker-circle-fill);
    stroke: var(--map-marker-circle-stroke);
    stroke-width: 1.2px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.65));
    transition: stroke 0.2s ease, fill 0.2s ease, r 0.2s ease;
}

.fan-map-marker:hover .fan-map-marker__circle {
    stroke: var(--accent);
    stroke-width: 2px;
    r: 13.5px;
    filter: drop-shadow(0 0 8px rgba(78, 205, 196, 0.8));
}

.fan-map-marker__tie {
    font-size: 11px;
    text-anchor: middle;
    dominant-baseline: central;
}

/* Harita Açıklama / Legend */
.fan-map-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 14px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.fan-map-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fan-map-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid var(--border);
}

/* İl Detay Modalı / Popover */
.fan-map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10004;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    animation: fanMapFadeIn 0.2s ease;
}

.fan-map-modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: fanMapSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fan-map-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface-raised);
}

.fan-map-modal__title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fan-map-modal__flag {
    font-size: 1.4rem;
}

.fan-map-modal__city-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.fan-map-modal__plate-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    background: rgba(78, 205, 196, 0.15);
    color: var(--accent);
    border-radius: var(--radius-pill);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.fan-map-modal__close {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.fan-map-modal__close:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
    background: var(--bg-hover);
}

.fan-map-modal__body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Lider Takım Kartı (Modal İçinde) */
.fan-map-modal__leader {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.02) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 18px;
}

.fan-map-modal__leader-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.fan-map-modal__leader-info {
    flex: 1;
    min-width: 0;
}

.fan-map-modal__leader-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fan-map-modal__leader-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 2px 0 0 0;
}

.fan-map-modal__leader-votes {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Eşitlik Durumu Kartı */
.fan-map-modal__tie-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(100, 116, 139, 0.12);
    border: 1px solid rgba(100, 116, 139, 0.25);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 18px;
}

.fan-map-modal__tie-icon {
    font-size: 1.8rem;
}

.fan-map-modal__tie-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.fan-map-modal__tie-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
}

/* Oy Dağılım Listesi */
.fan-map-modal__team-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fan-map-modal__team-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
}

.fan-map-modal__rank {
    font-weight: 800;
    color: var(--text-muted);
    width: 18px;
    text-align: center;
}

.fan-map-modal__team-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.fan-map-modal__team-name {
    flex: 1;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fan-map-modal__team-votes {
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.fan-map-modal__team-pct {
    font-size: 0.72rem;
    color: var(--text-muted);
    min-width: 38px;
    text-align: right;
}

/* Henüz Oy Yok Durumu */
.fan-map-modal__empty {
    text-align: center;
    padding: 24px 12px;
    color: var(--text-muted);
}

.fan-map-modal__empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.fan-map-modal__empty-text {
    font-size: 0.88rem;
    line-height: 1.4;
}

@keyframes fanMapFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fanMapSlideUp {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Responsive Düzen */
@media (max-width: 640px) {
    .fan-map-card {
        padding: 16px 12px;
    }
    .fan-map-header {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }
    .fan-map-header__title {
        font-size: 1.15rem;
    }
    .fan-map-wrapper {
        padding: 6px;
    }
    .fan-map-stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        font-size: 0.78rem;
    }
}
