/* ============================================
   AlfareedLine - World Map Styles
   /astra-child/assets/css/world-map.css
   ============================================ */

/* ---- Container ---- */
.afl-world-map-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
}

.afl-map-container {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #08111f;
    border: 1px solid rgba(16, 185, 129, 0.12);
    box-shadow:
        0 0 60px rgba(16, 185, 129, 0.04),
        inset 0 0 80px rgba(0,0,0,0.3);
}

#aflWorldMap {
    width: 100%;
    display: block;
    min-height: 300px;
}

/* ---- Country Paths ---- */
.afl-country {
    stroke: #04090f;
    stroke-width: 0.4px;
    cursor: default;
    transition: fill 0.15s ease, stroke 0.15s ease;
}

.afl-country.afl-covered {
    fill: #0b6a4f;
    cursor: pointer;
}

.afl-country.afl-covered:hover {
    fill: #10b981;
    stroke: #34d399;
    stroke-width: 0.8px;
}

.afl-country.afl-uncovered {
    fill: #1a2e3d;
}

.afl-country.afl-uncovered:hover {
    fill: #223545;
}

/* Active (selected) state */
.afl-country.afl-active {
    fill: #10b981 !important;
    stroke: #6ee7b7 !important;
    stroke-width: 1.2px !important;
}

/* Ocean / Graticule */
.afl-ocean {
    fill: #060d18;
}

.afl-graticule {
    fill: none;
    stroke: rgba(16, 185, 129, 0.04);
    stroke-width: 0.3px;
}

.afl-sphere {
    fill: #060d18;
}

/* ---- Tooltip ---- */
.afl-map-tooltip {
    position: absolute;
    background: rgba(8, 17, 31, 0.97);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
    font-family: var(--body-font-family, 'Cairo', sans-serif);
    white-space: nowrap;
    z-index: 100;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    min-width: 140px;
}

.afl-map-tooltip.afl-tt-visible {
    opacity: 1;
}

.afl-tt-flag {
    font-size: 18px;
    margin-left: 6px;
    vertical-align: middle;
}

.afl-tt-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    vertical-align: middle;
}

.afl-tt-status {
    margin-top: 4px;
    font-size: 11px;
    color: #10b981;
}

.afl-tt-status.afl-tt-unavail {
    color: #64748b;
}

/* ---- Legend ---- */
.afl-map-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 12px;
}

.afl-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    font-family: var(--body-font-family, 'Cairo', sans-serif);
}

.afl-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.afl-dot-covered { background: #10b981; }
.afl-dot-uncovered { background: #1a2e3d; border: 1px solid #2a4a5a; }

/* ---- Loading State ---- */
.afl-map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #08111f;
    border-radius: 16px;
    z-index: 5;
}

.afl-map-loading span {
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    font-family: var(--body-font-family, 'Cairo', sans-serif);
}

/* ---- Pulse Animation on Covered Countries ---- */
@keyframes afl-pulse-ring {
    0%   { r: 4px; opacity: 0.8; }
    100% { r: 12px; opacity: 0; }
}

.afl-map-pulse {
    animation: afl-pulse-ring 1.8s ease-out infinite;
    fill: #10b981;
    pointer-events: none;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .afl-map-container {
        border-radius: 10px;
    }
    .afl-tt-name { font-size: 12px; }
    .afl-map-legend { gap: 1rem; }
    .afl-legend-item { font-size: 11px; }
}