html[dir="rtl"] {
    direction: rtl;
}

html[dir="ltr"] {
    direction: ltr;
}

/* زر تغيير اللغة */
.lang-switcher {
    display: flex;
    width: 100%;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e8edf3;
}

.lang-switcher a {
    display: none;
}

.lang-switcher a:not(.is-active) {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #f3f8fc;
    border: 1px solid #b9e2f7;
    color: #1d3557;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lang-switcher a:not(.is-active)::before {
    content: "🌐";
    margin-inline-end: 8px;
}

.lang-switcher a:not(.is-active):hover {
    background: #e8f5fc;
    border-color: #85cdec;
}

/* إذا ظهر في الهيدر خارج القائمة */
.site-header .lang-switcher,
.header-actions .lang-switcher {
    width: auto;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.site-header .lang-switcher a:not(.is-active),
.header-actions .lang-switcher a:not(.is-active) {
    width: auto;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 999px;
}

/* الفورم حسب اللغة */
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    direction: rtl;
}

html[dir="ltr"] input,
html[dir="ltr"] textarea,
html[dir="ltr"] select {
    direction: ltr;
}

input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type="time"] {
    direction: ltr;
}