/* Currency Switcher Styling with Custom Flags */
.wcml-dropdown,
.beloved-currency-switcher .wcml-dropdown {
    width: auto !important;
    max-width: 100% !important;
}

.wcml-dropdown li,
.beloved-currency-switcher .wcml-dropdown li {
    border: none !important;
    background-color: transparent !important;
}

.wcml-dropdown a.wcml-cs-item-toggle,
.beloved-currency-switcher .wcml-cs-item-toggle {
    display: flex !important;
    align-items: center !important;
    padding: 5px 10px !important;
    line-height: 1.5 !important;
    border: none !important;
    text-decoration: none !important;
}

.wcml-dropdown a.wcml-cs-item-toggle:after,
.beloved-currency-switcher .wcml-cs-item-toggle:after {
    margin-left: 8px !important;
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    border-width: 4px !important;
}

/* Disable native CSS flags only - don't touch JS flags */
.wcml-dropdown .wcml-cs-active-currency > a.wcml-cs-item-toggle:before,
.wcml-dropdown .currency_code_SAR > a.wcml-cs-item-toggle:before,
.wcml-dropdown li.wcml-cs-active-currency > a.wcml-cs-item-toggle:before,
body .beloved-currency-switcher .wcml-cs-active-currency > a.wcml-cs-item-toggle:before,
body .wcml-dropdown .wcml-cs-active-currency > a.wcml-cs-item-toggle:before,
.beloved-currency-switcher a.wcml-cs-item-toggle:before,
.wcml-dropdown a.wcml-cs-item-toggle:before {
    display: none !important;
}

/* Disable :before flags from native code */
.wcml-dropdown .currency_code_KWD > a.wcml-cs-item-toggle:before,
body .beloved-currency-switcher .currency_code_KWD > a.wcml-cs-item-toggle:before,
body .wcml-dropdown .currency_code_KWD > a.wcml-cs-item-toggle:before,
.wcml-dropdown .currency_code_SAR > a.wcml-cs-item-toggle:before,
body .beloved-currency-switcher .currency_code_SAR > a.wcml-cs-item-toggle:before,
body .wcml-dropdown .currency_code_SAR > a.wcml-cs-item-toggle:before,
.wcml-dropdown .currency_code_QAR > a.wcml-cs-item-toggle:before,
body .beloved-currency-switcher .currency_code_QAR > a.wcml-cs-item-toggle:before,
body .wcml-dropdown .currency_code_QAR > a.wcml-cs-item-toggle:before {
    display: none !important;
}

/* Make sure JS-added flags show correctly */
.currency-flag {
    display: inline-block !important;
    width: 20px !important;
    height: 15px !important;
    margin-right: 10px !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    flex-shrink: 0 !important;
}

/* Dropdown styling - more compact */
.wcml-dropdown .wcml-cs-submenu,
.beloved-currency-switcher .wcml-cs-submenu,
.wcml-dropdown-click .js-wcml-dropdown-click-submenu,
.beloved-currency-switcher .wcml-dropdown-click .js-wcml-dropdown-click-submenu {
    border: 1px solid #eaeaea !important;
    padding: 0 !important;
    min-width: 0 !important;
    width: auto !important;
    background-color: #fff !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    z-index: 999 !important;
}

/* Fix width for dropdown items */
.wcml-dropdown .wcml-cs-submenu li,
.beloved-currency-switcher .wcml-cs-submenu li,
.wcml-dropdown-click .js-wcml-dropdown-click-submenu li,
.beloved-currency-switcher .wcml-dropdown-click .js-wcml-dropdown-click-submenu li {
    width: auto !important;
    white-space: nowrap !important;
}

.wcml-dropdown .wcml-cs-submenu a,
.beloved-currency-switcher .wcml-cs-submenu a,
.wcml-dropdown-click .js-wcml-dropdown-click-submenu a,
.beloved-currency-switcher .wcml-dropdown-click .js-wcml-dropdown-click-submenu a {
    padding: 8px 10px !important;
    display: flex !important;
    align-items: center !important;
    width: auto !important;
}

.wcml-dropdown .wcml-cs-submenu a:hover,
.beloved-currency-switcher .wcml-cs-submenu a:hover,
.wcml-dropdown-click .js-wcml-dropdown-click-submenu a:hover,
.beloved-currency-switcher .wcml-dropdown-click .js-wcml-dropdown-click-submenu a:hover {
    background-color: #f9f9f9 !important;
}

/* Specific styles for currency dropdown with click */
.wcml-dropdown-click,
.beloved-currency-switcher .wcml-dropdown-click {
    width: auto !important;
    max-width: 100% !important;
}

.wcml-dropdown-click li,
.beloved-currency-switcher .wcml-dropdown-click li {
    border: none !important;
    background-color: transparent !important;
    width: auto !important;
}

.wcml-dropdown-click a.js-wcml-dropdown-click-toggle,
.beloved-currency-switcher .js-wcml-dropdown-click-toggle {
    display: flex !important;
    align-items: center !important;
    padding: 5px 10px !important;
    line-height: 1.5 !important;
    border: none !important;
    text-decoration: none !important;
    width: auto !important;
}

/* Compact width adjustments */
.wcml-dropdown-click .wcml-cs-active-currency,
.beloved-currency-switcher .wcml-dropdown-click .wcml-cs-active-currency {
    width: auto !important;
}

.wcml-dropdown-click .wcml-cs-active-currency > a,
.beloved-currency-switcher .wcml-dropdown-click .wcml-cs-active-currency > a {
    width: auto !important;
    white-space: nowrap !important;
}

.wcml-dropdown-click .js-wcml-dropdown-click-submenu,
.beloved-currency-switcher .wcml-dropdown-click .js-wcml-dropdown-click-submenu {
    width: auto !important;
    min-width: 0 !important;
}

/* RTL support */
.rtl .wcml-dropdown a.wcml-cs-item-toggle:after,
.rtl .beloved-currency-switcher a.wcml-cs-item-toggle:after {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

.rtl .wcml-dropdown a.wcml-cs-item-toggle:before,
.rtl .beloved-currency-switcher a.wcml-cs-item-toggle:before {
    margin-right: 0 !important;
    margin-left: 5px !important;
}

/* Additional mobile styles */
@media (max-width: 767px) {
    .wcml-dropdown a.wcml-cs-item-toggle,
    .beloved-currency-switcher .wcml-cs-item-toggle {
        padding: 3px 8px !important;
    }
} 