/* Farsi interface typography and RTL layout. Loaded only on drpal.org. */

/* Self-hosted so the page does not depend on Google Fonts (often blocked in Iran).
   Vazirmatn is licensed under the SIL OFL, see src/webfonts/Vazirmatn-OFL.txt */
@font-face { font-family: 'Vazirmatn'; src: url('/src/webfonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/src/webfonts/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/src/webfonts/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/src/webfonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }

/* YouTube is blocked in Iran; hide the embedded promo video */
html[lang="fa"] #home-promo-video {
    display: none;
}

html[lang="fa"] body,
html[lang="fa"] button,
html[lang="fa"] input,
html[lang="fa"] textarea,
html[lang="fa"] select {
    font-family: 'Vazirmatn', 'Inter', sans-serif !important;
}

html[lang="fa"] h1,
html[lang="fa"] h2,
html[lang="fa"] h3,
html[lang="fa"] p {
    letter-spacing: 0 !important;
}

/* Tailwind space-x-* uses margin-left; flip it for RTL */
html[dir="rtl"] [class*="space-x-"] > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* Mobile header: push login + hamburger to the far (left) side */
html[dir="rtl"] nav .ml-auto {
    margin-right: auto;
    margin-left: 0;
}

/* Mobile accordion submenus indent from the right */
html[dir="rtl"] #mobile-menu .pl-4 {
    padding-left: 0;
    padding-right: 1rem;
}
html[dir="rtl"] #mobile-menu .text-left {
    text-align: right;
}

/* Arrows point in reading direction */
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .phd-expert-cta svg {
    transform: scaleX(-1);
}

/* Service buttons: roomy padding on the text side (now the right) */
html[dir="rtl"] #service-sections .service-btn {
    padding: 0 1.5rem 0 0.5rem;
}

/* Hero store badges use a negative left margin for LTR alignment */
html[dir="rtl"] #home .lg\:ml-\[-12\%\] {
    margin-left: 0;
}

/* Emails, phone numbers stay left-to-right while typing */
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"] {
    direction: ltr;
    text-align: right;
}
html[dir="rtl"] input[type="email"]:not(:placeholder-shown),
html[dir="rtl"] input[type="tel"]:not(:placeholder-shown) {
    text-align: left;
}

/* Doctor Assistant stepper: rail on the right */
html[dir="rtl"] .da-step {
    text-align: right;
}

/* Text-left blocks become text-right */
html[dir="rtl"] main .text-left {
    text-align: right;
}

/* Shared page typography, including components with their own font rules. */
html[lang="fa"] :is(h1,h2,h3,h4,h5,h6,p,a,label,span,strong,li,th,td):not([class*="fa-"]) {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    letter-spacing: normal;
}
html[dir="rtl"] .text-left { text-align: right; }
html[dir="rtl"] :is(ul,ol).list-disc { padding-inline-start: 1.5rem; }
html[dir="rtl"] input:is([type="password"],[type="url"],[type="number"],[type="date"]) { direction: ltr; }
html[dir="rtl"] :is(textarea,[contenteditable],#blog-detail-body,#transcriptionText,#summaryBox,#soapBox,#recommendBox) { unicode-bidi: plaintext; text-align: start; }
html[dir="rtl"] :is(#togglePasswordBtn,#togglePasswordBtn1,#togglePasswordBtn2,#toggleConfirmPasswordBtn) { right: auto; left: .75rem; }
html[dir="rtl"] input[type="password"] { padding-inline-end: 2.75rem; }
html[dir="rtl"] .admin-sidebar { border-right: 0; border-left: 1px solid #e5e7eb; }
@media (max-width: 1023px) {
    html[dir="rtl"] .admin-sidebar { transition: right .25s ease; left: auto; right: calc(-1 * min(280px, 85vw)); }
    html[dir="rtl"] .admin-sidebar.open { left: auto; right: 0; }
}
html[dir="rtl"] [dir="ltr"] { direction: ltr; text-align: left; unicode-bidi: isolate; }
