/* HOTELLIX design system: base element styles. Colours, sizes and spacing come from tokens.css. */

/* ---------------------------------------------------------------- document */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--ds-header-h) + var(--ds-sp-4));
  scroll-padding-bottom: calc(var(--ds-tabbar-h) + var(--ds-safe-bottom) + var(--ds-sp-4));
}
@media (min-width: 992px) {
  html { scroll-padding-bottom: var(--ds-sp-4); }
}
:root.ds-bo {
  scroll-padding-top: calc(var(--ds-topbar-h) + var(--ds-sp-4));
  scroll-padding-bottom: var(--ds-sp-4);
}

body {
  font-family: var(--ds-font);
  font-size: var(--ds-type-body-fs);
  line-height: var(--ds-type-body-lh);
  font-weight: var(--ds-w-regular);
  color: var(--ds-text);
  background-color: var(--ds-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---- customer scroll model: normal document scrolling instead of the "app in a box".
   No transform / filter / contain / content-visibility on .layout or main. */
:root:not(.ds-bo),
:root:not(.ds-bo) body {
  height: auto;
  overflow: visible;
}
:root:not(.ds-bo) .layout {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
:root:not(.ds-bo) main {
  flex: 1 0 auto;
  overflow: visible;
}

::selection { background-color: var(--ds-accent-soft-2); color: var(--ds-text-strong); }

/* ---------------------------------------------------------------- type: every computed size on the scale */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--ds-font);
  font-weight: var(--ds-w-semibold);
  color: var(--ds-text-strong);
  margin-block-start: 0;
}
h1, .h1 { font-size: var(--ds-type-h1-fs); line-height: var(--ds-type-h1-lh); letter-spacing: var(--ds-track-h1); }
h2, .h2 { font-size: var(--ds-type-h2-fs); line-height: var(--ds-type-h2-lh); letter-spacing: var(--ds-track-h2); }
h3, .h3 { font-size: var(--ds-type-h3-fs); line-height: var(--ds-type-h3-lh); }
h4, .h4 { font-size: var(--ds-fs-16); line-height: var(--ds-lh-24); }
h5, .h5 { font-size: var(--ds-fs-15); line-height: var(--ds-lh-22); }
h6, .h6 { font-size: var(--ds-fs-14); line-height: var(--ds-lh-20); }
:root.ds-bo h1, :root.ds-bo .h1 { font-size: var(--ds-fs-24); line-height: var(--ds-lh-32); }
:root.ds-bo h2, :root.ds-bo .h2 { font-size: var(--ds-fs-20); line-height: var(--ds-lh-28); }
:root.ds-bo h3, :root.ds-bo .h3 { font-size: var(--ds-fs-18); line-height: var(--ds-lh-26); }

:where(p) { margin-block: 0 var(--ds-sp-3); }
small, .small { font-size: var(--ds-fs-13); line-height: var(--ds-lh-18); }
:where(b, strong) { font-weight: var(--ds-w-semibold); }
:where(code, kbd, samp, pre), .ds-mono { font-family: var(--ds-font-mono); }
code, kbd, samp { font-size: inherit; color: var(--ds-text-2); } /* Bootstrap's .875em lands off the type scale */
:where(hr) { border: 0; border-block-start: var(--ds-bw) solid var(--ds-border); opacity: 1; margin-block: var(--ds-sp-4); }

a { color: var(--ds-link); text-underline-offset: 0.15em; }
@media (hover: hover) {
  a:hover { color: var(--ds-link-hover); }
}

.ds-num, .ds-price, .ds-timer, .ds-tabular { font-variant-numeric: tabular-nums; }
.ds-bidi, .ds-cur { unicode-bidi: plaintext; }
.ds-measure { max-width: var(--ds-measure); }

/* eyebrow (customer only) and overline (back-office sidebar groups only) */
.ds-eyebrow {
  font-size: var(--ds-fs-12);
  line-height: var(--ds-lh-16);
  font-weight: var(--ds-w-semibold);
  letter-spacing: var(--ds-track-eyebrow);
  text-transform: uppercase;
  color: var(--ds-text-2);
}
.ds-overline {
  font-size: var(--ds-fs-11);
  line-height: var(--ds-lh-16);
  font-weight: var(--ds-w-semibold);
  letter-spacing: var(--ds-track-overline);
  text-transform: uppercase;
  color: var(--ds-text-muted);
}

/* ---------------------------------------------------------------- focus */
:where(a, button, [tabindex], summary, input, select, textarea, [role="button"], [role="tab"], [role="link"]):focus-visible {
  outline: var(--ds-focus-w) solid var(--ds-focus);
  outline-offset: var(--ds-focus-offset);
}
/* (0,3,0) beats Bootstrap 5.3.2 / 5.1.3 `.btn:focus-visible{outline:0}` and `.form-control:focus{outline:0}` */
:root :is(.btn, .form-control, .form-select, .form-check-input, .nav-link, .page-link, .btn-close, .accordion-button,
          .dropdown-item, .list-group-item-action):focus-visible {
  outline: var(--ds-focus-w) solid var(--ds-focus);
  outline-offset: var(--ds-focus-offset);
}
/* native date/time inputs move focus into their internal segments, so the input itself never matches :focus-visible */
:root :is([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]):focus-within {
  outline: var(--ds-focus-w) solid var(--ds-focus);
  outline-offset: var(--ds-focus-offset);
}
/* on teal or dark fills: white outline over a teal-800 halo */
:root :is(.btn-primary, .btn-success, .btn-danger, .btn-dark, .ds-btn--primary, .ds-btn--destructive, .ds-on-dark):focus-visible {
  outline-color: var(--ds-white);
  box-shadow: var(--ds-ring-halo);
}
/* double-ring pitfall: inputs inside wrappers that draw their own ring (add every new wrapper of this kind here) */
:root :is(.hv2-search-box, .hv2-range-field, .cf-budget, .ds-input-group, .ds-search-field) :is(input, select, textarea):focus-visible {
  outline: none;
}
:root :is(.hv2-search-box, .hv2-range-field, .cf-budget, .ds-input-group, .ds-search-field):focus-within {
  outline: var(--ds-focus-w) solid var(--ds-focus);
  outline-offset: var(--ds-focus-offset);
}

.hv2-search-v3 :is(.cf-dates-f, .ds-guests) :is(input, select):focus-visible { outline: none; }
:where(a, button, input, select, textarea):focus:not(:focus-visible) { outline: none; }

/* ---------------------------------------------------------------- skip link */
.ds-skip {
  position: fixed;
  inset-block-start: var(--ds-sp-2);
  inset-inline-start: var(--ds-sp-2);
  z-index: var(--ds-z-toast);
  padding: var(--ds-sp-2h) var(--ds-sp-4);
  min-height: var(--ds-target);
  display: inline-flex;
  align-items: center;
  border-radius: var(--ds-r-md);
  background: var(--ds-surface);
  color: var(--ds-link);
  font-weight: var(--ds-w-semibold);
  box-shadow: var(--ds-sh-3);
  text-decoration: none;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}
.ds-skip:focus,
.ds-skip:focus-visible {
  clip-path: none;
  opacity: 1;
  pointer-events: auto;
}

/* visually hidden text that stays readable by screen readers (Bootstrap's .visually-hidden also works) */
.ds-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important;  }

