/* 11/25 14:35 HBMIC Arabic pages only (/default/ar/*.php, html lang="ar" dir="rtl"). Plan A (11/25 decision): the whole screen is mirrored.
   Loaded after the page CSS on the 5 Arabic pages; Korean and the other 5 languages never load this file, so their screens do not change.
   dir="rtl" already mirrors flex rows, grids and text start. This file mirrors what is written with physical left/right:
   fixed corners (request button bottom-left, language bar bottom-right), absolute marks, progress bars, arrows, sheets.
   Not mirrored: numbers (1985, 22716), logo, photos and illustrations. The background video and canvas are mirrored (scaleX(-1)) so the busy part
   moves to the left and the text side (right) stays quiet (DESIGN.md background video rule).
   Font: Noto Sans Arabic (Google Fonts, linked in the page head) first, letter-spacing 0 (joined letters). */

html[dir=rtl]{--ls-h:0em;--ls-m:0em;--ls-b:0em;--ls-k:0;
  --f:'Noto Sans Arabic','Pretendard Variable',Pretendard,-apple-system,BlinkMacSystemFont,system-ui,sans-serif}
html[dir=rtl] .hb-main,html[dir=rtl] .hb-about,html[dir=rtl] .hb-lib7,html[dir=rtl] .hb-lib7 .app{
  --f:'Noto Sans Arabic','Pretendard Variable',Pretendard,-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  font-family:'Noto Sans Arabic','Pretendard Variable',Pretendard,-apple-system,BlinkMacSystemFont,system-ui,sans-serif;letter-spacing:0}
html[dir=rtl] #hbMain :where(h1,h2,h3,h4,p,a,span,b,strong,small,em,li,dt,dd,label,button,input,textarea,select,figcaption,th,td){letter-spacing:0}
html[dir=rtl] #hbMain :where(input,textarea,select,button){font-family:inherit}

/* ---------- common: header, PC dock, arrows ---------- */
html[dir=rtl] .hb-gnav{margin-left:0;margin-right:auto}
html[dir=rtl] .hb-main .hb-lang__list{right:auto;left:0}
@media (min-width:901px){
  /* request button bottom-left (arrow points left), language bar bottom-right */
  html[dir=rtl] .hb-dock{right:auto;left:max(var(--gut),env(safe-area-inset-left,0px));align-items:flex-start}
  html[dir=rtl] .hb-dock .hb-langbar{left:auto;right:max(var(--gut),env(safe-area-inset-right,0px))}
}
/* right arrows become left arrows; scale composes with the nudge/hover transforms, so they move left too */
html[dir=rtl] svg:has(> path[d="M4 12h15M13 6l6 6-6 6"]){scale:-1 1}
html[dir=rtl] .hb-menu__t::before{left:auto;right:-.42em}
html[dir=rtl] .hb-foot__info strong,html[dir=rtl] .hb-foot__info span{margin-right:0;margin-left:16px}
html[dir=rtl] .hb-main .hb-facts b{margin-right:0;margin-left:1px}

/* ---------- main: background video and canvas mirrored (busy part to the left, text side quiet); hbmain.js mirrors the pointer for the ripple ---------- */
html[dir=rtl] .hb-bg{transform:scaleX(-1)}
html[dir=rtl] .hb-big__u::after{transform-origin:var(--uo,right)} /* hbmain.js sets --uo right/left the other way round on Arabic pages */
html[dir=rtl] .hb-step__dot{left:auto;right:0}
html[dir=rtl] .hb-step__line{left:calc(-1 * clamp(16px,2vw,32px) + 10px);right:22px;transform-origin:right center}
@media (max-width:767px){
  html[dir=rtl] .hb-step{padding:0 36px 0 0}
  html[dir=rtl] .hb-step__line{left:auto;right:5.5px}
}
/* footer phone/fax: the number span stays inline so "FAX 053-588-9191" keeps its order */
html[dir=rtl] .hb-foot__info span span{display:inline;margin:0}

