/* Card languages (test5 2.6): the language menu, left-to-right layout and fonts for other scripts.
   Loaded only when the card has more than one language or shows a language not written in Persian/Arabic script. */

/* Language menu: a small pill at the top right, above every entrance animation. */
.lang-switch{position:fixed;top:max(12px,env(safe-area-inset-top));right:12px;z-index:2147483600;font:500 12px/1.4 var(--fa);color:#50141a}
.intro-video .lang-switch{top:calc(max(12px,env(safe-area-inset-top)) + 62px)}
.lang-switch summary{list-style:none;display:flex;align-items:center;gap:6px;min-height:40px;min-width:40px;padding:6px 12px;border:1px solid #e0caca;border-radius:22px;background:#fffcf8e8;box-shadow:0 3px 14px #420b1122;cursor:pointer;-webkit-tap-highlight-color:transparent;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);direction:ltr}
.lang-switch summary::-webkit-details-marker{display:none}
.lang-switch summary svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.4}
.lang-switch summary span{letter-spacing:.06em;font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
.lang-switch summary:focus-visible{outline:3px solid #741a23;outline-offset:3px}
.lang-switch ul{position:absolute;top:calc(100% + 8px);right:0;margin:0;padding:6px;list-style:none;min-width:190px;max-height:min(70vh,460px);overflow:auto;background:#fffdfa;border:1px solid #e3cecd;border-radius:14px;box-shadow:0 12px 34px #420b1133;animation:langIn .18s ease}
.lang-switch li a{display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 12px;border-radius:9px;text-decoration:none;color:#50141a;font-size:14px;line-height:1.5}
.lang-switch li a b{display:inline-grid;place-items:center;min-width:30px;height:22px;border-radius:6px;background:#f5f0e8;color:#73161f;font:600 10px/1 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;letter-spacing:.05em}
.lang-switch li a:hover,.lang-switch li a:focus-visible{background:#f9f5ee;outline:none}
.lang-switch li a[aria-current]{background:#f2ebdf;font-weight:600}
.lang-switch li a[aria-current] b{background:#73161f;color:#ffffff}
/* During the quiz the menu moves to the lower corner, clear of the quiz's progress bar. */
.quiz-active .lang-switch{top:auto;bottom:max(14px,env(safe-area-inset-bottom));right:auto;left:12px}
.quiz-active .lang-switch ul{top:auto;bottom:calc(100% + 8px);right:auto;left:0}
@keyframes langIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.lang-switch ul{animation:none}}

/* Fonts. Persian, Arabic, Dari and Pashto keep the card's own fonts; other scripts use the phone's
   built-in fonts, so nothing extra is downloaded and every letter has a proper glyph. */
html{--display:var(--fa)}
html[data-script=latin],html[data-script=other]{--fa:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--display:Georgia,"Palatino Linotype","Book Antiqua",Palatino,"Times New Roman",serif}
html[data-script=cjk]{--fa:"PingFang SC","Hiragino Sans GB","Noto Sans CJK SC","Noto Sans SC","Source Han Sans SC","Microsoft YaHei",system-ui,sans-serif;--display:"Songti SC","Noto Serif CJK SC","Noto Serif SC","Source Han Serif SC",STSong,SimSun,"PingFang SC",serif}
html[data-script=devanagari]{--fa:"Noto Sans Devanagari","Kohinoor Devanagari","Nirmala UI",Mangal,system-ui,sans-serif;--display:"Noto Serif Devanagari","Kohinoor Devanagari","Nirmala UI",Mangal,serif}
html:not([data-script=arabic]) :is(.section-heading h2,.dress-code-heading h2,.venue-card h2,.message-content h2,.wedding-form h3,.veil-name strong,.special-guest,.special-card h2,.closing-copy,.personal-welcome strong,.program-copy h3,.guestbook-wall h3,.shared-moments h3,.media-unavailable h1){font-family:var(--display);line-height:1.45;padding-block:2px 8px}
html:not([data-script=arabic]) body{line-height:1.8}
html:not([data-script=arabic]) .invitation-copy{line-height:2}
html[data-script=latin] .hero-kicker,html[data-script=latin] .section-heading p:first-child:not(.rsvp-notice),html[data-script=latin] .section-kicker,html[data-script=latin] .media-kicker{letter-spacing:.14em;text-transform:uppercase}
html:not([data-script=arabic]) .dress-swatch figcaption{overflow-wrap:normal;word-break:normal;white-space:nowrap;font-size:10px;letter-spacing:0}
html:not([data-script=arabic]) .program-day span{font-size:9.5px;letter-spacing:.02em}
html[data-script=cjk] .hero-kicker,html[data-script=cjk] .section-heading p:first-child{letter-spacing:.2em}

/* Left-to-right languages: forms, counters and the gallery read from the left. */
html[dir=ltr] .wedding-form{text-align:left}
html[dir=ltr] .simple-countdown{direction:ltr}
html[dir=ltr] .program-copy{direction:ltr}
html[dir=ltr] .neshan-route i{display:inline-block}
html[dir=ltr] .guestbook-wall blockquote{text-align:left}