/* ---------------------------------------------------------------- RTL */
/* mirror arrows, chevrons, back icons and step progress; never numbers, prices, ratings, checkmarks, logos, clocks */
[dir="rtl"] :is(.ds-icon-dir, .fa-arrow-right, .fa-arrow-left, .fa-arrow-right-long, .fa-arrow-left-long,
                .fa-long-arrow-alt-right, .fa-long-arrow-alt-left, .fa-chevron-right, .fa-chevron-left,
                .fa-angle-right, .fa-angle-left, .fa-angles-right, .fa-angles-left, .fa-angle-double-right,
                .fa-angle-double-left, .fa-caret-right, .fa-caret-left, .fa-circle-chevron-right,
                .fa-circle-chevron-left, .fa-arrow-up-right-from-square, .fa-external-link-alt, .fa-reply,
                .fa-share, .fa-right-from-bracket, .fa-right-to-bracket, .fa-sign-out-alt, .fa-sign-in-alt,
                .fa-arrow-right-from-bracket, .fa-route, .fa-directions, .mdi-chevron-right, .mdi-chevron-left,
                .mdi-arrow-right, .mdi-arrow-left, .bx-chevron-right, .bx-chevron-left, .bx-right-arrow-alt,
                .bx-left-arrow-alt, .uil-angle-right, .uil-angle-left, .uil-arrow-right, .uil-arrow-left) {
  transform: scaleX(-1);
}
/* phone numbers, e-mails, amounts and codes stay LTR inside RTL pages (aligned to the inline end) */
[dir="rtl"] :is(input[type="tel"], input[type="email"], input[type="url"], input[type="number"], input[inputmode="tel"],
                input[inputmode="numeric"], input[inputmode="decimal"], .ds-ltr) { direction: ltr; text-align: end; }
[dir="rtl"] .ds-eyebrow,
:lang(ar) .ds-eyebrow { letter-spacing: 0; text-transform: none; }
[dir="rtl"] body,
:lang(ar) body { line-height: calc(var(--ds-type-body-lh) + 0.1em); }

html.translated-rtl body { direction: rtl; }

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