/* ---------- about ---------- */
html[dir=rtl] .hb-about .dots{right:auto;left:max(22px,env(safe-area-inset-left,0px))}
html[dir=rtl] .hb-about .dots a span{transform:translateX(-6px)}
html[dir=rtl] .hb-about .dots a:hover span,html[dir=rtl] .hb-about .dots a:focus-visible span,html[dir=rtl] .hb-about .dots a[aria-current="true"] span{transform:none}
html[dir=rtl] .hb-about .scr{padding-left:max(calc(var(--gut) + 44px),env(safe-area-inset-left,0px));padding-right:max(var(--gut),env(safe-area-inset-right,0px))}
html[dir=rtl] .hb-about .s3{padding-right:max(var(--gut),env(safe-area-inset-right,0px));padding-left:0}
html[dir=rtl] .hb-about .lab::after,html[dir=rtl] .hb-about .qtxt li .rule,html[dir=rtl] .hb-about .nums .tick{transform-origin:right}
html[dir=rtl] .hb-about .nums strong small{transform-origin:right bottom}
html[dir=rtl] .hb-about .isoBig .paper{transform-origin:right center}
html[dir=rtl] .hb-about .s1 .ph::after{background:linear-gradient(270deg,rgba(247,246,252,.97) 0%,rgba(247,246,252,.9) 30%,rgba(247,246,252,.3) 56%,rgba(247,246,252,0) 74%),linear-gradient(0deg,rgba(247,246,252,.75) 0%,rgba(247,246,252,0) 32%)}
html[dir=rtl] .hb-about .s1 .txt{left:var(--gut);right:max(var(--gut),env(safe-area-inset-right,0px))}
html[dir=rtl] .hb-about .s1 .meta span+span::before{margin-right:0;margin-left:18px}
html[dir=rtl] .hb-about .nums > div::before,html[dir=rtl] .hb-about .nums .tick{left:auto;right:0}
html[dir=rtl] .hb-about .area strong small{margin-left:0;margin-right:.15em}
html[dir=rtl] .hb-about .stagephoto figcaption{left:auto;right:20px}
html[dir=rtl] .hb-about .tl li::after{left:auto;right:0}
html[dir=rtl] .hb-about .map small{right:auto;left:14px}
html[dir=rtl] .hb-about .map::after{transform:rotate(3deg)}
html[dir=rtl] .hb-about .flow,html[dir=rtl] .hb-about .ab-main .flow{padding-left:0;padding-right:34px}
html[dir=rtl] .hb-about .flow svg{left:auto;right:0}
html[dir=rtl] .hb-about .flow .dot{left:auto;right:-34px}
html[dir=rtl] .hb-about .flow .rail{left:auto;right:5.5px}
html[dir=rtl] .hb-about .flow .rail::after{left:auto;right:-3px}
html[dir=rtl] .hb-about .ab-main button,html[dir=rtl] .hb-about .sheet button,html[dir=rtl] .hb-about .lb button{text-align:right}
html[dir=rtl] .hb-about .ab-main .morebtn:hover span{transform:translateX(-4px)}
html[dir=rtl] .hb-about .ab-main .morebtn em{margin-left:0;margin-right:8px}
html[dir=rtl] .hb-about .ab-main .qtxt .cty span:nth-child(n+3)::before{margin-right:0;margin-left:12px}
html[dir=rtl] #hbMain.hb-about .qtxt .cty span:nth-child(n+2):not(:last-child)::after{margin-left:0;margin-right:12px}
html[dir=rtl] .hb-about .sb .nm span{margin-left:0;margin-right:6px}
@media (min-width:901px){html[dir=rtl] .hb-about .tlfoot{padding-right:0;padding-left:200px}}
@media (max-width:900px){
  html[dir=rtl] .hb-about .scr{padding-left:max(var(--gut),env(safe-area-inset-left,0px))}
  html[dir=rtl] .hb-about .stagephoto figcaption{right:0}
}

/* ---------- process ---------- */
html[dir=rtl] .hb-proc .pp-list h3 small{margin-left:0;margin-right:8px}
html[dir=rtl] .pp-steps::after{left:auto;right:0}
html[dir=rtl] .pp-bead{left:auto;right:calc(var(--bp,1) / 6 * 100% - 5px);transition:right .7s cubic-bezier(.2,.7,.2,1),opacity .3s}
html[dir=rtl] .pp-sheet__in{padding:max(28px,env(safe-area-inset-top,0px)) 40px 40px max(32px,env(safe-area-inset-left,0px));transform:translateX(-100%);box-shadow:30px 0 80px rgba(17,44,112,.12)}
html[dir=rtl] .hb-proc .pp-faq dd{padding-left:0;padding-right:1.6em}
html[dir=rtl] #hbMain.hb-proc.pp-tr .pp-steps a{padding-right:0;padding-left:8px}

/* ---------- request ---------- */
html[dir=rtl] .hb-req .ans{padding-right:0;padding-left:8px}
html[dir=rtl] .hb-req .opt b{padding-right:0;padding-left:1.05em}
html[dir=rtl] .hb-req .opt b::after{right:auto;left:0;transform:translateX(4px)}
html[dir=rtl] .hb-req .opt b .pr,html[dir=rtl] .hb-req .est__n small{margin-left:0;margin-right:6px}
html[dir=rtl] .hb-req .est__n small{margin-right:.2em}
html[dir=rtl] .hb-req .prog::after{left:auto;right:0}
@media (min-width:901px){html[dir=rtl] .hb-req .right > .sum{padding-right:0;padding-left:4px}}

