/* Al Badr Language Switcher - Front End Styles */

.albadr-lang-auto-wrap {
    position: relative;
    z-index: 9999;
}

.albadr-lang-switcher {
    position: relative;
    display: inline-block;
    font-family: inherit;
    margin: 8px 12px;
}

.albadr-lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #38484d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.albadr-lang-current:hover {
    border-color: #38484d;
}

.albadr-flag-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.albadr-caret {
    transition: transform 0.2s ease;
    color: #888;
}

.albadr-lang-switcher.open .albadr-caret {
    transform: rotate(180deg);
}

.albadr-lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 150px;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    list-style: none;
    margin: 0;
    padding: 6px;
    z-index: 10000;
}

.albadr-lang-switcher.open .albadr-lang-dropdown {
    display: block;
}

.albadr-lang-dropdown li {
    margin: 0;
    padding: 0;
}

.albadr-lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    padding: 8px 10px;
    font-size: 13px;
    color: #38484d;
    cursor: pointer;
    border-radius: 5px;
    text-align: left;
}

.albadr-lang-option:hover {
    background: #f5f5f5;
}

.albadr-lang-option.active {
    background: #f0f7f0;
    font-weight: 600;
}

/* ===========================================
   RTL SUPPORT - applied when Arabic is active
   =========================================== */

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .albadr-lang-switcher {
    direction: ltr; /* keep switcher itself readable */
}

html[dir="rtl"] .albadr-lang-dropdown {
    left: auto;
    right: 0;
}

html[dir="rtl"] .albadr-lang-option {
    text-align: right;
}

/* Flip common WooCommerce / Woodmart layout elements for RTL */
html[dir="rtl"] .site-header,
html[dir="rtl"] .whb-general-header,
html[dir="rtl"] .woocommerce ul.products,
html[dir="rtl"] .woocommerce-cart-form,
html[dir="rtl"] .cart-collaterals {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .price ins,
html[dir="rtl"] .price del {
    unicode-bidi: plaintext;
}

/* Hide Google Translate's default banner + branding so only our switcher shows */
.goog-te-banner-frame,
.goog-te-gadget-icon,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight {
    display: none !important;
    background: none !important;
    box-shadow: none !important;
}
body {
    top: 0 !important;
}
.skiptranslate iframe {
    display: none !important;
}
