/* ==========================================================================
   Sun Siyam Member Portal — site.css
   Consolidated from:
     - GuestSmartApp.Web/Areas/Portal/Views/Shared/_Layout.cshtml
     - GuestSmartApp.Web/Areas/Portal/Views/SiyamRewards/Login.cshtml
     - GuestSmartApp.Web/Areas/Portal/Views/SiyamRewards/Signup.cshtml
   ========================================================================== */


/* ==========================================================================
   1. FONTS
   ========================================================================== */

@font-face {
    font-family: 'Dahlia Medium';
    src: url('https://ucarecdn.com/25ec9ae0-0db0-4d06-b002-6dbf0b8f520e/dahliamedium.woff2') format('woff2'),
         url('https://ucarecdn.com/5e17bd8b-80a3-44de-880c-55eec72aa98d/dahliamedium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Rework Display';
    src: url('https://ucarecdn.com/15d829ae-7639-4f7a-9518-d9519d245a4a/ReworkDisplayTRIALBoldBF64b75902cb5ea.woff2') format('woff2'),
         url('https://ucarecdn.com/67eb95ec-dffc-466f-b814-dfd46f96091f/ReworkDisplayTRIALBoldBF64b75902cb5ea.woff') format('woff');
    font-weight: 500;
    font-style: bold;
}

@font-face {
    font-family: 'Good Sans';
    src: url('https://ucarecdn.com/83634ef9-e89b-455e-a3ad-c53d8bb474cf/GoodSansRegular.woff2') format('woff2'),
         url('https://ucarecdn.com/caf9ac03-a8d3-4928-8c44-96bd8e987ddd/GoodSansRegular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}


/* ==========================================================================
   2. FONT FAMILY ASSIGNMENTS
   ========================================================================== */

h1, h2, h3, h4, .dahlia-font {
    font-family: 'Dahlia Medium', georgia, serif;
}

p, .good-sans-font {
    font-family: 'Good Sans', arial, verdana;
}

nav, button, .rework-display-font {
    font-family: 'Rework Display', 'Arial Black', arial;
    letter-spacing: 0.4em;
    text-transform: uppercase;
}


/* ==========================================================================
   3. BASE
   ========================================================================== */

body {
    background-color: #e7e1d5;
}

header, #menu-overlay {
    font-size: 13px;
}


/* ==========================================================================
   4. HERO BACKGROUND
   ========================================================================== */

.hero-bg::before {
    transition: all 100ms ease-out;
    content: " ";
    display: block;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.hero-bg {
    /* background-image intentionally left empty; use .hero-bg-image for the photo */
}

.hero-bg-image {
    background-image: url('//images.pixieset.com/33471049/6d1d75bc606a3b2ee3ddfadc0621df63-cover.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.1s ease-out;
    /* Start slightly larger to allow for zoom-out effect */
    transform: scale(1.20);
}


/* ==========================================================================
   5. HEADER
   ========================================================================== */

.header-shadow {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-transition {
    transition: all 0.3s ease-in-out;
}

/* Language dropdown visibility — mirrors the two-hamburger pattern (#hamburger in
   the fixed header vs #hamburger-hero inside the hero section): over the transparent
   header the hero's z-layers paint ABOVE the fixed header, so header controls can
   never receive clicks there. The HEADER instance (#lang-switcher, black) therefore
   shows only in the solid state; the HERO instance (#lang-switcher-hero, white,
   rendered next to #hamburger-hero by the home partials) serves the transparent
   state. Both rules key off the ONE "solid" signal every code path already emits —
   .header-shadow on #header (scroll handler + offer pages' pin script) — so exactly
   one trigger is visible/interactive at any moment, with no flash of both during the
   scroll transition. visibility+pointer-events (not display:none) keep the trigger's
   footprint, so the hamburger never shifts, and drop the hidden trigger from the tab
   order. The general-sibling selector works because #header precedes the RenderBody
   content (where #hero-section lives) as a child of <body>. */
#lang-switcher {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#header.header-shadow #lang-switcher {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#lang-switcher-hero {
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#header.header-shadow ~ #hero-section #lang-switcher-hero {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


/* ==========================================================================
   6. MENU OVERLAY (full-page, mirrors sunsiyam.com offcanvas)
   ========================================================================== */

/* Full-screen panel — appears/disappears instantly, no transition */
.menu-overlay {
    transform: translateY(100%);
    visibility: hidden;
    overflow-y: auto;
}

.menu-overlay.open {
    transform: translateY(0);
    visibility: visible;
}

/* Big serif primary nav links with the curved-arrow hover marker */
.menu-nav-link {
    font-family: 'Dahlia Medium', georgia, serif;
    letter-spacing: normal;
    text-transform: none;
    position: relative;
    width: fit-content;
    line-height: 1;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.menu-nav-link::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 10px;
    background-color: #1a1a1a;
    -webkit-mask-image: url('https://www.sunsiyam.com/assets/img/left-curved-arrow.svg');
    mask-image: url('https://www.sunsiyam.com/assets/img/left-curved-arrow.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: left center;
    mask-position: left center;
    -webkit-mask-size: contain;
    mask-size: contain;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Hover reveals the website's curved-arrow marker; text colour stays constant. */
.menu-nav-link:hover::before {
    opacity: 1;
}

/* Collection label (Luxury / Privé / Lifestyle) */
.menu-collection-label {
    font-family: 'Rework Display', 'Arial Black', arial;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-weight: 700;
    font-size: 13px;
    color: #2b2e34;
    padding-top: 0.25rem;
}

/* Secondary auth menu items (Sign Up / Log In / Log Out) — match each other */
.menu-auth-link {
    display: block;
    width: fit-content;
    padding: 0;
    border: none;
    background: none;
    color: #1a1a1a;
    font-family: 'Rework Display', 'Arial Black', arial;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.menu-auth-link:hover {
    opacity: 0.6;
}

/* Resort card (image + title + country) */
.resort-card__image {
    position: relative;
    padding-top: 58.265%;
    overflow: hidden;
}

.resort-card__image::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #000;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.resort-card__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

.resort-card:hover .resort-card__image::before {
    opacity: 0.2;
}

.resort-card:hover .resort-card__image img {
    transform: scale(1.05);
}

.resort-card__title {
    font-family: 'Good Sans', arial, verdana;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    margin-top: 0.65rem;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.resort-card:hover .resort-card__title {
    color: #BA8C66;
}

.resort-card__country {
    font-family: 'Good Sans', arial, verdana;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.78rem;
    color: #818181;
    margin-top: 0.15rem;
}

/* Close control reuses the shared .hamburger styles (section 7), shown as an X. */

/* Small footer link row inside the menu */
.menu-footer-link {
    font-family: 'Good Sans', arial, verdana;
    text-transform: none;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
    color: #2b2e34;
    transition: color 0.3s ease;
}

.menu-footer-link:hover {
    color: #BA8C66;
}


/* ==========================================================================
   7. HAMBURGER
   ========================================================================== */

.hamburger-line {
    transition: all 0.3s ease-in-out;
}

.hamburger.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(14px, 13px);
}

.hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}


/* ==========================================================================
   8. BUTTONS
   ========================================================================== */

.ss-button-white {
    display: flex;
    justify-content: center;
    border: 1px solid #ffffff;
    border-radius: 9999px;
    min-width: 11rem;
    transition: all 0.2s ease;
    background-color: #ffffff20;
    color: #ffffff;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    cursor: pointer;
}

.ss-button-black {
    display: flex;
    justify-content: center;
    border: 1px solid #000000;
    border-radius: 9999px;
    min-width: 11rem;
    transition: all 0.2s ease;
    background-color: #ffffff20;
    color: #000000;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    cursor: pointer;
}

.ss-button-black-option {
    display: flex;
    justify-content: center;
    border: 1px solid #000000;
    border-radius: 9999px;
    min-width: 11rem;
    transition: all 0.2s ease;
    background-color: #f1a8517a;
    color: #000000;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    cursor: pointer;
}

.ss-linkbutton-black {
    display: flex;
    justify-content: center;
    transition: all 0.2s ease;
    color: #000000;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    cursor: pointer;
}


/* ==========================================================================
   9. FOOTER
   ========================================================================== */

footer a {
    color: #000;
    text-decoration: none;
    transition: color 0.4s ease;
}

footer a:hover {
    color: #BA8C66;
}

footer input {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #000;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    outline: 0;
    height: 40px;
    width: 100%;
}


/* ==========================================================================
   10. OVERLAY LOADING
   ========================================================================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.overlay.active .loading-card {
    transform: scale(1);
}


/* ==========================================================================
   11. LOADING BUTTON SPINNER
   ========================================================================== */

.loading-button {
    position: relative;
    cursor: pointer;
}

.loading-button.loading {
    background: #95a5a6;
    pointer-events: none;
}

.loading-button .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-button.loading .spinner {
    opacity: 1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.loading-subtext {
    color: #7f8c8d;
    font-size: 14px;
}

@keyframes spin {
    0%   { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}


/* ==========================================================================
   12. STYLED LIST (arrow bullets)
   ========================================================================== */

.styled-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #000;
}

.styled-list li {
    position: relative;
    border-bottom: 2px solid;
    font-weight: 500;
    line-height: normal;
    padding: 26px 0 26px 30px;
}

.styled-list li::before {
    background-image: url(https://www.sunsiyam.com/assets/img/left-curved-arrow.svg);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    content: '';
    position: absolute;
    left: 0;
    margin-top: 4px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    height: 24px;
    width: 12px;
}


/* ==========================================================================
   13. FORM — INPUT
   ========================================================================== */

.input-style {
    background-color: #efeae2;
    border: 1px solid #d1c7b8;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    width: 100%;
    font-family: 'Good Sans', arial, verdana;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.input-style:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}


/* ==========================================================================
   14. FORM — SELECT
   ========================================================================== */

.select-style {
    background-color: #efeae2;
    border: 1px solid #d1c7b8;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    width: 100%;
    font-family: 'Good Sans', arial, verdana;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.select-style:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}


/* ==========================================================================
   15. FORM — LABEL
   ========================================================================== */

.form-label {
    font-family: 'Rework Display', 'Arial Black', arial;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}


/* ==========================================================================
   16. FORM — CHECKBOX
   ========================================================================== */

.checkbox-container {
    display: flex;
    align-items: flex-start;
    margin: 1rem 0;
}

.checkbox-container input[type="checkbox"] {
    margin-inline-end: 0.75rem; /* logical property — correct in both LTR and RTL */
    margin-top: 0.125rem;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.checkbox-container label {
    font-family: 'Good Sans', arial, verdana;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.4;
}


/* ==========================================================================
   17. PASSWORD REQUIREMENTS
   ========================================================================== */

.password-requirements {
    font-family: 'Good Sans', arial, verdana;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.password-requirements li {
    margin-bottom: 0.25rem;
}

.password-requirement {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.password-requirement .icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.password-requirement.valid .icon {
    background-color: #2d675b;
    color: white;
}

.password-requirement.invalid .icon {
    background-color: #c06235;
    color: white;
}

.password-requirement.neutral .icon {
    background-color: #e1d4ba;
    color: #6b7280;
}

.password-requirement.valid {
    color: #2d675b;
}

.password-requirement.invalid {
    color: #c06235;
}

.password-requirement.neutral {
    color: #6b7280;
}

.terms-text {
    font-family: 'Good Sans', arial, verdana;
    font-size: 0.75rem;
    color: #374151;
    line-height: 1.4;
}

.terms-text a {
    color: #000000;
    text-decoration: underline;
}

.terms-text a:hover {
    opacity: 0.7;
}


/* ==========================================================================
   18. PRICE CALENDAR MODAL
   ========================================================================== */

.price-calendar-backdrop {
    transition: opacity 300ms ease;
}

.price-calendar-card {
    transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.price-calendar-card.closing {
    transition-duration: 200ms;
    transition-timing-function: ease;
}

/* Calendar grid */
.calendar-day {
    cursor: default;
    user-select: none;
}

/* Price fade-in after loading */
.calendar-day [data-price] {
    transition: opacity 200ms ease;
}


/* ==========================================================================
   19. BENEFIT ICON
   ========================================================================== */

.benefit-icon {
    width: 3rem;
    height: 3rem;
    background-color: #d4a574;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}


/* ==========================================================================
   Social auth
   ========================================================================== */

/* Vertical stack containing the social button(s), disclaimer, and divider */
.social-cluster {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Wrapper form — no visual styling needed */
.social-form {
    display: contents;
}

/* Base social button — shared across all providers */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;           /* WCAG 2.5.5 tap target */
    padding: 0.625rem 1rem;
    border-radius: 9999px;
    border: 1px solid #dadce0;
    background-color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    font-family: 'Good Sans', arial, verdana;
}

.social-btn:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

.social-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Google variant */
.social-btn--google:hover:not(:disabled) {
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.2);
}

/* Apple variant */
.social-btn--apple {
    background-color: #000000;
    border-color: #000000;
}

.social-btn--apple .social-btn__label {
    color: #ffffff;
}

.social-btn--apple:hover:not(:disabled) {
    background-color: #1a1a1a;
}

.social-btn--apple:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Facebook variant */
.social-btn--facebook {
    background-color: #1877F2;
    border-color: #1877F2;
}

.social-btn--facebook .social-btn__label {
    color: #ffffff;
}

.social-btn--facebook:hover:not(:disabled) {
    background-color: #166FE5;
}

.social-btn--facebook:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Provider logo */
.social-btn__logo {
    flex-shrink: 0;
    margin-inline-end: 12px;
}

/* Provider label — #3c4043 on white = 9.6:1 contrast ratio */
.social-btn__label {
    font-size: 14px;
    color: #3c4043;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}

/* Horizontal "or" divider */
.or-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
    font-family: 'Good Sans', arial, verdana;
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #d1c7b8;
}

/* Small disclaimer text below the social button */
.social-disclaimer {
    font-family: 'Good Sans', arial, verdana;
    font-size: 12px;
    color: #4b5563;     /* gray-600 — 7.6:1 on #e7e1d5 background */
    line-height: 1.4;
    text-align: center;
}

.social-disclaimer a {
    color: #374151;
    text-decoration: underline;
}

.social-disclaimer a:hover {
    opacity: 0.7;
}

/* Base banner */
.banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    font-family: 'Good Sans', arial, verdana;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Red alert banner — #991b1b on #fef2f2 = 7.5:1 contrast ratio */
.banner--alert {
    background-color: #fef2f2;
    border-left: 4px solid #f87171;
    color: #991b1b;
}

/* Soft-notice (cancelled) banner — #374151 on #f9fafb = 11.8:1 contrast ratio */
.banner--soft-notice {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    color: #374151;
}

/* Dismiss button inside banners */
.banner__dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.15s ease;
    font-family: inherit;
    letter-spacing: normal;
    text-transform: none;
    min-height: auto;
}

.banner__dismiss:hover {
    opacity: 1;
}

.banner__dismiss:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 2px;
}


/* ==========================================================================
   CMS rich text
   Typography for rich-text fragments rendered from the CMS. The renderer
   output is class-free by design; views wrap each fragment in a
   <div class="cms-richtext"> container styled here (Tailwind's preflight
   zeroes element margins, so spacing must be restored explicitly).
   ========================================================================== */

.cms-richtext p {
    margin-bottom: 1.25rem;
}

.cms-richtext p:last-child {
    margin-bottom: 0;
}

.cms-richtext strong {
    font-weight: 700;
}

.cms-richtext em {
    font-style: italic;
}

.cms-richtext a {
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.cms-richtext a:hover {
    opacity: 0.7;
}

.cms-richtext h2,
.cms-richtext h3 {
    margin: 2rem 0 0.75rem;
}

.cms-richtext h2 {
    font-size: 1.5rem;
}

.cms-richtext h3 {
    font-size: 1.25rem;
}

.cms-richtext ul,
.cms-richtext ol {
    margin: 0 0 1.25rem;
    padding-inline-start: 1.5rem; /* logical property — bullets sit right under dir="rtl" */
}

.cms-richtext ul {
    list-style: disc;
}

.cms-richtext ol {
    list-style: decimal;
}

.cms-richtext li {
    margin-bottom: 0.375rem;
}


/* ==========================================================================
   LOCALIZATION — RTL (Arabic) + non-Latin typography (CMS Phase 3, Tech doc §7)
   Scoped mirrors for physical-position rules (Tailwind rtl: variants cover the
   utility classes in markup), Arabic typography kills, and per-script system
   font-fallback stacks. No new webfonts in v1 (plan decision 24).
   ========================================================================== */

/* --- RTL mirrors for absolutely-positioned ::before markers --------------- */

html[dir="rtl"] .menu-nav-link::before {
    left: auto;
    right: -26px;
}

html[dir="rtl"] .styled-list li::before {
    left: auto;
    right: 0;
}

/* --- Arabic typography kills ----------------------------------------------
   The brand rule's 0.4em tracking breaks Arabic cursive joining and uppercase
   is meaningless for it — neutralise both wherever the brand treatment applies. */

html[lang="ar"] nav,
html[lang="ar"] button,
html[lang="ar"] .rework-display-font,
html[lang="ar"] .menu-collection-label,
html[lang="ar"] .form-label,
html[lang="ar"] .menu-auth-link {
    letter-spacing: normal;
    text-transform: none;
}

/* --- Arabic font stack -----------------------------------------------------
   The three brand webfonts are Latin-only and the heading fallback (georgia)
   has NO Arabic glyphs — explicit overrides including headings. Broad Arabic
   coverage across Windows/macOS/iOS/Android system stacks. */

html[lang="ar"] body,
html[lang="ar"] p,
html[lang="ar"] nav,
html[lang="ar"] button,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .dahlia-font,
html[lang="ar"] .good-sans-font,
html[lang="ar"] .rework-display-font {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* --- Chinese (Simplified) font stack + display-tracking cap (≤ 0.05em) ---- */

html[lang="zh"] body,
html[lang="zh"] p,
html[lang="zh"] nav,
html[lang="zh"] button,
html[lang="zh"] h1,
html[lang="zh"] h2,
html[lang="zh"] h3,
html[lang="zh"] h4,
html[lang="zh"] .dahlia-font,
html[lang="zh"] .good-sans-font,
html[lang="zh"] .rework-display-font {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

html[lang="zh"] nav,
html[lang="zh"] button,
html[lang="zh"] .rework-display-font,
html[lang="zh"] .menu-collection-label,
html[lang="zh"] .form-label,
html[lang="zh"] .menu-auth-link {
    letter-spacing: 0.05em;
}

/* --- Language-switcher self-names inside an LTR page -----------------------
   Each switcher item carries its own lang attribute (UX doc §4.1); render the
   Arabic and Chinese self-names in their proper scripts with no tracking even
   when the surrounding page is another language. */

#menu-overlay [lang="ar"] {
    letter-spacing: normal;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

#menu-overlay [lang="zh"] {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}
