/* SE Country Selector Overlay */
.se-country-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.se-country-selector-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Body blur effect when overlay is active */
body.se-country-selector-active {
    overflow: hidden;
}

body.se-country-selector-active > *:not(.se-country-selector-overlay) {
    filter: blur(3px);
    pointer-events: none;
}

.se-country-selector-modal {
    position: relative;
    background: black;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.se-country-selector-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.se-country-selector-header h2 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 600;
    /* color: #333; */
    line-height: 1.2;
}

.se-country-selector-header p {
    margin: 0;
    font-size: 16px;
    /* color: #666; */
    line-height: 1.4;
}

.se-country-selector-content {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.se-country-selector-loading {
    text-align: center;
    padding: 40px 20px;
}

.se-country-selector-loading p {
    font-size: 16px;
    /* color: #666; */
    margin: 0;
}

.se-region-group {
    margin-bottom: 40px;
}

.se-region-group:last-child {
    margin-bottom: 0;
}

.se-region-title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    /* color: #333; */
    padding-bottom: 10px;
    border-bottom: 2px solid #5cb039;
}

.se-countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.se-country-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-align: center;
    min-height: 80px;
}

.se-country-btn:hover {
    border-color: #007cba;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
}

.se-country-btn:active {
    transform: translateY(0);
}

.se-country-code {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #5cb039;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.se-country-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
}

.se-country-selector-footer {
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.se-country-selector-close {
    background: #6c757d;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.se-country-selector-close:hover {
    background: #5a6268;
}

.se-error-message {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

.se-error-message p {
    margin: 0;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .se-country-selector-modal {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .se-country-selector-header {
        padding: 20px 20px 15px;
    }
    
    .se-country-selector-header h2 {
        font-size: 24px;
    }
    
    .se-country-selector-content {
        padding: 20px;
        max-height: 70vh;
    }
    
    .se-countries-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
    
    .se-country-btn {
        padding: 12px 8px;
        min-height: 70px;
    }
    
    .se-country-selector-footer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .se-country-selector-overlay {
        padding: 10px;
    }
    
    .se-country-selector-modal {
        margin: 0;
        max-width: 100%;
        border-radius: 8px;
    }
    
    .se-countries-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    
    .se-country-btn {
        padding: 10px 6px;
        min-height: 60px;
    }
    
    .se-country-name {
        font-size: 13px;
    }
}

/* Accessibility */
.se-country-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.se-country-selector-close:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .se-country-selector-backdrop {
        background: rgba(0, 0, 0, 0.95);
    }
    
    .se-country-btn {
        border-color: #333;
    }
    
    .se-country-btn:hover {
        border-color: #000;
        background: #f0f0f0;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .se-country-selector-modal {
        animation: none;
    }
    
    .se-country-btn {
        transition: none;
    }
    
    .se-country-btn:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .se-country-selector-overlay {
        display: none !important;
    }
} 