/* ---------- library ---------- */
html[dir=rtl] .hb-lib7 :where(.stage,.bar) :where(button){text-align:right}
html[dir=rtl] .hb-lib7 .index ol{border-left:0;border-right:1px solid var(--line)}
html[dir=rtl] .hb-lib7 .index .bar-i{left:auto;right:-2px}
html[dir=rtl] .hb-lib7 .sec{padding-left:0;padding-right:clamp(0px,2vw,40px)}
html[dir=rtl] .hb-lib7 .dbs label::before{transform-origin:right}
html[dir=rtl] .hb-lib7 .filters button sup{margin-left:0;margin-right:3px}
html[dir=rtl] .hb-lib7 .filters .find{margin-left:0;margin-right:auto}
html[dir=rtl] .hb-lib7 .det ul.pts li{padding-left:0;padding-right:18px}
html[dir=rtl] .hb-lib7 .det ul.pts li::before{left:auto;right:2px}
html[dir=rtl] .hb-lib7 .draft,html[dir=rtl] .hb-lib7 .res .cr .tag{margin-left:0;margin-right:8px}
html[dir=rtl] .hb-lib7 .res .cr p > .tag,html[dir=rtl] .hb-lib7 .res .cr p > .fx-sh + .tag,html[dir=rtl] .hb-lib7 .res .cr p > span + .tag{margin-left:0;margin-right:.6em}
html[dir=rtl] .hb-lib7 .res .cr small{text-align:left}
html[dir=rtl] .hb-lib7 .res .cau ul{padding-left:0;padding-right:1.1em}
html[dir=rtl] .hb-lib7 .search button::after{content:"\2190"}
html[dir=rtl] .hb-lib7 .search button:hover::after{transform:translateX(-4px)}
html[dir=rtl] .hb-lib7 .search .tp i{margin-left:0;margin-right:2px}
/* source labels such as "21 CFR 700 - FDA": direction from their own first letter, so a leading number stays in front */
html[dir=rtl] .hb-lib7 #orig small,html[dir=rtl] .hb-lib7 .fx-src,html[dir=rtl] .hb-lib7 .fx-sh{unicode-bidi:plaintext}
@media (min-width:901px){html[dir=rtl] .hb-lib7 .index{padding-left:0;margin-left:0;padding-right:3px;margin-right:-3px}}
@media (max-width:900px){
  html[dir=rtl] .hb-lib7 .index ol{border-right:0}
  html[dir=rtl] .hb-lib7 .filters .find{margin-right:0}
  html[dir=rtl] .hb-lib7 .search{padding:0 18px 0 6px}
  html[dir=rtl] .hb-lib7 .res .cr p,html[dir=rtl] .hb-lib7 .res .cr small{text-align:right}
}
/* "->" (U+2192) written as text: shown mirrored (points left); the hover nudge stays +4px, which the mirror turns into a move to the left */
html[dir=rtl] .hb-about .ab-main .morebtn .arrow{display:inline-block;scale:-1 1}
html[dir=rtl] .hb-about .ab-main .morebtn:hover .arrow{transform:translateX(4px)}
html[dir=rtl] .hb-about .stagephoto .bar i{margin-left:auto}
@media (min-width:901px){html[dir=rtl] .hb-lib7 .index button{padding-left:0;padding-right:20px}}
/* dates such as 2026-11-24 after Arabic words: kept in their own left-to-right box (otherwise shown as 24-11-2026) */
html[dir=rtl] #hbMain time{unicode-bidi:isolate;direction:ltr}
/* 11/25 18:00 consult window (builder edit): Arabic glyphs are taller; tight Korean line-height made title lines collide */
html[lang=ar] h1,html[lang=ar] h2,html[lang=ar] h3,html[lang=ar] .hb-title,html[lang=ar] .hb-title__l1,html[lang=ar] .hb-title__l2{line-height:1.45!important}
/* 11/25 18:15 consult window (builder edit): about history curve ran under the left dot-nav label (e.g. History) -> wider left gutter on desktop (11/26: 120 -> 124px, same as the other languages, so the curve stays 10px+ from the label) */
@media (min-width:901px){html[lang=ar] section.scr:not(.s3){padding-left:124px!important}}
/* 11/26: process question title lines are their own blocks (line-height 1.22 in hbproc.css), so the h2 rule above does not reach them */
html[lang=ar] .hb-proc .pp-s{line-height:1.45}
/* 11/27 11:00 numbers: the digit columns of rolling numbers (about .roll, main/process .hb-roll) run left to right; inline boxes followed the page direction, so 40 showed as 04.
   The number stays one box, so the unit (years, countries, +) keeps its Arabic place. */
html[dir=rtl] .roll,html[dir=rtl] .hb-roll{direction:ltr;unicode-bidi:isolate}
/* 11/27 11:00 client logo band: in RTL the list sits on the right edge and overflows to the left, so moving it left (-50%) left the band empty.
   It moves right (+50%) instead: the logos flow left to right and the second copy takes the first one's place with no gap. */
html[dir=rtl] .hb-about .marq ul{animation-name:ab-marq-r}
@keyframes ab-marq-r{to{transform:translateX(50%)}}
/* 11/27 11:30 about 07: the Kakao map itself stays left to right (in RTL its line layer was misplaced and the walking route did not show); the bubble text keeps dir=rtl */
html[dir=rtl] .hb-about #abMap{direction:ltr}