/* ═══════════════════════════════════════════════════════════════════════
   DAWIDWEB GEO-LANGUAGE BANNER STYLES v3.0
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --dw-geo-bg: #0f0f10;
    --dw-geo-card: #18181b;
    --dw-geo-border: #27272a;
    --dw-geo-text: #fafafa;
    --dw-geo-text-muted: #a1a1aa;
    --dw-geo-lime: #84cc16;
    --dw-geo-lime-light: #a3e635;
    --dw-geo-lime-glow: rgba(132, 204, 22, 0.3);
}

.dw-geo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999990;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dw-geo-overlay.dw-geo-visible {
    display: flex;
    opacity: 1;
}

.dw-geo-banner {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, #1c1c1f 0%, #141416 100%);
    border: 1px solid var(--dw-geo-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.05),
        0 25px 80px rgba(0,0,0,0.6),
        0 0 120px var(--dw-geo-lime-glow);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dw-geo-overlay.dw-geo-visible .dw-geo-banner {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.dw-geo-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--dw-geo-border);
    border-radius: 50%;
    color: var(--dw-geo-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.dw-geo-close:hover {
    background: var(--dw-geo-lime);
    border-color: var(--dw-geo-lime);
    color: #000;
    transform: rotate(90deg);
}

.dw-geo-header {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.dw-geo-flag-container {
    position: relative;
    width: 100px;
    height: 80px;
}

.dw-geo-flag {
    position: absolute;
    font-size: 56px;
    line-height: 1;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.dw-geo-flag--detected {
    left: 0;
    top: 0;
    z-index: 2;
}

.dw-geo-flag--suggested {
    right: 0;
    top: 20px;
    z-index: 1;
    opacity: 0.6;
    transform: scale(0.8);
}

.dw-geo-overlay.dw-geo-ready .dw-geo-flag--detected {
    animation: flagBounce 0.6s ease;
}

.dw-geo-overlay.dw-geo-ready .dw-geo-flag--suggested {
    opacity: 1;
    transform: scale(1);
    animation: flagSlideIn 0.5s 0.2s ease both;
}

@keyframes flagBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes flagSlideIn {
    from { opacity: 0; transform: scale(0.5) translateX(20px); }
    to { opacity: 1; transform: scale(1) translateX(0); }
}

.dw-geo-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    background: var(--dw-geo-lime);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 0;
}

.dw-geo-overlay.dw-geo-ready .dw-geo-pulse {
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.dw-geo-content {
    text-align: center;
    margin-bottom: 28px;
}

.dw-geo-title {
    color: var(--dw-geo-text);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.dw-geo-subtitle {
    color: var(--dw-geo-text-muted);
    font-size: 15px;
    margin: 0 0 20px;
    line-height: 1.5;
}

.dw-geo-detected {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(132, 204, 22, 0.15) 0%, rgba(132, 204, 22, 0.05) 100%);
    border: 1px solid rgba(132, 204, 22, 0.3);
    border-radius: 100px;
    padding: 10px 20px;
    color: var(--dw-geo-lime-light);
    font-size: 14px;
    font-weight: 600;
}

.dw-geo-detected-icon {
    font-size: 16px;
}

.dw-geo-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dw-geo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
}

.dw-geo-btn--primary {
    background: linear-gradient(135deg, var(--dw-geo-lime) 0%, #65a30d 100%);
    color: #000;
    box-shadow:
        0 4px 16px var(--dw-geo-lime-glow),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.dw-geo-btn--primary:hover {
    background: linear-gradient(135deg, var(--dw-geo-lime-light) 0%, var(--dw-geo-lime) 100%);
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px var(--dw-geo-lime-glow),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.dw-geo-btn--secondary {
    background: rgba(255,255,255,0.05);
    color: var(--dw-geo-text-muted);
    border: 1px solid var(--dw-geo-border);
}

.dw-geo-btn--secondary:hover {
    background: rgba(255,255,255,0.1);
    color: var(--dw-geo-text);
    border-color: #3f3f46;
}

.dw-geo-btn-icon {
    font-size: 20px;
}

.dw-geo-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--dw-geo-border);
    color: var(--dw-geo-text-muted);
    font-size: 13px;
}

.dw-geo-footer-icon {
    font-size: 14px;
}

.dw-geo-overlay.dw-geo-loading .dw-geo-detected-text::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--dw-geo-lime);
    border-top-color: transparent;
    border-radius: 50%;
    margin-left: 8px;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

@media (max-width: 480px) {
    .dw-geo-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .dw-geo-banner {
        padding: 24px;
        border-radius: 20px 20px 0 0;
        max-width: 100%;
    }

    .dw-geo-flag-container {
        width: 80px;
        height: 64px;
    }

    .dw-geo-flag {
        font-size: 44px;
    }

    .dw-geo-title {
        font-size: 18px;
    }

    .dw-geo-subtitle {
        font-size: 14px;
    }

    .dw-geo-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dw-geo-banner,
    .dw-geo-flag,
    .dw-geo-btn,
    .dw-geo-close {
        transition: none;
        animation: none;
    }

    .dw-geo-pulse {
        display: none;
    }
}
