/*
 * TouchScreens Oman — Project brief (owner: projects agent). Design: RFQ Project Brief.dc.html (inline styles = spec).
 * Without JS every step shows as one long form (html:not(.o-js)); with JS only the current step shows.
 */

/* ---------- Hero ---------- */
.o-bhero { position: relative; padding: 160px var(--gutter) 40px; overflow: hidden; }
.o-bhero__pattern { -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%); }
.o-bhero__in { position: relative; }
.o-bhero__h1 {
  margin: 12px 0 0; max-width: 18ch; font-size: clamp(36px, 5vw, 68px); line-height: 1.04;
  letter-spacing: var(--track-tight); font-weight: 800;
}
.o-bhero__lede { margin: 16px 0 0; max-width: 620px; color: var(--lede); font-size: 16.5px; line-height: 1.7; }

/* ---------- Layout ---------- */
.o-brief { padding: 0 var(--gutter) 100px; }
.o-brief__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 28px; align-items: start; }
.o-brief__card {
  border-radius: 30px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(70, 45, 20, .08); overflow: hidden; min-width: 0;
}
.o-brief__form { margin: 0; }
.o-brief fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.o-brief legend { padding: 0; }

/* ---------- Stepper ---------- */
.o-bstepper {
  list-style: none; margin: 0; padding: 22px clamp(18px, 3vw, 34px); border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
html:not(.o-js) .o-bstepper { display: none; }
.o-bstepper__btn {
  width: 100%; background: none; border: 0; padding: 0; text-align: start; font: inherit; color: inherit;
  display: flex; flex-direction: column; gap: 10px; cursor: pointer;
}
.o-bstepper__btn[disabled] { cursor: default; }
.o-bstepper__bar { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.o-bstepper__bar > span { display: block; height: 100%; width: 0; background: var(--cta); transition: width .5s var(--ease); }
.o-bstepper__row { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted-4); min-width: 0; }
.o-bstepper__dot {
  width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px;
  background: var(--line); color: var(--muted-4); transition: background-color .3s, color .3s;
}
.o-bstepper__ok { display: none; font-size: 12px; }
.o-bstepper__label { line-height: 1.3; }
.o-bstepper li.is-current .o-bstepper__bar > span { width: 50%; }
.o-bstepper li.is-done .o-bstepper__bar > span { width: 100%; }
.o-bstepper li.is-current .o-bstepper__row, .o-bstepper li.is-done .o-bstepper__row { color: var(--ink); }
.o-bstepper li.is-current .o-bstepper__dot { background: var(--cta); color: #fff; }
.o-bstepper li.is-done .o-bstepper__dot { background: var(--oman-green); color: #fff; }
.o-bstepper li.is-done .o-bstepper__n { display: none; }
.o-bstepper li.is-done .o-bstepper__ok { display: block; }

/* ---------- Steps ---------- */
.o-brief__body { padding: clamp(22px, 3vw, 36px); min-height: 460px; }
html:not(.o-js) .o-brief__body { min-height: 0; }
.o-bstep { display: flex; flex-direction: column; gap: 26px; }
.o-bstep[data-panel="3"] { gap: 22px; }
.o-bstep[data-panel="4"] { gap: 18px; }
html:not(.o-js) .o-bstep + .o-bstep { margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }
.o-js .o-bstep { display: none; }
.o-js .o-brief__form[data-step="1"] .o-bstep[data-panel="1"],
.o-js .o-brief__form[data-step="2"] .o-bstep[data-panel="2"],
.o-js .o-brief__form[data-step="3"] .o-bstep[data-panel="3"],
.o-js .o-brief__form[data-step="4"] .o-bstep[data-panel="4"] { display: flex; }
@media (prefers-reduced-motion: no-preference) {
  .o-js .o-bstep.is-entering { animation: o-bstep-in .45s var(--ease) both; }
  [dir="rtl"].o-js .o-bstep.is-entering, [dir="rtl"] .o-js .o-bstep.is-entering { animation-name: o-bstep-in-rtl; }
}
@keyframes o-bstep-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes o-bstep-in-rtl { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

.o-bstep__head { display: flex; flex-direction: column; float: none; width: 100%; margin-bottom: 26px; }
.o-bstep[data-panel="1"] > .o-bstep__head, .o-bstep[data-panel="3"] > .o-bstep__head { margin-bottom: 22px; }
.o-bstep[data-panel="4"] > .o-bstep__head { margin-bottom: 18px; }
.o-bstep__h { display: block; margin: 0; font-size: 26px; line-height: 1.25; font-weight: 800; color: var(--ink); }
.o-bstep__sub { display: block; margin: 6px 0 0; color: var(--muted-2); font-size: 16px; line-height: 1.5; }
.o-bstep__h:focus { outline: none; }
.o-bstep__err { margin-top: -12px; }

.o-blabel { display: block; font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.o-blabel--sm { font-size: 13px; margin-bottom: 8px; }
.o-bgroup > .o-field__err { margin-top: 8px; }

/* Step 1 — room type cards */
.o-btypes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.o-btype { position: relative; display: flex; cursor: pointer; }
.o-btype input, .o-bpill input, .o-bextra input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.o-btype__ui {
  flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px;
  border: 1.5px solid var(--line-12); background: var(--surface); color: var(--ink); text-align: start;
  transition: border-color .2s, background-color .2s, transform .2s, box-shadow .2s;
}
.o-btype:hover .o-btype__ui { border-color: var(--accent-line-strong); }
.o-btype__top { display: flex; justify-content: space-between; align-items: center; }
.o-btype__g { font-family: var(--ruqaa); font-size: 30px; line-height: 1; color: var(--copper); }
.o-btype__chk, .o-bextra__chk {
  display: grid; place-items: center; flex: none; color: var(--on-ink); font-size: 11px;
  border: 1.5px solid var(--line-12); background: transparent; transition: background-color .2s, border-color .2s;
}
.o-btype__chk { width: 22px; height: 22px; border-radius: 50%; }
.o-btype__chk .o-icon, .o-bextra__chk .o-icon { opacity: 0; }
.o-btype__h { font-weight: 800; font-size: 16px; line-height: 1.3; }
.o-btype__p { font-size: 13px; color: var(--muted-2); line-height: 1.5; }
.o-btype input:checked + .o-btype__ui { border-color: var(--cta); background: var(--cta-softer); transform: translateY(-2px); }
.o-btype input:checked + .o-btype__ui .o-btype__chk { background: var(--cta); border-color: var(--cta); }
.o-btype input:checked + .o-btype__ui .o-icon, .o-bextra input:checked + .o-bextra__ui .o-icon { opacity: 1; }
.o-btype input:focus-visible + .o-btype__ui, .o-bpill input:focus-visible + span, .o-bextra input:focus-visible + .o-bextra__ui { outline: 2px solid var(--cta); outline-offset: 2px; }

/* Pills (single choice) */
.o-bpills { display: flex; flex-wrap: wrap; gap: 8px; }
.o-bpill { position: relative; display: inline-flex; cursor: pointer; }
.o-bpill > span {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line-16); background: var(--surface); color: var(--ink);
  font: 700 13.5px var(--font); padding: 10px 16px; border-radius: var(--r-pill); transition: background-color .2s, color .2s, border-color .2s;
}
.o-bpill:hover > span { border-color: var(--ink); }
.o-bpill input:checked + span { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.o-bpills--sm .o-bpill > span { font-size: 13px; padding: 9px 14px; }

/* Rooms slider */
.o-brooms__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.o-brooms__top .o-blabel { margin: 0; }
.o-brooms__val { font-size: 34px; font-weight: 800; line-height: 1.2; color: var(--copper); font-variant-numeric: tabular-nums; }
.o-brooms__range { display: block; width: 100%; margin: 8px 0 4px; accent-color: var(--cta); cursor: pointer; }
.o-brooms__scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-4); }

/* Extras (multi choice) */
.o-bextras { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.o-bextra { position: relative; display: flex; cursor: pointer; }
.o-bextra__ui {
  flex: 1; display: flex; gap: 10px; align-items: center; text-align: start; border: 1.5px solid var(--line-14); background: var(--surface);
  color: var(--ink); font: 600 13.5px var(--font); padding: 12px 14px; border-radius: 14px; transition: border-color .2s, background-color .2s;
}
.o-bextra:hover .o-bextra__ui { border-color: var(--accent-line-strong); }
.o-bextra__chk { width: 18px; height: 18px; border-radius: 6px; border-color: var(--line-14); }
.o-bextra input:checked + .o-bextra__ui { border-color: var(--cta); background: var(--cta-softer); }
.o-bextra input:checked + .o-bextra__ui .o-bextra__chk { background: var(--cta); border-color: var(--cta); }

/* Fields */
.o-btwo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.o-btwo--wide { gap: 16px; }
.o-brief .o-field { font-size: 13px; font-weight: 700; color: var(--ink); }
.o-brief .o-field > label, .o-blabel { line-height: normal; }
.o-brief .o-input { border-color: var(--line-14); font-weight: 500; font-size: 14px; }
.o-brief .o-input:focus { border-color: var(--cta); }
.o-bnotes { resize: vertical; min-height: 84px; }
.o-btref { margin-top: 10px; }
.o-js .o-btref { display: none; }
.o-js [data-tender].is-tender .o-btref { display: flex; }
.o-bconsent { font-size: 12.5px; line-height: 1.6; color: var(--muted-2); }
.o-bconsent a { text-decoration: underline; text-underline-offset: 3px; }

/* Files */
.o-bfiles { display: flex; flex-direction: column; }
.o-bfiles > .o-blabel { font-size: 13px; margin-bottom: 8px; }
.o-bdrop { position: relative; display: block; cursor: pointer; }
.o-bdrop__in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
html:not(.o-js) .o-bdrop__in { position: static; opacity: 1; font-size: 14px; margin-bottom: 10px; }
.o-bdrop__ui {
  display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center;
  border: 1.5px dashed var(--accent-line-strong); border-radius: 16px; padding: 22px; background: #fffaf3;
  color: var(--copper-hover); font-weight: 600; font-size: 13px; line-height: normal; transition: background-color .2s, border-color .2s;
}
.o-bdrop:hover .o-bdrop__ui, .o-bdrop.is-over .o-bdrop__ui { background: #fff3e3; border-color: var(--cta); }
.o-bdrop:focus-within .o-bdrop__ui { outline: 2px solid var(--cta); outline-offset: 2px; }
.o-bdrop__ico { flex: none; }
.o-bfiles__hint { margin-top: 8px; font-size: 12px; color: var(--muted-4); }
.o-bfiles__list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.o-bfile {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; padding-inline: 14px 10px;
  border-radius: 12px; background: var(--bg); border: 1px solid var(--line-10); font-size: 13.5px;
}
.o-bfile__ext { flex: none; font: 800 10.5px var(--mono); padding: 4px 6px; border-radius: 6px; background: var(--sand); color: var(--copper-hover); text-transform: uppercase; }
.o-bfile__name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-bfile__size { flex: none; color: var(--muted-4); font-size: 12px; font-variant-numeric: tabular-nums; }
.o-bfile__rm {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center;
  background: var(--tint-06); color: var(--text-ui); font-size: 12px; cursor: pointer;
}
.o-bfile__rm:hover { background: var(--ink); color: var(--on-ink); }
.o-bfiles > .o-field__err { margin-top: 8px; }

/* ---------- Bar ---------- */
.o-brief__formerr { margin: 0 clamp(18px, 3vw, 34px) 16px; padding: 12px 14px; border-radius: 12px; background: #fff1ef; border: 1px solid rgba(214, 40, 46, .25); color: #b3261e; font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.o-brief__nojs { margin: 0 clamp(18px, 3vw, 34px) 26px; padding: 14px 16px; border-radius: 14px; background: var(--sand); color: var(--text-ui); font-size: 14px; line-height: 1.6; }
.o-brief__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px clamp(18px, 3vw, 34px); border-top: 1px solid var(--line); background: #fdfaf5;
}
/* Without JS the long form posts normally (LeadFormFallback redirects back): only the Send button shows. */
html:not(.o-js) .o-brief__bar { justify-content: flex-end; }
html:not(.o-js) .o-bbtn--back, html:not(.o-js) .o-brief__stepof { display: none; }
.o-brief__stepof { font-size: 12.5px; color: var(--muted-4); text-align: center; }
.o-bbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border-radius: var(--r-pill);
  font-family: var(--font); line-height: 1.3; text-align: center; transition: background-color .2s, opacity .2s, box-shadow .2s;
}
.o-bbtn--back { border: 1px solid var(--line-16); background: var(--surface); padding: 12px 20px; font-weight: 700; font-size: 14px; color: var(--ink); }
.o-bbtn--back:hover { border-color: var(--ink); }
.o-bbtn--back[aria-disabled="true"] { opacity: .4; cursor: default; }
.o-bbtn--back[aria-disabled="true"]:hover { border-color: var(--line-16); }
.o-bbtn--next {
  border: 0; background: var(--cta); color: var(--cta-ink); padding: 13px 24px; font-weight: 800; font-size: 14.5px;
  box-shadow: 0 10px 26px rgba(233, 138, 44, .3);
}
.o-bbtn--next:hover { background: var(--cta-hover); }
.o-bbtn--next[aria-disabled="true"] { background: var(--oman-white); cursor: not-allowed; }
.o-bbtn--next[aria-disabled="true"] .o-bbtn__arrow { display: none; }
.o-bbtn--next.is-busy { opacity: .75; cursor: progress; }

/* ---------- Success ---------- */
.o-bdone { padding: clamp(30px, 5vw, 60px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; outline: none; }
.o-bdone[hidden] { display: none; }
.o-bdone__thanks { font-family: var(--ruqaa); font-size: 46px; color: var(--copper); line-height: 1.1; }
.o-bdone__h { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.25; }
.o-bdone__p { max-width: 480px; color: var(--lede); line-height: 1.7; font-size: 16px; }
.o-bdone__ref { font: 700 15px var(--mono); padding: 10px 16px; border-radius: 12px; background: var(--sand); color: var(--copper-hover); }
.o-bdone__next { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; width: 100%; max-width: 640px; text-align: start; }
.o-bdone__tile { border-radius: 16px; border: 1px solid var(--line); padding: 14px; }
.o-bdone__w { font-size: 11px; font-weight: 800; color: var(--copper); }
.o-bdone__th { margin-top: 4px; font-weight: 700; font-size: 14px; line-height: 1.45; }
.o-bdone__more { margin-top: 10px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
@media (prefers-reduced-motion: no-preference) {
  .o-bdone.is-in .o-bdone__check { animation: o-bpop .6s both; }
  .o-bdone.is-in .o-bdone__check circle { animation: o-bring .9s .1s both; }
}
@keyframes o-bpop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes o-bring { from { stroke-dashoffset: 190; } to { stroke-dashoffset: 0; } }

/* ---------- Rail ---------- */
.o-brief__rail { position: sticky; top: calc(var(--o-bar-bottom, 100px) + 16px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.o-bsum { border-radius: 24px; background: var(--surface); border: 1px solid var(--line); padding: 22px; line-height: normal; }
.o-bsum__h, .o-bnext__h { font-size: 11.5px; font-weight: 800; letter-spacing: var(--track-eyebrow-sm); color: var(--muted-3); }
.o-bsum__list { margin: 12px 0 0; display: flex; flex-direction: column; }
.o-bsum__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-06); font-size: 13.5px; line-height: normal; }
.o-bsum__row dt { color: var(--muted-2); flex: none; }
.o-bsum__row dd { margin: 0; font-weight: 700; text-align: end; min-width: 0; overflow-wrap: anywhere; }
.o-bnext { position: relative; overflow: hidden; border-radius: 24px; background: var(--deep-red); color: var(--deep-red-soft); padding: 22px; }
.o-bnext > * { position: relative; }
.o-bnext__wm { position: absolute !important; right: -10px; bottom: -40px; font-family: var(--ruqaa); font-size: 130px; line-height: 1; color: rgba(255, 228, 210, .07); pointer-events: none; user-select: none; }
.o-bnext__h { color: var(--deep-red-eyebrow); line-height: normal; }
.o-bnext__list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.o-bnext__list li { display: flex; gap: 12px; }
.o-bnext__w { font-size: 11px; font-weight: 800; color: #ffb866; min-width: 54px; line-height: normal; flex: none; }
.o-bnext__t { font-size: 13.5px; color: var(--deep-red-text); line-height: 1.5; }
.o-bprefer { border-radius: 24px; background: var(--sand); padding: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: normal; }
.o-bprefer__h { font-weight: 800; }
.o-bprefer__wa { display: flex; justify-content: center; gap: 5px; padding: 12px; border-radius: 14px; background: var(--wa); color: var(--wa-ink); font-weight: 800; }
.o-bprefer__wa:hover { background: #3be07a; color: var(--wa-ink); }
[dir="rtl"] .o-bprefer__wa { line-height: 18px; } /* QA polish: the Arabic label would otherwise grow the line box 7px past the design's 42px button */
.o-bprefer__mail { text-align: center; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .o-brief__grid { grid-template-columns: minmax(0, 1fr); }
  .o-brief__rail { position: static; }
  .o-bstepper li:not(.is-current) .o-bstepper__label { display: none; }
  html:not(.o-js) .o-bstepper__label { display: inline; }
}
@media (max-width: 640px) {
  .o-btwo { grid-template-columns: 1fr; }
  /* The action bar keeps the design's gap and paddings here too, so the step label and "Select at least one" wrap to two lines as designed. */
}

.o-brief__form { position: relative; }

/* Arabic: the design leaves most line-heights at "normal", which is taller for Noto Kufi Arabic. */
[dir="rtl"] .o-bsum__row, [dir="rtl"] .o-bconsent { line-height: 1.85; }
[dir="rtl"] .o-bdone__h { line-height: 1.6; }
/* QA: the stepper labels, step headings, subtitles and type-card titles stay at "normal" as in the design; the type-card text is 1.5 as designed. */
[dir="rtl"] .o-bstepper__label, [dir="rtl"] .o-bstep__h, [dir="rtl"] .o-bstep__sub, [dir="rtl"] .o-btype__h { line-height: normal; }
[dir="rtl"] .o-btype__p { line-height: 1.5; }
/* QA: the italic accent in the hero heading keeps the heading's tight tracking (0 in Arabic). */
.o-bhero__h1 .o-accent { letter-spacing: inherit; }
[dir="rtl"] .o-bhero__h1 .o-accent { letter-spacing: 0; }
/* Pills, chips, extras and bar buttons keep the design's padding and line-height "normal" in Arabic too. */
[dir="rtl"] .o-bpill > span, [dir="rtl"] .o-bextra__ui, [dir="rtl"] .o-bbtn { line-height: normal; }
/* The "What happens next" rows keep the design's line-heights in Arabic too (normal / 1.5): 165px box at 1440, as designed. */
html:not(.o-js) .o-bdrop__ui { display: none; }
[dir="rtl"] .o-brief .o-field > label, [dir="rtl"] .o-blabel { line-height: 1.9; }

/* QA: the brief hero eyebrow uses the smaller tracking (.14em; 0 in Arabic via the token). */
.o-bhero .o-eyebrow { letter-spacing: var(--track-eyebrow-sm); }
