/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* Make the active currency bold */
.custom-currency-list .current-menu-item a {
    font-weight: bold;
    color: #333; /* Change this to your preferred active color */
}

/* Ensure it aligns correctly in the top bar */
.custom-currency-list {
    display: inline-flex;
    margin-bottom: 0;
}


/* Wrapper alignment - Compact for 40px top bar */
.bicifix-delivery-selector {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 8px;
    position: relative;
    height: 100%;
    max-height: 40px;
}

/* Compact Select Style */
.bicifix-delivery-selector select {
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1px dotted transparent !important;
    color: inherit;
    font-size: 12px;
    font-weight: 400;
    font-family: inherit;
    text-transform: none;
    padding: 0 16px 0 0;
    margin: 0;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: 1.2;
    height: auto;
    min-height: 0;
    max-height: 40px;
    width: auto;
    max-width: 100%;
    vertical-align: middle;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

/* Custom dropdown arrow - smaller and compact */
.bicifix-delivery-selector::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid currentColor;
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Hover effect - make it more obvious it's clickable */
.bicifix-delivery-selector:hover {
    opacity: 1;
}

.bicifix-delivery-selector:hover::after {
    opacity: 0.9;
    transform: translateY(-50%) scale(1.1);
}

.bicifix-delivery-selector select:hover {
    opacity: 1;
    border-bottom-color: currentColor !important;
}

/* Focus state for accessibility */
.bicifix-delivery-selector select:focus {
    opacity: 1;
}

.bicifix-delivery-selector:focus-within::after {
    opacity: 1;
}

/* Ensure proper text color inheritance in top bar */
.whb-top-bar .bicifix-delivery-selector,
.whb-header .bicifix-delivery-selector {
    color: inherit;
}

.whb-top-bar .bicifix-delivery-selector select,
.whb-header .bicifix-delivery-selector select {
    color: inherit;
}

/* Make it fit within top bar height constraints */
.whb-top-bar .bicifix-delivery-selector {
    max-height: var(--wd-top-bar-h, 40px);
    height: 100%;
}

.whb-top-bar .bicifix-delivery-selector select {
    max-height: var(--wd-top-bar-h, 40px);
    line-height: var(--wd-top-bar-h, 40px);
    padding-top: 0;
    padding-bottom: 0;
}

/* Prevent Select2 styling on checkout and other pages */
.bicifix-delivery-selector select[data-bicifix-no-select2],
.bicifix-delivery-selector select.country_select {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 40px !important;
}

/* Hide Select2 container if it gets created */
.bicifix-delivery-selector .select2-container,
.bicifix-delivery-selector + .select2-container {
    display: none !important;
}

/* Override any Select2 styles that might be applied */
.bicifix-delivery-selector select.select2-hidden-accessible {
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
    clip: auto !important;
    clip-path: none !important;
    width: auto !important;
    height: auto !important;
}

/* Ensure our styles override Select2 on all pages including checkout */
body.woocommerce-checkout .bicifix-delivery-selector select,
body.woocommerce-checkout .bicifix-delivery-selector select.country_select {
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1px dotted transparent !important;
    border-radius: 0 !important;
    padding: 0 16px 0 0 !important;
    margin: 0 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 40px !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

body.woocommerce-checkout .bicifix-delivery-selector {
    display: inline-flex !important;
    align-items: center !important;
    max-height: 40px !important;
    height: 100% !important;
}

body.woocommerce-checkout .bicifix-delivery-selector::after {
    display: block !important;
}

/* Responsive scaling */
@media (max-width: 768px) {
    .bicifix-delivery-selector {
        margin-left: 6px;
    }
    
    .bicifix-delivery-selector select {
        padding-right: 14px;
        font-size: 11px;
    }
    
    .bicifix-delivery-selector::after {
        border-left-width: 2.5px;
        border-right-width: 2.5px;
        border-top-width: 3.5px;
        right: 1px;
    }
}