/* Country Switch Popup Currency Selector Styles */

/* Target the currency selector specifically within the popup */
#country-switch-popup #alg_currency_selector {
    width: 100%;
    margin: 0;
    padding: 0;
}



/* Hide the original select when wSelect is active (flags enabled) */
#country-switch-popup #alg_currency_select.alg-wselect {
    display: none !important;
}

/* Style the select element (when flags are disabled) */
#country-switch-popup #alg_currency_select:not(.alg-wselect) {
    width: 100% !important;
    max-width: none !important;
    padding: 12px 16px;
    font-size: 16px;
    font-family: 'Noto Serif Display', serif;
    font-weight: 500;
    color: var(--theme-primary-text);
    background-color: var(--theme-background);
    border: 2px solid var(--theme-primary-text);
    border-radius: 8px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%234C311D' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Hover state for regular select */
#country-switch-popup #alg_currency_select:not(.alg-wselect):hover {
    border-color: var(--theme-primary-text);
    background-color: var(--theme-background);
    color: var(--theme-primary-text);
}

/* Focus state for regular select */
#country-switch-popup #alg_currency_select:not(.alg-wselect):focus {
    outline: none;
    border-color: var(--theme-primary-text);
    box-shadow: 0 0 0 3px rgba(76, 49, 29, 0.1);
    background-color: var(--theme-background);
    color: var(--theme-primary-text);
}

/* Style the options for regular select */
#country-switch-popup #alg_currency_select:not(.alg-wselect) option {
    padding: 12px 16px;
    font-size: 16px;
    font-family: 'Noto Serif Display', serif;
    font-weight: 500;
    color: var(--theme-primary-text);
    background-color: var(--theme-background);
    border: none;
}

/* Selected option for regular select */
#country-switch-popup #alg_currency_select:not(.alg-wselect) option:checked {
    background-color: var(--theme-background);
    color: var(--theme-primary);
}

/* Hover state for options in regular select */
#country-switch-popup #alg_currency_select:not(.alg-wselect) option:hover {
    background-color: var(--theme-background);
    color: var(--theme-primary);
}

/* Disable the default dropdown arrow for webkit browsers */
#country-switch-popup #alg_currency_select:not(.alg-wselect)::-ms-expand {
    display: none;
}

/* Custom styling for when flags are enabled */
#country-switch-popup .wSelect,
#country-switch-popup .wSelect-theme-classic,
#country-switch-popup .wSelect-active {
    width: 100% !important;
    max-width: none !important;
    border: 2px solid var(--theme-primary-text) !important;
    border-radius: 8px !important;
    background-color: var(--theme-background) !important;
    font-family: 'Noto Serif Display', serif !important;
    font-weight: 500 !important;
    color: var(--theme-primary-text) !important;
    transition: all 0.2s ease-in-out !important;
    min-height: 48px !important;
    position: relative !important;
}

#country-switch-popup .wSelect:hover {
    border-color: var(--theme-primary-text) !important;
    background-color: var(--theme-background) !important;
    color: var(--theme-primary-text) !important;
}

#country-switch-popup .wSelect-active {
    border-color: var(--theme-primary-text) !important;
    box-shadow: 0 0 0 3px rgba(76, 49, 29, 0.1) !important;
}

/* Style the selected text area */
#country-switch-popup .wSelect-selected {
    padding: 12px 16px !important;
    font-size: 16px !important;
    color: var(--theme-primary-text) !important;
    margin: 0 35px 0 5px !important;
    background-position: 0 center !important;
    background-repeat: no-repeat !important;
    background-size: 20px !important;
    padding-left: 30px !important;
}

/* Style the dropdown arrow */
#country-switch-popup .wSelect-arrow {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%234C311D' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 16px !important;
    width: 30px !important;
    height: 100% !important;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
}

/* Style the dropdown options container */
#country-switch-popup .wSelect-options-holder {
    border: 2px solid var(--theme-primary-text) !important;
    border-radius: 8px !important;
    background-color: var(--theme-background) !important;
    box-shadow: 0 10px 25px rgba(76, 49, 29, 0.1) !important;
    margin-top: 4px !important;
    min-width: 100% !important;
    z-index: 1000 !important;
}

/* Style individual options */
#country-switch-popup .wSelect-option {
    padding: 12px 16px !important;
    font-size: 16px !important;
    color: var(--theme-primary-text) !important;
    border-bottom: 1px solid var(--theme-primary-text) !important;
    transition: background-color 0.2s ease-in-out !important;
    background-color: var(--theme-background) !important;
    cursor: pointer !important;
}

#country-switch-popup .wSelect-option:hover {
    background-color: var(--theme-background) !important;
    color: var(--theme-primary) !important;
}

#country-switch-popup .wSelect-option-selected {
    background-color: var(--theme-background) !important;
    color: var(--theme-primary) !important;
}

/* Style the option values (text with flag icons) */
#country-switch-popup .wSelect-option-value {
    margin: 0 5px !important;
    padding: 5px 0 !important;
    background-position: 0 center !important;
    background-repeat: no-repeat !important;
    background-size: 20px !important;
    padding-left: 30px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

/* Remove the last option's border */
#country-switch-popup .wSelect-option-last {
    border-bottom: none !important;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #country-switch-popup #alg_currency_select:not(.alg-wselect),
    #country-switch-popup .wSelect-selected,
    #country-switch-popup .wSelect-option {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    #country-switch-popup #alg_currency_select:not(.alg-wselect) {
        padding-right: 36px;
        background-size: 14px;
    }
    
    #country-switch-popup .wSelect {
        min-height: 44px !important;
    }
    
    #country-switch-popup .wSelect-selected {
        font-size: 14px !important;
        padding: 10px 14px !important;
        padding-left: 26px !important;
        background-size: 18px !important;
    }
    
    #country-switch-popup .wSelect-option-value {
        font-size: 14px !important;
        padding: 5px 0 !important;
        padding-left: 26px !important;
        background-size: 18px !important;
    }
}

/* Dark mode support (if your theme supports it) */
@media (prefers-color-scheme: dark) {
    #country-switch-popup #alg_currency_select:not(.alg-wselect),
    #country-switch-popup .wSelect {
        background-color: var(--theme-background) !important;
        border-color: var(--theme-primary) !important;
        color: var(--theme-primary-text) !important;
    }
    
    #country-switch-popup #alg_currency_select:not(.alg-wselect):hover,
    #country-switch-popup .wSelect:hover {
        background-color: var(--theme-background) !important;
        border-color: var(--theme-primary) !important;
    }
    
    #country-switch-popup #alg_currency_select:not(.alg-wselect):focus,
    #country-switch-popup .wSelect-active {
        border-color: var(--theme-primary) !important;
        background-color: var(--theme-background) !important;
    }
    
    #country-switch-popup #alg_currency_select:not(.alg-wselect) option,
    #country-switch-popup .wSelect-option {
        background-color: var(--theme-background) !important;
        color: var(--theme-primary-text) !important;
    }
    
    #country-switch-popup .wSelect-options-holder {
        background-color: var(--theme-background) !important;
        border-color: var(--theme-primary) !important;
    }
    
    #country-switch-popup .wSelect-option:hover {
        background-color: var(--theme-background) !important;
    }
} 