/* Country Toggle Styles */
.country-toggle {
    position: relative;
    display: inline-block;
    margin-left: 15px;
    z-index: 1000;
}


.current-country {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.current-country:hover {
    background-color: #e9ecef;
}

.country-flag-small {
    width: 20px;
    height: 14px;
    margin-right: 8px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.current-country span {
    font-size: 14px;
    font-weight: 500;
    margin-right: 8px;
}

.current-country i {
    font-size: 12px;
    color: #6c757d;
}

.country-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 180px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 9999; /* Increased z-index to ensure it's above other elements */
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
    pointer-events: auto !important; /* Ensure clicks are registered */
}

.country-dropdown.show {
    display: block !important; /* Force display when shown */
}

.country-dropdown.show {
    display: block;
}

.country-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: #333;
    position: relative;
    z-index: 10000; /* Ensure it's above everything */
}

.country-option:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: #333;
}

.country-option * {
    pointer-events: none; /* Make sure clicks go to the link, not to children */
}

.country-option.active {
    background-color: #e9ecef;
    font-weight: 600;
}

.country-option span {
    font-size: 14px;
}

/* Mobile Menu Country Toggle */
.mobile-menu-country-toggle {
    margin: 20px 0;
    padding: 10px 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-menu-country-toggle .country-toggle {
    margin-left: 0;
    display: block;
}

.mobile-menu-country-toggle .country-dropdown {
    position: relative;
    top: 10px;
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 10px;
    max-height: 200px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .country-toggle {
        margin-left: 0;
        margin-right: 10px;
    }
    
    .current-country span {
        display: none; /* Hide text on mobile to save space */
    }
    
    .current-country i {
        margin-left: 0;
    }
    
    .country-dropdown {
        right: -50px; /* Position dropdown better on mobile */
    }
}