/* ==========================================================
   ATATÜRK ATLASI — map.css
   Leaflet tooltip, cluster markers, GSAP animated overlays
   ========================================================== */

/* --- CUSTOM TOOLTIP --- */
.leaflet-tooltip.custom-tooltip {
    background-color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    white-space: normal;
    pointer-events: none;
    border: 1px solid rgba(226, 232, 240, 0.8);
    min-width: 140px;
}

/* --- CLUSTER ICON --- */
.cluster-div-icon {
    background: transparent;
    border: none;
}

.cluster-pin {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0; left: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cluster-pin::after {
    content: '';
    width: 6px; height: 6px;
    background: white;
    border-radius: 50%;
}

.cluster-count-badge {
    position: absolute;
    top: -8px; right: -8px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 900;
    min-width: 18px; height: 18px;
    padding: 0 4px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.cluster-ripple {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.6);
    animation: ripple 2s infinite ease-out;
    z-index: -1;
    pointer-events: none;
}

@keyframes ripple {
    0%   { width: 100%; height: 100%; opacity: 0.8; border-width: 3px; }
    100% { width: 220%; height: 220%; opacity: 0; border-width: 0px; }
}

.cluster-div-icon:hover .cluster-pin { transform: scale(1.15); }

/* --- CLUSTER LIST ITEM (in cluster modal) --- */
.cluster-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.cluster-list-item:hover {
    transform: translateX(4px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.cluster-year {
    font-size: 11px;
    font-weight: 900;
    color: #4f46e5;
    background: #eef2ff;
    padding: 4px 8px;
    border-radius: 6px;
    min-width: 50px;
    text-align: center;
}
.cluster-text {
    flex-grow: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
}

/* --- GSAP ANIMATED OVERLAY LAYERS --- */
/* These SVG/Canvas overlays are injected by map.js / GSAP animations.
   Base styles keep them non-interactive unless explicitly enabled. */
.gsap-map-overlay {
    pointer-events: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 350; /* below .ui-layer (400) */
}

/* Battle-zone polygon label */
.map-zone-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    pointer-events: none;
    white-space: nowrap;
}

/* ── Zone tooltip (GSAP overlay label) ──────────────────────── */
.leaflet-tooltip.zone-tooltip {
    background: rgba(15, 23, 42, 0.80);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 6px 12px;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.leaflet-tooltip.zone-tooltip::before {
    display: none;    /* hide default Leaflet arrow */
}
