/* Shared reading and interaction styles, including the reservation dialog. */
:root {
  --reading-size: 1rem;
  --label-size: .875rem;
  --reading-width: 68ch;
  --focus-ink: #253525;
  --focus-light: #fffaf1;
}
html[data-style="maroc"] { --maroc-muted: #535c4c; }
body { font-size: var(--reading-size); }
#main p,
.site-footer .prose p {
  font-size: var(--reading-size);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
#main :is(.prose, .faq-answer, .offer-intro-details) :is(p, ul, ol),
#main .home-inclusions-note,
.site-footer .prose p {
  max-inline-size: var(--reading-width);
  text-align: start;
}
#main :is(.prose, .faq-answer, .offer-intro-details) :is(ul, ol) {
  font-size: var(--reading-size);
  line-height: 1.6;
}
#main .center .prose > :is(p, ul, ol),
#main .home-inclusions-note { margin-inline: auto; }
#main :is(.eyebrow, .section-kicker, .reviews-eyebrow),
#main .gr-heading-label {
  font-size: var(--label-size);
  line-height: 1.5;
  letter-spacing: .06em;
}
#main .testimonials-section .reviews-eyebrow { font-size: var(--label-size) !important; }
#main .prose p a:not(.button), .site-footer .prose p a {
  text-decoration: underline;
  text-underline-offset: .18em;
}
#main .prose p a:hover, .site-footer .prose p a:hover { text-decoration-thickness: .12em; }
#main :is(h1, h2, h3, h4), #booking-dialog :is(h2,h3,h4) {
  overflow-wrap: anywhere;
  hyphens: auto;
}
#main .prose h2 { font-size: clamp(1.65rem, 1.15rem + 2.5vw, 3.25rem); line-height: 1.16; }
#main .prose h3 { font-size: clamp(1.3rem, 1.1rem + 1.4vw, 2rem); line-height: 1.25; }
#main .prose h4 { font-size: 1.2rem; line-height: 1.35; }

/* The solid underlay keeps the navigation legible on the lightest photo. */
#welcome-header,
#welcome-header .welcome-language-switcher > summary { background-color: #343c30; }
#welcome-header nav, #welcome-header .welcome-language-switcher > summary,
#welcome-header .welcome-menu-toggle { font-size: var(--label-size); }
#welcome-header nav a { display: flex; align-items: center; min-block-size: 2.75rem; }
#welcome-header .welcome-language-switcher > summary,
#welcome-header .welcome-menu-toggle { min-block-size: 2.75rem; min-inline-size: 2.75rem; }
#welcome-header .welcome-brand-name { font-size: clamp(.875rem, .75rem + .45vw, 1.125rem); }
#welcome-header .welcome-nav-cta { font-size: var(--reading-size); line-height: 1.35; background: #fffaf1; color: #343c30; }
#welcome-header { container: welcome-bar / inline-size; flex-wrap: wrap; height: auto; min-height: 4rem; }
#welcome-hero { display: flex; flex-direction: column; background-color: #233026; }
#welcome-hero .welcome-desert-hero-note > span.welcome-desert-hero-type {
  background: #343c30;
  color: #fffaf1;
  border-radius: .3rem;
  padding: .4rem .6rem;
}
#welcome-hero .welcome-desert-hero-type strong { white-space: normal; font-size: .875rem; }
#welcome-hero .welcome-desert-hero-type small { font-size: .75rem; }
#welcome-hero .welcome-hero-bottom {
  position: relative; inset: auto; margin: auto 6% 1.5rem; max-width: none;
}
#welcome-hero .welcome-hero-bottom span {
  max-width: 100%; overflow-wrap: anywhere; background: #343c30; padding: .15em .45em;
}
#welcome-hero .welcome-hero-bottom { font-size: .75rem; line-height: 1.5; flex-wrap: wrap; gap: .5rem; }
#welcome-hero h1 {
  font-size: clamp(2rem, 1.35rem + 4vw, 4.875rem);
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: auto;
}
#welcome-hero .welcome-hero-content { max-inline-size: min(52rem, 70%); }
#welcome-hero .welcome-eyebrow,
#welcome-hero .welcome-quote-reassurance { font-size: var(--label-size); line-height: 1.5; }
#welcome-hero .welcome-hero-content p { font-size: clamp(1rem, .975rem + .2vw, 1.125rem); line-height: 1.6; }
#welcome-hero .welcome-hero-shade {
  background: linear-gradient(90deg, rgba(26,35,28,.88) 0%, rgba(26,35,28,.83) 42%, rgba(26,35,28,.15) 80%);
}
#main .gr-footer :is(a,button), .site-footer a { font-size: var(--label-size); }
#main .gr-footer :is(a,button),.site-footer nav a {
  min-block-size: 2.75rem;
  display: inline-flex;
  align-items: center;
}
html[data-style] :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus-light);
}
html[data-style] .skip:focus-visible {
  z-index: 1000;
  background: var(--focus-light);
  color: var(--focus-ink);
}
#main:focus { outline: none; }
#booking-dialog #composer-panel :is(label, legend),
#booking-dialog :is(p, li, details li, details p, .selection-summary strong, .hotel-card strong),
#booking-dialog #composer-panel :is(input:not([type=checkbox], [type=radio]), select, textarea) {
  font-size: var(--reading-size);
  line-height: 1.5;
}
#booking-dialog #composer-panel :is(small, .eyebrow, .inline-note, .hotel-rate-caption, .hotel-rate-discount),
#booking-dialog :is(.composer-progress li, .composer-footer #footer-note, button:not(.composer-close), summary) {
  font-size: var(--label-size);
  line-height: 1.45;
}
#booking-dialog :is(.composer-close, .composer-footer button) {
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
}
#booking-dialog label:has(input:focus-visible) {
  outline: 3px solid var(--focus-ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus-light);
}
/* This also collapses the full navigation when a visitor enlarges text alone. */
@container welcome-bar (max-width: 65rem) {
  #welcome-header > .welcome-menu-toggle { display: block; margin-inline-start: auto; }
  #welcome-header > nav {
    display: none; position: absolute; z-index: 2; inset: calc(100% + .4rem) 0 auto;
    background: #343c30; padding: .75rem; border-radius: 1rem; margin: 0;
  }
  #welcome-header > nav.welcome-open { display: flex; flex-direction: column; align-items: stretch; }
  #welcome-header > nav a { white-space: normal; }
}
@media (max-width: 53.125em) {
  #welcome-header {
    position: relative; inset: auto; transform: none; margin: .6rem auto;
    padding: .4rem .7rem; border-radius: 1.15rem; width: calc(100% - 1.25rem); gap: .35rem;
  }
  #welcome-header > .welcome-brand { flex: 1 1 auto; min-width: 0; }
  #welcome-header .welcome-brand-name { overflow-wrap: anywhere; white-space: normal; }
  #welcome-header > .welcome-language-switcher { position: relative; inset: auto; }
  #welcome-header .welcome-language-options { right: auto; left: 50%; transform: translateX(-50%); }
  #welcome-header .welcome-nav-cta { padding-inline: .6rem; }
  #welcome-hero .welcome-hero-content { max-inline-size: 100%; padding-block: clamp(2.5rem, 8svh, 5rem) 1.5rem; }
  #welcome-hero .welcome-desert-hero-note {
    position: relative; inset: auto; align-self: end; margin: auto 6% 1.5rem; width: min(16rem,80%); max-width: none;
  }
  #welcome-hero .welcome-hero-bottom { margin-block-start: 0; }
  #welcome-hero .welcome-hero-shade {
    background: linear-gradient(180deg,rgba(26,35,28,.86) 0%,rgba(26,35,28,.83) 42%,rgba(26,35,28,.25) 60%,rgba(26,35,28,.86) 82%);
  }
  #welcome-header .welcome-language-switcher > summary { background: #343c30; }
}
@media (max-width: 38em) {
  #main .stay-planner-hero { grid-template-columns: minmax(0,1fr); }
  #welcome-hero .welcome-hero-content { padding-inline: 6%; }
  #welcome-hero .welcome-hero-buttons { margin-block-start: clamp(2.5rem, 17svh, 9rem); }
  #booking-dialog .intent-grid, #booking-dialog .field-pair,
  #booking-dialog .whatsapp-inputs { grid-template-columns: minmax(0,1fr); }
  #booking-dialog .composer-footer { flex-wrap: wrap; }
  #booking-dialog .composer-footer .button { white-space: normal; }
}
@media (max-width: 24em) {
  #welcome-header { inline-size: calc(100% - 1.25rem); padding-inline: .6rem; gap: .4rem; }
  #welcome-header .welcome-brand-name { white-space: normal; overflow-wrap: anywhere; }
  #welcome-header .welcome-brand { min-inline-size: 0; }
  #welcome-header .welcome-nav-cta { padding-inline: .65rem; }
}
@media (forced-colors: active) {
  html[data-style] :focus-visible { outline-color: Highlight; }
}

