/* Country Map Popup Styles */
#country-popup {
    position: fixed;
    width: 15.625rem; /* 250px */
    max-height: 80vh;
    overflow-y: auto;
    background: white;
    border: 0.125rem solid #2c5f8d; /* 2px */
    border-radius: 0.5rem; /* 8px */
    box-shadow: 0 0.25rem 1.25rem rgba(0,0,0,0.3); /* 0 4px 20px */
    z-index: 9999;
    display: none;
    padding: 0;
}

#country-popup.show {
    display: block;
    /* Animation disabled - using opacity transition from JS instead */
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#country-popup .popup-header {
    background: linear-gradient(135deg, #2c5f8d 0%, #1a3a5c 100%);
    color: white;
    padding: 0.75rem; /* 12px */
    border-radius: 0.375rem 0.375rem 0 0; /* 6px 6px 0 0 */
    position: relative;
}

#country-popup .popup-header h4 {
    margin: 0;
    font-size: 1rem; /* 16px */
    font-weight: bold;
}

#country-popup .popup-close {
    position: absolute;
    top: 0.5rem; /* 8px */
    right: 0.625rem; /* 10px */
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 1.5rem; /* 24px */
    height: 1.5rem; /* 24px */
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem; /* 16px */
    line-height: 1;
    transition: background 0.2s;
}

#country-popup .popup-close:hover {
    background: rgba(255,255,255,0.3);
}

#country-popup .popup-close:focus {
    background: rgba(255,255,255,0.4);
    outline: 0.125rem solid #fff; /* 2px */
    outline-offset: 0.125rem; /* 2px */
}

#country-popup .popup-body {
    padding: 0.75rem; /* 12px */
    font-size: 0.8125rem; /* 13px */
}

#country-popup .popup-body h5 {
    font-size: 0.8125rem; /* 13px */
    font-weight: bold;
    margin-top: 0.625rem; /* 10px */
    margin-bottom: 0.3125rem; /* 5px */
}

#country-popup .popup-body p {
    margin-bottom: 0.5rem; /* 8px */
    font-size: 0.75rem; /* 12px */
}

#country-popup .popup-body .badge {
    font-size: 0.625rem; /* 10px */
    padding: 0.1875rem 0.375rem; /* 3px 6px */
}

#country-popup .popup-body .btn {
    font-size: 0.6875rem; /* 11px */
    padding: 0.375rem 0.625rem; /* 6px 10px */
    margin-bottom: 0.3125rem; /* 5px */
}

#country-popup .popup-body .btn i {
    font-size: 0.625rem; /* 10px */
}

#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    z-index: 9998;
    display: none;
}

#popup-overlay.show {
    display: block;
}

/* Map keyboard navigation focus indicator */
#europe-map-about path[tabindex]:focus {
    outline: 0.1875rem solid #ff9800 !important; /* 3px */
    outline-offset: 0.125rem; /* 2px */
}

/* Map container for better keyboard navigation */
.map-embed-container:focus-within {
    box-shadow: 0 0 0 0.1875rem rgba(255, 152, 0, 0.3); /* 0 0 0 3px */
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 0.0625rem; /* 1px */
    height: 0.0625rem; /* 1px */
    padding: 0;
    margin: -0.0625rem; /* -1px */
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Keyboard navigation toast styling */
#keyboard-toast {
    min-width: 20rem; /* 320px */
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15); /* 0 4px 12px */
    opacity: 0;
    transform: translateY(-0.625rem); /* -10px */
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

#keyboard-toast.show {
    opacity: 1;
    transform: translateY(0);
}

#keyboard-toast .badge {
    font-weight: 600;
    font-size: 0.8125rem; /* 13px */
    padding: 0.375rem 0.625rem; /* 6px 10px */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#keyboard-toast .toast-body {
    font-size: 0.875rem; /* 14px */
    line-height: 1.8;
}

#keyboard-toast .toast-header {
    border-bottom: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #country-popup,
    #keyboard-toast {
        transition: none !important;
    }
    
    #country-popup .popup-body,
    #europe-map-about path {
        transition: none !important;
    }
}

