/**
 * Country Selection Popup Styles
 * 
 * @package Kemet
 */

/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

/* Popup Overlay */
.kemet-country-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kemet-country-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Popup Container */
.kemet-country-popup-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 30px 20px;
    background-color: #f1e6db;
    background-image: url('../images/kemet-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow-y: auto;
}

/* Popup Content */
.kemet-country-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 500px;
    width: 100%;
}

/* Logo Container */
.kemet-country-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.kemet-country-logo {
    max-width: 200px;
    height: auto;
}

/* Country List */
.kemet-country-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    max-width: 400px;
    margin-top: 10px;
}

/* Country Card */
.kemet-country-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 0.7rem;
    padding: 20px 15px;
    user-select: none;
    font-family: 'Open Sans', sans-serif;
    font-size: 18px;
    border: 2px solid transparent;
    color: black;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 75ms ease;
    width: 100%;
    text-align: left;
}

.kemet-country-card:hover {
    background-color: #f1e6db;
    color: black;
    border: 2px solid #3A4532;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.kemet-country-card-active {
    background-color: #f1e6db;
    color: black;
    border: 2px solid #3A4532;
}

.kemet-country-card-loading {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}

.kemet-country-card:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.kemet-country-card:focus {
    outline: 2px solid #3A4532;
    outline-offset: 2px;
}

.kemet-country-card-text {
    flex: 1;
    font-weight: 500;
}

.kemet-country-flag {
    flex-shrink: 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animation */
.kemet-country-popup {
    animation: kemet-popup-fade-in 0.3s ease-out;
}

.kemet-country-popup-container {
    animation: kemet-popup-scale-in 0.3s ease-out;
}

@keyframes kemet-popup-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes kemet-popup-scale-in {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Prevent body scroll when popup is open */
body.kemet-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .kemet-country-popup-container {
        padding: 20px 15px;
    }
    
    .kemet-country-logo {
        max-width: 150px;
    }
    
    .kemet-country-card {
        font-size: 16px;
        padding: 15px 12px;
    }
    
    .kemet-country-flag {
        width: 60px;
        height: 45px;
    }
    
    .kemet-country-list {
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .kemet-country-popup-container {
        padding: 15px 10px;
    }
    
    .kemet-country-logo {
        max-width: 120px;
    }
    
    .kemet-country-card {
        font-size: 14px;
        padding: 12px 10px;
        gap: 8px;
    }
    
    .kemet-country-flag {
        width: 50px;
        height: 38px;
    }
    
    .kemet-country-card-text {
        font-size: 14px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .kemet-country-card {
        border: 3px solid #000;
    }
    
    .kemet-country-card:hover,
    .kemet-country-card-active {
        border: 3px solid #3A4532;
        background-color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .kemet-country-popup,
    .kemet-country-popup-container,
    .kemet-country-card {
        animation: none;
        transition: none;
    }
}