/* At very large text sizes give instructions the full width of the dialog. */
#booking-dialog { container: quote / inline-size; }
@container quote (max-width: 15rem) {
  #booking-dialog .composer-header {
    display: grid;
    grid-template-columns: minmax(0,1fr) 44px;
    gap: .25rem;
  }
  #booking-dialog .composer-header > div { display: contents; }
  #booking-dialog .composer-header .eyebrow { grid-column: 1; }
  #booking-dialog .composer-close { grid-column: 2; grid-row: 1; min-inline-size: 44px; min-block-size: 44px; }
  #booking-dialog .composer-header :is(h2,p) { grid-column: 1 / -1; margin: 0; }
  #booking-dialog .composer-header h2 { font-size: 1.1rem; }
  #booking-dialog .composer-header p { font-size: var(--label-size); }
  #booking-dialog .composer-progress { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #booking-dialog .composer-progress li { flex-direction: column; align-items: start; overflow-wrap: anywhere; }
  #booking-dialog .travel-arrival { grid-template-columns: minmax(0,1fr); }
  #booking-dialog #composer-panel .already-here { min-width: 0; max-width: 100%; white-space: normal; }
  #booking-dialog #composer-panel .already-here span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
}


@media (max-height: 32rem) {
  #booking-dialog[open] { display: block; overflow: auto; }
  #booking-dialog .composer-scroll { overflow: visible; }
}

/* The MIA programme and its rates share a single readable text column. */
#main .stay-program-copy,
#main .stay-hotel-section:has(.stay-mia-rates) .stay-section-heading {
  width: min(calc(100% - 2.5rem), var(--reading-width));
  margin-inline: auto;
  text-align: start;
}
#main .stay-program-copy { margin-block-end: 2rem; }
#main .stay-program-copy h3 { margin-block-start: 1.5rem; }
#main .stay-program-copy a, #main .stay-hotel-section .stay-section-heading p a {
  text-decoration: underline;
  text-underline-offset: .18em;
}
#main .stay-mia-rates caption { text-align: start; font-weight: 600; }
#main .stay-mia-rates tr > :last-child { text-align: end; font-variant-numeric: tabular-nums; }
