/* =======================================================
   OUTFITD  –  i18n Layout & Language Switcher Styles
   ======================================================= */

/* ── Base direction (Arabic RTL) ──────────────────────── */
html[dir="rtl"] {
    direction: rtl;
}

/* ── Arabic typography ───────────────────────────────── */
html[lang="ar"] body,
html[lang="ar"] p,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] span:not(.logo-accent),
html[lang="ar"] div,
html[lang="ar"] button,
html[lang="ar"] a,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] label {
    font-family: 'Amiri', 'Cormorant Garamond', Georgia, serif;
}

/* ── Mandarin / CJK typography ───────────────────────── */
html[lang="zh"] body,
html[lang="zh"] p,
html[lang="zh"] h1,
html[lang="zh"] h2,
html[lang="zh"] h3,
html[lang="zh"] h4,
html[lang="zh"] span:not(.logo-accent),
html[lang="zh"] div,
html[lang="zh"] button,
html[lang="zh"] a,
html[lang="zh"] input,
html[lang="zh"] textarea,
html[lang="zh"] label {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* Keep brand name / logo visually LTR regardless */
html[dir="rtl"] .logo,
html[dir="rtl"] .hero-logo,
html[dir="rtl"] .footer-logo,
html[dir="rtl"] .logo-accent {
    direction: ltr;
    unicode-bidi: embed;
}

/* ── Progress bar ────────────────────────────────────── */
html[dir="rtl"] .progress-track {
    transform: scaleX(-1);
}

/* ── Quiz slide animations ───────────────────────────── */
html[dir="rtl"] .question-slide {
    transform: translateX(-60px);
}

html[dir="rtl"] .question-slide.active {
    transform: translateX(0);
}

html[dir="rtl"] .question-slide.exit-left {
    transform: translateX(60px);
}

html[dir="rtl"] .question-slide.enter-right {
    transform: translateX(-60px);
}

html[dir="rtl"] .question-slide.enter-left {
    transform: translateX(60px);
}

html[dir="rtl"] .question-slide.exit-right {
    transform: translateX(-60px);
}

/* ── Back button ─────────────────────────────────────── */
html[dir="rtl"] .back-btn {
    left:  auto;
    right: 24px;
}

html[dir="rtl"] .back-btn svg {
    transform: scaleX(-1);
}

@media (max-width: 768px) {
    html[dir="rtl"] .back-btn {
        left:  auto;
        right: 16px;
    }
}

/* ── Form inputs ─────────────────────────────────────── */
html[dir="rtl"] input[type="text"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] textarea {
    text-align: right;
}

/* ── Pricing card text ───────────────────────────────── */
html[dir="rtl"] .pricing-tier {
    text-align: right;
}

/* ── Step grid (How It Works) ────────────────────────── */
html[dir="rtl"] .step {
    direction: rtl;
}

/* ─────────────────────────────────────────────────────────
   LANGUAGE SWITCHER  –  Dropdown (select-based)
───────────────────────────────────────────────────────── */
.lang-switcher {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.lang-switcher .lang-select {
    /* Reset browser defaults */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Luxury aesthetic */
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--text-dim, #F5F0EB);

    background-color: transparent;
    border: 1px solid var(--border, rgba(201, 168, 76, 0.2));
    padding: 6px 28px 6px 10px;
    cursor: pointer;
    outline: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    opacity: 0.7;
    line-height: 1;

    /* Dropdown arrow via background-image */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23C9A84C' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 8px 5px;
}

.lang-switcher .lang-select:hover,
.lang-switcher .lang-select:focus {
    color: var(--accent, #C9A84C);
    border-color: var(--accent, rgba(201, 168, 76, 0.6));
    background-color: var(--accent-glow, rgba(201, 168, 76, 0.06));
    opacity: 1;
}

/* Option elements inherit some system styling — keep readable */
.lang-switcher .lang-select option {
    background-color: #111111;
    color: #F5F0EB;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: none;
    padding: 6px;
}

/* RTL: flip the arrow position */
html[dir="rtl"] .lang-switcher .lang-select {
    padding: 6px 10px 6px 28px;
    background-position: left 8px center;
}
