/* ---------- Colour system ----------
   Every colour on the site comes from these variables. Use them (never
   hard-coded colours) on new pages so light and dark mode keep working.

   Palette (the only fixed colours; set per mode):
     --bg            page background
     --bg-secondary  cards, header, buttons and other raised areas
     --text          primary text
     --accent        buttons, links and highlights
   Plus functional colours: --error (form errors), --shadow-color, and
   --status-yellow / --status-green / --status-red for booking payment status.

   Derived shades below are mixed from the palette, so they follow it in
   both modes automatically. */
:root {
  /* Light mode palette */
  --bg: #f2f1ec;           /* Warm Ivory */
  --bg-secondary: #e8e5dc; /* Soft Beige */
  --text: #202720;         /* Dark Charcoal Green */
  --accent: #796038;       /* Bronze Gold */
  --error: #b42318;
  --shadow-color: rgba(32, 39, 32, 0.3);
  --status-yellow: #c08f00;
  --status-green: #2e7d4f;
  --status-red: #b42318;

  /* Derived from the palette */
  --text-muted: color-mix(in srgb, var(--text) 72%, var(--bg));
  --border: color-mix(in srgb, var(--text) 32%, var(--bg));
  /* Darker accent in light mode, lighter in dark mode. */
  --accent-hover: color-mix(in srgb, var(--accent) 80%, var(--text));
  --on-accent: var(--bg);
  --shadow: 0 20px 50px -20px var(--shadow-color);

  --radius: 14px;

  /* ---------- Typography ----------
     One font per language, picked automatically from <html lang>:
     Montserrat for English, Noto Sans Arabic for Arabic. Use only
     these three weights (the only ones loaded):
       --weight-regular  paragraphs and body text
       --weight-medium   subheadings (h2-h6), labels, buttons, links
       --weight-bold     main headings (h1) */
  --font-en: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Noto Sans Arabic", Tahoma, sans-serif;
  --font-body: var(--font-en);
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;
}

:root[lang="ar"] {
  --font-body: var(--font-ar);
}

/* Lining numbers keep phone numbers, codes and prices even. */
:root {
  font-variant-numeric: lining-nums;
}

/* Form controls don't inherit fonts by default. */
button,
input,
select,
textarea {
  font-family: inherit;
  font-variant-numeric: inherit;
}

/* Dark mode follows the device setting unless the visitor picked a theme,
   which js/theme.js stores as <html data-theme="light|dark">. The dark
   palette appears twice below (device setting, then manual choice), so keep
   both copies in sync. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171c19;           /* Deep Charcoal */
    --bg-secondary: #252b27; /* Secondary Background */
    --text: #f2f1ec;         /* Warm Ivory */
    --accent: #b89a65;       /* Champagne Gold */
    --error: #f97066;
    --shadow-color: rgba(0, 0, 0, 0.7);
    --status-yellow: #e8c547;
    --status-green: #5cbf86;
    --status-red: #f97066;
  }
}

:root[data-theme="dark"] {
  --bg: #171c19;
  --bg-secondary: #252b27;
  --text: #f2f1ec;
  --accent: #b89a65;
  --error: #f97066;
  --shadow-color: rgba(0, 0, 0, 0.7);
  --status-yellow: #e8c547;
  --status-green: #5cbf86;
  --status-red: #f97066;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Elements with the hidden attribute stay hidden even when a class sets display. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Main headings bold, subheadings medium, on every page. */
h1 {
  font-weight: var(--weight-bold);
}

h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--weight-medium);
}

/* ---------- Centered card pages (welcome, sign up, log in) ---------- */
body.welcome,
body.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Top padding keeps the card clear of the language toggle on small screens. */
  padding: 72px 16px 24px;
  background:
    radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    var(--bg);
}

.welcome-card,
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 32px 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

/* Small phones, English: a little more room inside the card, so wide
   Montserrat button labels such as "Sign up with Google" stay on one line. */
@media (max-width: 380px) {
  :root:not([lang="ar"]) .welcome-card,
  :root:not([lang="ar"]) .auth-card {
    padding-right: 20px;
    padding-left: 20px;
  }

  :root:not([lang="ar"]) .welcome-card .btn,
  :root:not([lang="ar"]) .auth-card .btn {
    padding-right: 14px;
    padding-left: 14px;
  }
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

/* Site logo at the top of the welcome and account pages. Swapped for the
   dark-mode version by the <picture> element around it. */
.brand-logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.welcome-card h1,
.auth-card h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 6vw, 2.5rem);
  line-height: 1.1;
}

.tagline {
  margin: 0 0 32px;
  color: var(--text-muted);
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guest-note {
  margin: 20px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--weight-medium);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.btn-link {
  background: transparent;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-link:hover {
  color: var(--text);
}

/* ---------- Auth pages (sign up, log in) ---------- */
.auth-card {
  max-width: 460px;
  padding-top: 24px;
}

/* Sits at the start edge: left in English, right in Arabic. */
.back-link {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-bottom: 16px;
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

/* The same link style on a button. */
button.back-link {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

button.back-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.back-link svg {
  width: 18px;
  height: 18px;
}

:root[dir="rtl"] .back-link svg {
  transform: scaleX(-1);
}

.auth-card .brand {
  margin-bottom: 16px;
}

.auth-card .brand-logo {
  width: 180px;
}

.auth-card h1 {
  font-size: clamp(1.6rem, 5vw, 2rem);
}

.provider-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: var(--weight-medium);
}

.btn-provider:hover {
  border-color: var(--text-muted);
}

.btn-provider svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-apple {
  background: var(--text);
  color: var(--bg-secondary);
  border-color: var(--text);
}

.btn-apple:hover {
  background: var(--text);
  opacity: 0.9;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--weight-regular);
  line-height: 1.4;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

/* Email addresses and passwords read left-to-right even on Arabic pages. */
:root[dir="rtl"] .field input[dir="ltr"] {
  text-align: right;
}

/* ---------- Phone verification ---------- */
/* Hides a page while checking whether the visitor must verify their phone. */
html.auth-checking body {
  visibility: hidden;
}

.phone-field {
  position: relative;
}

.phone-row {
  display: flex;
  align-items: stretch;
}

/* .phone-row is always dir="ltr", so these physical sides are correct. */
.country-button {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 10px 0 12px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: var(--bg-secondary);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--weight-medium);
  line-height: 1;
  cursor: pointer;
}

.country-button:hover {
  background: color-mix(in srgb, var(--text) 8%, var(--bg-secondary));
}

.country-button:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  position: relative;
  z-index: 1;
}

.country-button .fi {
  font-size: 1.1rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
}

.country-button svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.15s;
}

.country-button[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.phone-row input {
  min-width: 0;
  border-radius: 0 10px 10px 0;
}

.country-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-secondary);
  box-shadow: var(--shadow);
}

.field .country-search {
  padding: 10px 12px;
  background: var(--bg);
}

.country-list {
  max-height: 280px;
  margin: 8px 0 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.country-option .fi {
  flex-shrink: 0;
  font-size: 1.1rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
}

.country-option-name {
  flex: 1;
  min-width: 0;
}

.country-option-dial {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.country-option:hover,
.country-option.is-active {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.country-option[aria-selected="true"] {
  font-weight: var(--weight-medium);
}

.country-empty {
  margin: 0;
  padding: 16px 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.alt-channel {
  margin: 16px 0 0;
  text-align: center;
}

/* Verification deadline warning, under the intro on verify-phone.html. */
.deadline-note {
  margin: -16px 0 24px;
  padding: 10px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text);
  font-size: 0.85rem;
  text-align: start;
}

.sent-to {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.sent-to bdi {
  color: var(--text);
  font-weight: var(--weight-medium);
}

.field .code-input {
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  text-align: center;
}

.code-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}

.text-button {
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
  line-height: 1.4;
  cursor: pointer;
}

.text-button:hover:not(:disabled) {
  text-decoration: underline;
}

.text-button:disabled {
  color: var(--text-muted);
  cursor: default;
}

.text-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Password show/hide ---------- */
.password-wrap {
  position: relative;
}

/* Room for the eye button. Password inputs are always dir="ltr", so the
   padding side is set from the page direction rather than the input's. */
.password-wrap input {
  padding-right: 48px;
}

:root[dir="rtl"] .password-wrap input {
  padding-right: 14px;
  padding-left: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 4px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--text);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.password-toggle .icon-hide,
.password-toggle[aria-pressed="true"] .icon-show {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-hide {
  display: block;
}

/* Hide the browser's built-in reveal button (Edge) so there's only one eye. */
.password-wrap input::-ms-reveal {
  display: none;
}

.label-optional {
  font-weight: var(--weight-regular);
  color: var(--text-muted);
}

.field-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.field-error {
  margin: 0;
  font-size: 0.85rem;
  font-weight: var(--weight-medium);
  color: var(--error);
}

.field-error:empty {
  display: none;
}

.auth-form .btn-primary {
  margin-top: 8px;
}

.form-notice {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-size: 0.9rem;
  text-align: start;
}

.form-notice:empty {
  display: none;
}

.auth-switch {
  margin: 24px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

/* Sits under the password, at the end edge: right in English, left in Arabic. */
.forgot-link {
  align-self: flex-end;
  margin-top: 2px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* Two-option switch, e.g. Email | Phone on the log-in page. */
.segmented {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.segmented-option {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: var(--weight-medium);
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.segmented-option:hover {
  color: var(--text);
}

.segmented-option[aria-pressed="true"] {
  background: var(--bg-secondary);
  color: var(--text);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--shadow-color) 50%, transparent);
}

.segmented-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Site pages (homepage and pages after it) ---------- */
body.site {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.site main {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-secondary) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

/* Laid out left-to-right in both languages so the language button stays in
   the top-right corner, as on every other page. Text inside still reads
   right-to-left in Arabic. */
.header-inner {
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
}

.header-inner > * {
  direction: inherit;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.header-logo {
  display: block;
  width: auto;
  height: 44px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-account {
  display: flex;
  gap: 8px;
}

.btn-sm {
  width: auto;
  padding: 8px 14px;
  border-width: 1.5px;
  font-size: 0.875rem;
  unicode-bidi: plaintext;
}

/* In the header the language button sits in line instead of floating. */
.site-header .lang-toggle {
  position: static;
  box-shadow: none;
}

.guest-banner {
  padding: 10px 16px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
}

.guest-banner p {
  margin: 0;
}

.guest-banner a {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.hero {
  padding: 48px 16px 56px;
  background:
    radial-gradient(ellipse at 80% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
}

.hero-tagline {
  max-width: 34em;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.hero-art {
  width: 100%;
  height: auto;
}

.art-sun {
  fill: color-mix(in srgb, var(--accent) 45%, var(--bg));
}

.art-dune-back {
  fill: color-mix(in srgb, var(--accent) 25%, var(--bg-secondary));
}

.art-dune-front {
  fill: color-mix(in srgb, var(--accent) 45%, var(--bg-secondary));
}

.art-caravan rect {
  fill: var(--bg-secondary);
  stroke: var(--text);
  stroke-width: 3;
}

.art-caravan .window {
  fill: color-mix(in srgb, var(--accent) 25%, var(--bg-secondary));
}

.art-caravan .hitch {
  fill: none;
  stroke: var(--text);
  stroke-width: 3;
  stroke-linecap: round;
}

.art-caravan .wheel {
  fill: var(--text);
  stroke: var(--bg-secondary);
  stroke-width: 3;
}

.site-footer-full {
  margin: 0;
  padding: 24px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

@media (max-width: 720px) {
  .hero {
    padding: 32px 16px 40px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-art {
    max-width: 360px;
    margin: 0 auto;
  }
}

/* Phones: keep the logo and every header button on one line. The buttons get
   slightly tighter, and the logo shrinks to fit whatever room they leave.
   Arabic button labels are wider, which sets this breakpoint. */
@media (max-width: 520px) {
  .header-inner {
    gap: 8px;
  }

  .header-actions,
  .header-account {
    gap: 6px;
  }

  .site-header .btn-sm,
  .site-header .lang-toggle {
    padding-inline: 10px;
    font-size: 0.8125rem;
  }

  /* Arabic labels are longer, so tighten them a little more. */
  :root[lang="ar"] .site-header .btn-sm,
  :root[lang="ar"] .site-header .lang-toggle {
    padding-inline: 8px;
    font-size: 0.75rem;
  }

  .header-brand {
    flex: 1 1 0;
  }

  .header-brand picture {
    display: block;
    width: 100%;
    max-width: 112px;
  }

  .header-logo {
    width: 100%;
    height: auto;
  }
}

/* ---------- Admin dashboard (admin.html) ----------
   Permanent sidebar on wide screens; on phones and tablets it slides in from
   a menu button. The sidebar stays on the left in Arabic too, like the site
   header; the text inside still reads right to left. */

/* Hidden until js/admin.js confirms the visitor is an admin. */
html.admin-checking body {
  visibility: hidden;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

:root[dir="rtl"] .admin-layout {
  flex-direction: row-reverse;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  flex-shrink: 0;
  width: 248px;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
}

.admin-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 28px;
  padding: 4px 8px;
}

/* "Admin Panel" title at the top of the sidebar. */
.admin-brand {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

/* Profile card under the title: opens admin.html#profile. */
.admin-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

.admin-profile-card:hover {
  border-color: var(--accent);
}

.admin-profile-card[aria-current="page"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.admin-profile-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-profile-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.admin-profile-name {
  max-width: 100%;
  overflow: hidden;
  font-weight: var(--weight-medium);
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.admin-profile-email {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

:root[dir="rtl"] .admin-profile-email {
  text-align: right;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.admin-badge svg {
  width: 12px;
  height: 12px;
}

/* Round profile picture: the Google photo, or initials. */
.avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 1.5rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* Keeps a gap above Log out when the sidebar is full. */
  margin-bottom: 24px;
}

/* Log out: always the last item, pinned to the bottom of the sidebar. */
.admin-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--weight-medium);
  text-align: start;
  cursor: pointer;
}

.admin-logout svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

:root[dir="rtl"] .admin-logout svg {
  transform: scaleX(-1);
}

.admin-logout:hover {
  color: var(--error);
}

.admin-logout:disabled {
  opacity: 0.6;
  cursor: default;
}

.admin-logout:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.admin-nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.admin-nav-link:hover {
  background: color-mix(in srgb, var(--text) 6%, var(--bg-secondary));
  color: var(--text);
}

.admin-nav-link[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-secondary));
  color: var(--text);
}

.admin-nav-link[aria-current="page"] svg {
  color: var(--accent);
}

.admin-nav-link:focus-visible,
.admin-brand:focus-visible,
.admin-menu-button:focus-visible,
.admin-menu-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

/* Phones and tablets only: holds the menu button (language and appearance
   are in the Admin settings panel). */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: flex-start;
  direction: ltr;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
}

.admin-menu-button,
.admin-menu-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text);
  cursor: pointer;
}

.admin-menu-button svg,
.admin-menu-close svg {
  width: 22px;
  height: 22px;
}

.admin-content {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  padding: 32px 24px 48px;
}

.admin-content h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.2;
}

.admin-placeholder {
  margin: 0;
  color: var(--text-muted);
}

.admin-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--shadow-color) 80%, transparent);
}

@media (max-width: 860px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: min(280px, 85vw);
    height: auto;
    box-shadow: var(--shadow);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .admin-menu-open .admin-sidebar {
    transform: none;
    visibility: visible;
    transition: transform 0.2s ease;
  }

  .admin-menu-button,
  .admin-menu-close {
    display: inline-flex;
  }

  .admin-topbar {
    display: flex;
    padding: 10px 16px;
  }

  .admin-content {
    padding: 24px 16px 40px;
  }

  /* Don't scroll the page behind the open menu. */
  .admin-menu-open body {
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar,
  .admin-menu-open .admin-sidebar {
    transition: none;
  }
}

/* ---------- Admin: Bookings (admin.html#bookings) ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Headings focused when switching sections don't need a focus ring. */
.admin-view h1:focus {
  outline: none;
}

/* Title on one side, date range on the other (right in English). */
.bookings-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 20px;
}

.bookings-head h1 {
  margin: 0;
}

/* Arabic: the date range sits on the right too, next to the title. */
:root[dir="rtl"] .bookings-head {
  justify-content: flex-start;
}

.bookings-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.bookings-dates legend {
  margin-bottom: 4px;
  padding: 0;
  font-size: 0.85rem;
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

.bookings-date,
.bookings-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

.bookings-date input,
.bookings-filter select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: var(--weight-regular);
}

.bookings-filter select {
  min-width: 170px;
}

.bookings-date input:focus,
.bookings-filter select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.bookings-date-error {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.85rem;
  color: var(--error);
}

.bookings-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.bookings-clear {
  min-height: 40px;
}

.bookings-count {
  margin: 0 0 0 auto;
  align-self: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

:root[dir="rtl"] .bookings-count {
  margin: 0 auto 0 0;
}

/* Scrolls sideways on its own on small screens, not the whole page. */
.bookings-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.bookings-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.bookings-table th,
.bookings-table td {
  padding: 12px 14px;
  text-align: start;
  white-space: nowrap;
}

/* English: Montserrat is wide, so the table is a little tighter and its
   text a touch smaller, to keep every column visible on a laptop screen. */
:root:not([lang="ar"]) .bookings-table th,
:root:not([lang="ar"]) .bookings-table td {
  padding-right: 12px;
  padding-left: 12px;
}

:root:not([lang="ar"]) .bookings-table td {
  font-size: 0.9rem;
}

:root:not([lang="ar"]) .bookings-table .status-badge {
  font-size: 0.8rem;
}

.bookings-table th {
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

.bookings-table tbody tr + tr td {
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.bookings-table tbody tr:hover td {
  background: color-mix(in srgb, var(--text) 4%, transparent);
}

.booking-number {
  font-weight: var(--weight-medium);
}

/* Keeps "CB-0001" and phone numbers reading left to right in Arabic. */
:root[dir="rtl"] .bookings-table td[dir="ltr"] {
  text-align: right;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  cursor: pointer;
}

.sort-button:hover {
  color: var(--text);
}

.sort-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.sort-icon {
  width: 16px;
  height: 16px;
}

.sort-icon path {
  opacity: 0.35;
}

th[aria-sort="ascending"] .sort-up,
th[aria-sort="descending"] .sort-down {
  opacity: 1;
  stroke: var(--accent);
}

th[aria-sort="ascending"],
th[aria-sort="descending"] {
  color: var(--text);
}

/* Payment: coloured dot plus a label, so it doesn't rely on colour alone. */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: var(--weight-medium);
  color: var(--text);
  white-space: nowrap;
}

.status-badge.payment-deposit { --badge: var(--status-yellow); }
.status-badge.payment-paid { --badge: var(--status-green); }
.status-badge.payment-cancelled { --badge: var(--status-red); }

[class*="payment-"].status-badge {
  background: color-mix(in srgb, var(--badge) 18%, transparent);
}

[class*="payment-"].status-badge::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--badge);
  flex-shrink: 0;
}

/* Stay status: outlined, so it doesn't compete with the payment colours. */
.status-badge.stay-upcoming {
  border: 1px solid var(--accent);
  color: var(--accent);
}

.status-badge.stay-active {
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--on-accent);
}

.status-badge.stay-completed {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.bookings-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 56px;
  text-align: center;
}

.bookings-empty svg {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  color: var(--accent);
}

.bookings-empty-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: var(--weight-medium);
}

.bookings-empty-text {
  max-width: 420px;
  margin: 0;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .bookings-filter,
  .bookings-filter select {
    width: 100%;
  }

  .bookings-count,
  :root[dir="rtl"] .bookings-count {
    margin: 0;
  }
}

/* ---------- Profile page (admin.html#profile) ----------
   Card sections meant to be shared with the member profile page later. */
/* The profile section is a centred column in the main area. */
.admin-content:has(> [data-view-panel="profile"]:not([hidden])) {
  max-width: none;
}

[data-view-panel="profile"] {
  max-width: 760px;
  margin-inline: auto;
}

.profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.admin-content .profile-head h1 {
  margin: 0;
}

.profile-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.profile-section {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.profile-section h2 {
  margin: 0 0 20px;
  font-size: 1.35rem;
  line-height: 1.25;
}

.profile-section h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: var(--weight-medium);
}

.profile-identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-identity-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 8px;
}

.profile-photo-actions .text-button:not(:disabled) {
  color: var(--error);
}

.profile-photo-actions .btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.profile-identity-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: var(--weight-medium);
}

.profile-identity-note,
.profile-muted {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0 8px;
}

.profile-section > .profile-details:first-of-type {
  margin-top: 0;
}

.profile-details dt {
  margin-bottom: 4px;
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
}

.profile-details dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.profile-tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-green) 18%, transparent);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
}

.profile-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.profile-block .profile-muted {
  margin-bottom: 12px;
}

.profile-block h3 + .profile-grid {
  margin-top: 12px;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.profile-notice {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .profile-section {
    padding: 20px 16px;
  }
}

/* ---------- Admin settings panel (admin.html) ---------- */
/* Square icon buttons: the settings gear and the panel's close button. */
.icon-button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text);
  cursor: pointer;
}

.icon-button svg {
  width: 22px;
  height: 22px;
}

.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* No padding on the panel itself, so a click on it means "outside". */
.settings-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  box-shadow: var(--shadow);
}

.settings-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 4px;
}

.settings-header h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
}

.settings-form {
  padding: 0 20px 24px;
}

.settings-group {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.settings-group legend {
  margin-bottom: 8px;
  padding: 0;
  font-weight: var(--weight-medium);
}

.settings-group .field-hint {
  margin-top: 6px;
}

/* A row of options where one is picked (radio buttons styled as a switch). */
.choice-group {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.choice {
  position: relative;
  flex: 1;
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  text-align: center;
}

.choice:hover input:not(:checked) + span {
  background: color-mix(in srgb, var(--text) 6%, var(--bg));
  color: var(--text);
}

.choice input:checked + span {
  background: var(--accent);
  color: var(--on-accent);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Text size: Large (admin dashboard). Sizes are in rem, so this scales them. */
:root[data-text-size="large"] {
  font-size: 112.5%;
}

/* ---------- Admin: Caravans (admin.html#caravans) ---------- */
/* Title on one side, "Create New Listing" on the other (next to the title
   on the right in Arabic, like the Bookings date range). */
.listings-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

:root[dir="rtl"] .listings-head {
  justify-content: flex-start;
}

.listings-head h1 {
  margin: 0;
}

.listings-create {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.listings-count {
  min-height: 1.5em;
  margin: 4px 0 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.listings-error {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--error) 12%, transparent);
  color: var(--text);
}

/* Booking.com-style rows: photo, details, price and status. */
.listing-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.listing-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  gap: 20px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.listing-row:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px -12px var(--shadow-color);
}

.listing-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.listing-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 8%, var(--bg-secondary));
}

.listing-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-photo.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.listing-photo.is-empty svg {
  width: 40px;
  height: 40px;
}

.listing-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.listing-title {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.25;
}

.listing-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text-muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.amenity-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: auto 0 0;
  padding: 6px 0 0;
  list-style: none;
  color: var(--text-muted);
}

.amenity-icons li {
  display: inline-flex;
}

/* Kitchen in the list rows: icon with its name ("Kitchenette"). */
.amenity-icons .amenity-kitchen {
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
}

/* Caravan Sales rows: year, condition, size and mileage, each with an icon. */
.listing-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

.listing-facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.listing-facts svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.amenity-icons svg {
  width: 20px;
  height: 20px;
}

.listing-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  text-align: end;
}

.listing-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin: 0;
  line-height: 1.25;
}

.listing-price strong {
  font-size: 1.3rem;
  font-weight: var(--weight-bold);
}

.listing-price-from,
.listing-price-per,
.listing-price.is-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.status-badge.listing-published { --badge: var(--status-green); }
.status-badge.listing-archived { --badge: var(--text-muted); }

[class*="listing-"].status-badge {
  background: color-mix(in srgb, var(--badge) 16%, transparent);
}

[class*="listing-"].status-badge::before {
  content: "";
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--badge);
}

.listings-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 48px 16px 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  text-align: center;
}

.listings-empty svg {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  color: var(--accent);
}

.listings-empty-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: var(--weight-medium);
}

.listings-empty-text {
  max-width: 440px;
  margin: 0 0 16px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .listing-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  .listing-side {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
  }

  .listing-title {
    font-size: 1.1rem;
  }
}

/* ---------- Listing editor (admin.html#caravans/<id>) ---------- */
[data-view-panel="caravan-edit"] {
  max-width: 900px;
  margin-inline: auto;
}

.admin-content:has(> [data-view-panel="caravan-edit"]:not([hidden])) {
  max-width: none;
}

.listing-editor {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.editor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.admin-content .editor-head h1 {
  margin: 0;
}

.editor-status {
  min-width: 240px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}

.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.listing-description-field {
  margin-top: 16px;
}

/* Photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.photo-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-cover-tag {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
}

.photo-tile-actions {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}

.photo-tile-button {
  padding: 3px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #202720;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.photo-tile-button:hover,
.photo-tile-button:focus-visible {
  background: #ffffff;
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.photo-remove {
  color: #b42318;
}

/* Amenities: checkboxes shown as chips. */
.amenity-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amenity-option {
  position: relative;
}

.amenity-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.amenity-option > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
}

.amenity-option svg {
  width: 18px;
  height: 18px;
}

.amenity-option input:checked + span {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--bg));
  color: var(--text);
}

.amenity-option input:checked + span svg {
  color: var(--accent);
}

.amenity-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.amenity-picker {
  margin-top: 12px;
}

/* Campsites: each amenity chip with a small "On list" tick under it. */
.amenity-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.amenity-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding-inline-start: 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
}

.amenity-key input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.amenity-key.is-off {
  opacity: 0.45;
  cursor: default;
}

.amenity-key.is-off input {
  cursor: default;
}

.amenity-key-hint {
  margin: 10px 0 0;
}

/* "Made by Alshaal" on a sale listing's photo (list row and editor cover). */
.made-badge {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  max-width: calc(100% - 16px);
  padding: 3px 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: var(--weight-medium);
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px -2px var(--shadow-color);
}

/* The editor's cover photo also has "Cover" at the top, so the badge sits
   at the bottom there, above the photo buttons. */
.photo-tile .made-badge {
  top: auto;
  bottom: 44px;
}

/* An on/off switch with its label and hint (e.g. "Made by Alshaal"). */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
}

.switch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-label {
  font-weight: var(--weight-medium);
}

.switch-row .field-hint {
  margin: 0;
}

.switch {
  appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 25%, var(--bg));
  cursor: pointer;
  transition: background-color 0.15s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: inset-inline-start 0.15s;
}

.switch:checked {
  background: var(--accent);
}

.switch:checked::after {
  inset-inline-start: 23px;
}

.switch:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Adding an amenity by name, under the picker. */
.amenity-add {
  margin-top: 18px;
}

.amenity-add label {
  display: block;
  margin-bottom: 6px;
  font-weight: var(--weight-medium);
}

.amenity-add input {
  flex: 1 1 200px;
  max-width: 320px;
}

.amenity-add .profile-notice {
  margin-top: 8px;
}

/* Added amenities in the list rows: a small label (they have no icon). */
.amenity-icons .amenity-text {
  align-items: center;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Campsite details: numbers side by side, kitchen type below. */
.site-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 16px;
}

.site-details-grid .field {
  margin-bottom: 8px;
}

.choice-field {
  max-width: 460px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}

.choice-field legend {
  margin-bottom: 8px;
  padding: 0;
  font-weight: var(--weight-medium);
}

/* Kitchen, under the amenity picker. */
.kitchen-choice {
  max-width: 520px;
  margin-top: 20px;
}

/* Availability and pricing */
.open-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.open-dates legend {
  margin-bottom: 6px;
  padding: 0;
  font-weight: var(--weight-medium);
}

.open-dates .bookings-date-error:empty {
  display: none;
}

.calendar-waiting {
  margin-top: 16px;
}

.calendar-area {
  margin-top: 24px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-month {
  margin: 0;
  font-size: 1.2rem;
  text-align: center;
}

:root[dir="rtl"] #cal-prev svg,
:root[dir="rtl"] #cal-next svg {
  transform: scaleX(-1);
}

.icon-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.calendar-select-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 16px;
}

.select-mode {
  min-width: 240px;
  margin: 0;
  padding: 0;
  border: 0;
}

/* English: sized to its labels, so "Pick a range" stays on one line. */
:root:not([lang="ar"]) .select-mode .choice span {
  white-space: nowrap;
}

#select-mode-hint {
  margin-top: 8px;
}

.calendar {
  margin-top: 12px;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
  text-align: center;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 66px;
  padding: 6px 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: start;
  cursor: pointer;
}

.cal-day:hover:not(:disabled) {
  border-color: var(--accent);
}

.cal-day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cal-day:disabled {
  border-style: dashed;
  background: transparent;
  color: color-mix(in srgb, var(--text-muted) 55%, transparent);
  cursor: default;
}

.cal-day[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.cal-day.is-anchor {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

.cal-num {
  font-weight: var(--weight-medium);
}

.cal-price {
  max-width: 100%;
  overflow: hidden;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: var(--weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: auto;
  padding-top: 3px;
}

.rule-chip {
  padding: 0 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: var(--weight-medium);
  line-height: 1.5;
}

.cal-day[aria-pressed="true"] .cal-price {
  color: var(--on-accent);
}

.cal-day[aria-pressed="true"] .rule-chip {
  background: color-mix(in srgb, var(--on-accent) 25%, transparent);
  color: var(--on-accent);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.legend-price {
  color: var(--accent);
  font-weight: var(--weight-bold);
}

.selection-panel {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.selection-count {
  margin: 0 0 14px;
  font-weight: var(--weight-medium);
}

.selection-actions {
  display: grid;
  gap: 16px;
}

.selection-action > label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
}

.inline-inputs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.inline-inputs input,
.inline-inputs select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.inline-inputs input[type="number"] {
  width: 130px;
}

.inline-inputs input:focus,
.inline-inputs select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.inline-inputs :disabled,
.calendar-select-tools .text-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.selection-panel .profile-notice {
  margin-top: 12px;
}

.rules-block {
  margin-top: 24px;
}

.rules-block h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: var(--weight-medium);
}

.rules-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.rules-list .text-button {
  color: var(--error);
}

/* Save stays in reach at the bottom of the screen while editing. */
.editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Delete sits at the far end of the save bar, away from Save. */
.listing-delete {
  margin-inline-start: auto;
}

/* For actions that can't be undone, such as deleting a listing. */
.btn-danger {
  background: transparent;
  color: var(--error);
  border-color: var(--error);
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--error) 10%, transparent);
}

.confirm-dialog .btn-danger {
  background: var(--error);
  color: var(--bg);
}

.confirm-dialog .btn-danger:hover {
  background: color-mix(in srgb, var(--error) 85%, var(--text));
}

/* Yes/no questions (js/admin.js). The padding is on the inner box so a
   click on the dialog itself means "outside". */
.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
}

.confirm-body {
  padding: 22px 20px 20px;
}

.confirm-body h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  line-height: 1.25;
}

.confirm-body p {
  margin: 0;
  color: var(--text-muted);
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.listings-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text);
}

@media (max-width: 560px) {
  .calendar-weekdays,
  .calendar-days {
    gap: 3px;
  }

  .cal-day {
    min-height: 54px;
    padding: 4px;
    font-size: 0.85rem;
  }

  .cal-price {
    font-size: 0.68rem;
  }

  .editor-status,
  .select-mode {
    width: 100%;
  }

  :root:not([lang="ar"]) .select-mode .choice span {
    white-space: normal;
  }
}

/* ---------- Language toggle ---------- */
/* Pinned to the top-right corner in both LTR and RTL layouts. */
.lang-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  min-width: 44px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: var(--weight-medium);
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 4px 12px -6px var(--shadow-color);
  transition: border-color 0.15s, color 0.15s;
}

/* Each label is shown in its own script's font. */
.lang-toggle:lang(ar) {
  font-family: var(--font-ar);
}

.lang-toggle:lang(en) {
  font-family: var(--font-en);
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-toggle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .lang-toggle,
  .country-button svg {
    transition: none;
  }
}

/* ---------- Admin: Members (admin.html#members) ---------- */
.members-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.members-export svg {
  width: 16px;
  height: 16px;
}

/* Four summary cards above the list. */
.member-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}

.member-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.member-stat-value {
  font-size: 1.6rem;
  font-weight: var(--weight-bold);
  line-height: 1.1;
}

.member-stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .member-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.members-search input {
  min-width: 240px;
}

.members-table {
  min-width: 980px;
}

.member-row {
  cursor: pointer;
}

.member-link {
  color: var(--text);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.member-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.member-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Yes / No and Suspended labels. */
.status-badge.member-yes {
  background: color-mix(in srgb, var(--status-green) 18%, transparent);
}

.status-badge.member-no {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.status-badge.member-suspended {
  background: color-mix(in srgb, var(--status-red) 16%, transparent);
  color: var(--status-red);
}

.member-first .status-badge {
  margin-inline-start: 6px;
  font-size: 0.75rem;
}

/* Member page: a centred column, like My profile. */
.admin-content:has(> [data-view-panel="member-detail"]:not([hidden])) {
  max-width: none;
}

[data-view-panel="member-detail"] {
  max-width: 760px;
  margin-inline: auto;
}

.member-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.admin-content .member-head h1 {
  margin: 0;
}

[data-view-panel="member-detail"] .listings-notice {
  margin-top: 12px;
}

[data-view-panel="member-detail"] textarea {
  width: 100%;
}

.member-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.member-files:empty {
  display: none;
}

.member-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.member-file-name {
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.member-file-date {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-muted);
}

#member-id-notice:not(:empty) {
  margin-top: 12px;
}

/* Marked placeholder until bookings are built. */
.member-placeholder {
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.member-placeholder .profile-muted {
  margin: 8px 0 0;
}

.member-placeholder-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
}

.member-manage h3 {
  margin-bottom: 4px;
}

.member-manage .profile-muted {
  margin-bottom: 12px;
}

#member-manage-notice:not(:empty) {
  margin-top: 16px;
}

[data-view-panel="member-detail"] .profile-section > .profile-muted {
  margin: -8px 0 12px;
}

/* ---------- Inquiries (admin.html#inquiries, inbox.html) ---------- */
/* Small round count: sidebar Inquiries link and the members' Inbox button. */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--status-red);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  line-height: 1;
}

.nav-count {
  margin-inline-start: auto;
}

.inbox-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-badge.inquiry-new {
  background: var(--accent);
  color: var(--on-accent);
}

.status-badge.inquiry-replied {
  background: color-mix(in srgb, var(--status-green) 18%, transparent);
}

.status-badge.inquiry-archived {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* "New message" / "New reply" marker. */
.unread-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
  color: var(--status-red);
  white-space: nowrap;
}

.unread-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-red);
}

/* Admin list */
.inquiries-tabs {
  max-width: 320px;
  margin: 16px 0;
}

#inquiries-count {
  margin: 0 0 12px;
}

.inquiries-table {
  min-width: 860px;
}

.member-row.is-unread td {
  font-weight: var(--weight-medium);
}

.inquiry-listing-title {
  display: block;
}

.inquiry-listing-kind {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bookings-table td.inquiry-preview {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-muted);
}

/* Admin conversation: centred column like a member's page. */
.admin-content:has(> [data-view-panel="inquiry-thread"]:not([hidden])) {
  max-width: none;
}

[data-view-panel="inquiry-thread"] {
  max-width: 760px;
  margin-inline: auto;
}

.inquiry-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 20px;
  color: var(--text-muted);
}

.inquiry-member-link {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.inquiry-member-email {
  font-size: 0.9rem;
}

.inquiry-end {
  margin-inline-start: auto;
}

/* Chat bubbles. Your own messages sit at the end of the line. */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(60vh, 560px);
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.chat-msg.is-mine {
  margin-inline-start: auto;
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 16%, var(--bg));
}

.chat-meta {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.chat-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-reply {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.chat-reply textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  resize: vertical;
}

.chat-reply textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.chat-reply-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.thread-ended {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Member pages (inbox, lists, contact and others). */
.member-main {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.member-main h1 {
  margin: 0 0 20px;
  font-size: 2rem;
  line-height: 1.2;
}

.inbox-block + .inbox-block {
  margin-top: 32px;
}

.inbox-block h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.inbox-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 20px;
  align-items: start;
}

.inbox-layout:not(.has-thread) {
  grid-template-columns: 1fr;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thread-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  text-decoration: none;
}

.thread-item:hover {
  border-color: var(--accent);
}

.thread-item[aria-current="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.thread-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.thread-item-top,
.thread-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.thread-item-title {
  font-weight: var(--weight-medium);
}

.thread-item.is-unread .thread-item-title,
.thread-item.is-unread .thread-item-preview {
  font-weight: var(--weight-bold);
  color: var(--text);
}

.thread-item-date {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.thread-item-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.thread-view {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.thread-back {
  display: none;
}

.thread-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.thread-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.thread-head h3:focus {
  outline: none;
}

.thread-kind {
  margin: 4px 0 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Phones: the list, or one conversation. */
@media (max-width: 760px) {
  .inbox-layout,
  .inbox-layout:not(.has-thread) {
    grid-template-columns: 1fr;
  }

  .inbox-layout.has-thread .inbox-list-wrap {
    display: none;
  }

  .thread-back {
    display: inline-flex;
  }

  .thread-view {
    padding: 16px;
  }
}

/* TEMPORARY inquiry test page (inquiry-test.html). */
.test-banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px dashed var(--status-yellow);
  border-radius: 10px;
  font-size: 0.9rem;
}

.test-listings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.test-listing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.test-listing-kind {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.test-listing-title {
  font-weight: var(--weight-medium);
}

/* ---------- Gallery: admin (admin.html#gallery) ---------- */
.gallery-intro {
  margin: 4px 0 16px;
}

/* Sections list: one row per section, drag handle at the start. */
.album-admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.album-admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  padding-inline-start: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  transition: box-shadow 0.15s, opacity 0.15s, border-color 0.15s;
}

.album-admin-row:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.album-admin-row.is-dragging {
  opacity: 0.55;
  box-shadow: 0 0 0 2px var(--accent);
}

.album-admin-row .gallery-drag {
  position: static;
  flex-shrink: 0;
  background: none;
  color: var(--text-muted);
}

.album-admin-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 14px;
  min-width: 0;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

.album-admin-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.album-admin-thumb {
  flex-shrink: 0;
  width: 88px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
}

.album-admin-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-admin-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.album-admin-name {
  overflow: hidden;
  font-weight: var(--weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-admin-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.album-admin-chevron {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--text-muted);
}

.album-admin-chevron svg {
  width: 20px;
  height: 20px;
}

:root[dir="rtl"] .album-admin-chevron svg {
  transform: scaleX(-1);
}

/* Draft / Published: outlined grey vs soft green, always with a label. */
.status-badge.album-published {
  background: color-mix(in srgb, var(--status-green) 18%, transparent);
}

.status-badge.album-draft {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .album-admin-thumb {
    width: 64px;
  }

  .album-admin-link {
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .album-admin-link .status-badge {
    order: 3;
    margin-inline-start: calc(64px + 12px);
  }

  .album-admin-chevron {
    display: none;
  }
}

/* One section: header actions, card preview and switches. */
.album-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.album-settings {
  margin: 20px 0 28px;
}

.album-settings h2 {
  margin: 0 0 16px;
}

.album-settings-body {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.album-preview {
  margin: 0;
}

.album-preview figcaption {
  margin-top: 10px;
}

.album-switches .switch-row:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .album-settings-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .album-preview {
    max-width: 360px;
  }
}

.album-items-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.album-items-head h2 {
  margin: 0;
}

.gallery-kind {
  width: min(100%, 320px);
  margin-bottom: 0;
}

.gallery-drag-hint {
  margin: -4px 0 12px;
}

.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  transition: box-shadow 0.15s, opacity 0.15s;
}

.gallery-tile.is-dragging {
  opacity: 0.55;
  box-shadow: 0 0 0 2px var(--accent);
}

.gallery-tile-open {
  position: relative;
  display: block;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, var(--text) 8%, var(--bg));
  cursor: pointer;
}

/* Out of the flow, so the picture's own size can't stretch the tile. */
.gallery-tile-open img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-tile-open:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

/* "Cover" pill on the tile used as the section's cover. */
.gallery-cover-tag {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
}

/* Muted icon on video tiles the admin chose to play without sound. Always
   bottom left: the length badge (written left to right) is bottom right. */
.gallery-muted {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: inline-flex;
  padding: 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.gallery-muted svg {
  width: 14px;
  height: 14px;
}

/* Drag handle: top corner, away from the Cover tag. */
.gallery-drag {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  color: var(--text);
  cursor: grab;
  touch-action: none;
}

.gallery-drag:active {
  cursor: grabbing;
}

.gallery-drag svg {
  width: 18px;
  height: 18px;
}

.gallery-drag:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Play icon and length on video tiles (admin and members). Photo-overlay
   colours stay fixed so they read on any picture. */
.gallery-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gallery-play svg {
  width: 24px;
  height: 24px;
  margin-left: 3px;
}

.gallery-duration {
  position: absolute;
  bottom: 8px;
  inset-inline-end: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  pointer-events: none;
}

/* Upload and edit dialogs */
.gallery-dialog {
  width: min(560px, calc(100vw - 32px));
}

.gallery-dialog-body {
  padding: 8px 20px 20px;
}

.gallery-dialog .editor-actions {
  margin-top: 16px;
  background: var(--bg-secondary);
}

.gallery-dialog .choice-field {
  max-width: none;
  margin-bottom: 16px;
}

.gallery-dialog .choice-field:disabled {
  opacity: 0.6;
}

.gallery-keep-open {
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--status-yellow) 14%, transparent);
  color: var(--text);
}

.gallery-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  margin: 12px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.gallery-progress li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.9rem;
}

.gallery-progress-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-progress-status {
  flex-shrink: 0;
  color: var(--text-muted);
}

/* Per-video "Sound" switch in the upload list. */
.gallery-sound {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.gallery-sound .switch {
  width: 38px;
  height: 22px;
}

.gallery-sound .switch::after {
  width: 16px;
  height: 16px;
}

.gallery-sound .switch:checked::after {
  inset-inline-start: 19px;
}

.gallery-sound .switch:disabled {
  opacity: 0.6;
  cursor: default;
}

.gallery-item-sound {
  margin: -8px 0 16px;
}

.gallery-progress li[data-state="done"] .gallery-progress-status {
  color: var(--status-green);
  font-weight: var(--weight-medium);
}

.gallery-progress li[data-state="failed"] .gallery-progress-status {
  flex-shrink: 1;
  color: var(--error);
}

.gallery-item-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}

.gallery-item-preview img,
.gallery-item-preview video {
  display: block;
  max-width: 100%;
  max-height: 40vh;
  object-fit: contain;
}

.gallery-dialog textarea {
  width: 100%;
}

.gallery-cover-block h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: var(--weight-medium);
}

/* ---------- Gallery: members (js/gallery.js) ---------- */
.gallery-tabs {
  max-width: 320px;
  margin-bottom: 20px;
}

/* A section name typed in either language still lines up with the page. */
:root[dir="ltr"] .album-title,
:root[dir="ltr"] #album-title,
:root[dir="ltr"] .album-admin-name {
  text-align: left;
}

:root[dir="rtl"] .album-title,
:root[dir="rtl"] #album-title,
:root[dir="rtl"] .album-admin-name {
  text-align: right;
}

/* Section cards: the whole card is the cover picture. Also used for the
   preview on the admin section page. */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.album-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.album-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  box-shadow: var(--shadow);
  color: var(--accent);
}

.album-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-out;
}

.album-card-media > svg {
  width: 48px;
  height: 48px;
  opacity: 0.6;
}

/* Overlay on: a soft black layer with the name. Fixed colours so the name
   reads on any picture, in light and dark mode. */
.album-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.38);
  transition: background-color 0.25s ease-out;
}

.album-card-name {
  max-width: 100%;
  color: #fff;
  font-size: 1.05rem;
  font-weight: var(--weight-bold);
  line-height: 1.3;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  overflow-wrap: anywhere;
}

.album-card-count {
  padding-inline: 2px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.album-card:hover .album-card-media img {
  transform: scale(1.04);
}

.album-card:hover .album-card-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.album-card:focus-visible {
  outline: none;
}

.album-card:focus-visible .album-card-media {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .album-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 8%, var(--bg));
  cursor: zoom-in;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Masonry: columns filled by js/gallery.js. */
.gallery-masonry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.gallery-column {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.gallery-empty {
  padding: 32px 0;
  text-align: center;
}

@media (max-width: 560px) {
  .gallery-masonry,
  .gallery-column {
    gap: 8px;
  }
}

/* Full-screen viewer: always dark, like a photo viewer. */
.gallery-viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0b0d0c;
  color: #f2f1ec;
}

.gallery-viewer::backdrop {
  background: #0b0d0c;
}

.gallery-viewer[open] {
  display: flex;
  flex-direction: column;
}

.viewer-open body {
  overflow: hidden;
}

.viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 16px;
  touch-action: pan-y;
  user-select: none;
}

.viewer-stage img,
.viewer-stage video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.viewer-top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 12px 0 16px;
}

.viewer-count {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(242, 241, 236, 0.8);
}

.viewer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.viewer-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.viewer-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.viewer-button svg {
  width: 24px;
  height: 24px;
}

.viewer-prev,
.viewer-next {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
}

.viewer-prev {
  inset-inline-start: 12px;
}

.viewer-next {
  inset-inline-end: 12px;
}

/* In Arabic the arrows point the way the pictures move. */
:root[dir="rtl"] .viewer-prev svg,
:root[dir="rtl"] .viewer-next svg {
  transform: scaleX(-1);
}

.viewer-caption {
  flex-shrink: 0;
  max-height: 25dvh;
  margin: 0;
  padding: 4px 20px calc(16px + env(safe-area-inset-bottom));
  overflow-y: auto;
  color: #fff;
  text-align: center;
}

/* Phones: swipe instead of arrows. */
@media (max-width: 560px) {
  .viewer-prev,
  .viewer-next {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item img,
  .gallery-tile,
  .album-admin-row,
  .album-card-media img,
  .album-card-overlay {
    transition: none;
  }

  .album-card:hover .album-card-media img {
    transform: none;
  }
}

/* ---------- Sign-in screens background (js/auth-background.js) ---------- */
/* Behind the card, filling the screen. It stays visible while a page hides
   its content during its sign-in check, so moving between screens doesn't
   flash. */
html.has-auth-bg {
  background: var(--bg);
}

html.has-auth-bg body.welcome,
html.has-auth-bg body.auth-page {
  background: transparent;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
  visibility: visible;
  view-transition-name: auth-bg;
  pointer-events: none;
}

.auth-bg img,
.auth-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-bg video {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-bg.is-playing video {
  opacity: 1;
}

/* A light veil in the page colour keeps the card and links readable. */
.auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    color-mix(in srgb, var(--bg) 20%, transparent),
    color-mix(in srgb, var(--bg) 45%, transparent)
  );
}

/* Text that sits straight on the background gets a soft shadow. */
html.has-auth-bg .site-footer {
  color: var(--text);
  text-shadow: 0 1px 2px color-mix(in srgb, var(--bg) 80%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .auth-bg video {
    transition: none;
  }
}

/* ---------- Page banners (js/banner.js) ---------- */
.site-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0b0d0c;
  color: #fff;
  isolation: isolate;
}

.banner-slides {
  position: relative;
  height: clamp(300px, 42vw, 560px);
  touch-action: pan-y;
  user-select: none;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.banner-slide.is-active {
  z-index: 1;
  opacity: 1;
}

.banner-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}

/* Caption and button at the bottom start corner, over a dark fade so the
   text reads on any picture. These colours stay fixed in both themes. */
.banner-content {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 72px clamp(16px, 4vw, 40px) clamp(40px, 5vw, 52px);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.banner-caption {
  max-width: 40em;
  margin: 0;
  font-size: clamp(1.15rem, 2.6vw, 1.9rem);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.banner-button {
  width: auto;
}

.banner-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  z-index: 2;
  display: flex;
  gap: 4px;
  transform: translateX(-50%);
}

.banner-dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.banner-dot::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  margin: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s, transform 0.2s;
}

.banner-dot[aria-current="true"]::before {
  background: #fff;
  transform: scale(1.25);
}

.banner-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 0;
  border-radius: 50%;
}

@media (max-width: 560px) {
  .banner-slides {
    height: min(70vh, 460px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .banner-slide,
  .banner-dot::before {
    transition: none;
  }
}

/* TEMPORARY banner test page (banner-test.html). */
.banner-test-page + .banner-test-page {
  margin-top: 40px;
}

.banner-test-label {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.banner-test-fallback {
  padding: 40px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  text-align: center;
}

.banner-test-fallback-title {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: var(--weight-bold);
}

/* ---------- Admin: Website Management (admin.html#website) ---------- */
.website-sections {
  margin-top: 20px;
}

.website-banner-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.website-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.website-card-head h2 {
  margin: 0;
}

.website-card > .profile-muted {
  margin-bottom: 16px;
}

.status-badge.website-status-live {
  background: color-mix(in srgb, var(--status-green) 18%, transparent);
}

.status-badge.website-status-changes {
  background: color-mix(in srgb, var(--status-yellow) 22%, transparent);
}

.status-badge.website-status-none {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.website-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.website-media-block h3 {
  margin: 0 0 8px;
}

.website-media-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.website-media-preview img,
.website-media-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.website-media-empty {
  margin: 0;
  padding: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.website-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.website-card .switch-row {
  margin-top: 8px;
}

/* Slides */
.slide-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.slide-editor {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 12px 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.slide-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.slide-media img,
.slide-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-tag {
  position: absolute;
  top: 6px;
  inset-inline-start: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
}

.slide-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.slide-fields .field {
  margin-bottom: 10px;
}

.slide-fields .slide-link {
  grid-column: 1 / -1;
  min-width: 0;
}

/* Button destination: a page OR an outside link. */
.slide-link select {
  width: 100%;
}

.slide-link-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: var(--weight-medium);
}

.slide-link-or::before,
.slide-link-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--border) 70%, transparent);
}

.slide-link-legacy {
  overflow-wrap: anywhere;
}

.slide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  grid-column: 1 / -1;
}

.slide-actions .slide-remove {
  margin-inline-start: auto;
  color: var(--error);
}

@media (max-width: 640px) {
  .slide-editor {
    grid-template-columns: 1fr;
  }

  .slide-fields {
    grid-template-columns: 1fr;
  }
}

/* Preview */
.website-preview-dialog {
  width: min(1200px, calc(100vw - 24px));
  max-width: none;
  height: min(860px, calc(100dvh - 24px));
  max-height: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow);
}

.website-preview-dialog[open] {
  display: flex;
  flex-direction: column;
}

.website-preview-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.website-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.website-preview-bar h2 {
  margin: 0;
  font-size: 1.1rem;
}

.website-preview-note {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.website-preview-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* The sign-in background, contained in the preview box. */
.website-preview-stage.is-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: hidden;
}

.website-preview-stage.is-auth .auth-bg {
  position: absolute;
  z-index: 0;
  view-transition-name: none;
}

.website-preview-card {
  position: relative;
  z-index: 1;
}

.website-preview-card .welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.website-preview-stage.is-banner {
  padding: 16px;
}

.website-preview-page {
  margin-top: 16px;
  padding: 32px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Frosted glass card (sign-in screens) ----------
   Add class="glass-card" to a screen's card (.welcome-card or .auth-card).
   It only takes effect when a background video or picture is published
   (html.has-auth-bg, see js/auth-background.js); without one the card
   keeps its normal look.

   The card is always a dark tint, in light and dark mode, so its text stays
   readable over any moment of the video: it's dark enough that even behind
   a pure white frame the text keeps a contrast of at least 4.5:1. Inside it
   the colour tokens switch to a light-on-dark set, so buttons, links and
   fields follow automatically. */
html.has-auth-bg .glass-card {
  --bg: #121614;
  --bg-secondary: rgba(255, 255, 255, 0.06);
  --text: #f4f2ec;
  /* A lighter gold than usual, for contrast on the dark glass. */
  --accent: #e2cc9f;
  --error: #ff9a8f;
  --text-muted: color-mix(in srgb, var(--text) 86%, var(--bg));
  --border: rgba(255, 255, 255, 0.34);
  --accent-hover: color-mix(in srgb, var(--accent) 80%, var(--text));
  --on-accent: #121614;
  --shadow-color: rgba(0, 0, 0, 0.55);

  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.22);
  /* A faint light sheen at the top, over the dark tint. */
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 45%),
    rgba(14, 17, 15, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 24px 60px -18px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* Browsers that can't blur what's behind: a more solid dark card instead. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  html.has-auth-bg .glass-card {
    background: rgba(14, 17, 15, 0.93);
  }
}

/* The logo with light lettering, whatever the device's theme. */
html.has-auth-bg .glass-card .brand-logo {
  content: url("../assets/logo-dark-mode.png");
}

html.has-auth-bg .glass-card h1 {
  color: var(--text);
}

/* Fields: a dark see-through fill with light text. */
html.has-auth-bg .glass-card input,
html.has-auth-bg .glass-card select,
html.has-auth-bg .glass-card textarea {
  background-color: rgba(0, 0, 0, 0.28);
  color: var(--text);
}

html.has-auth-bg .glass-card input::placeholder,
html.has-auth-bg .glass-card textarea::placeholder {
  color: color-mix(in srgb, var(--text) 62%, transparent);
}

/* Browser-drawn parts (autofill, scrollbars) in their dark versions. */
html.has-auth-bg .glass-card {
  color-scheme: dark;
}

/* Email / Phone switch on the log-in screen. */
html.has-auth-bg .glass-card .segmented {
  background: rgba(0, 0, 0, 0.28);
}

html.has-auth-bg .glass-card .segmented-option[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.16);
}

/* The country list opens over the rest of the form, so it needs a solid
   background rather than glass. */
html.has-auth-bg .glass-card .country-panel {
  background: #1d2320;
}

/* Apple button: dark lettering on the light button. */
html.has-auth-bg .glass-card .btn-apple {
  color: var(--bg);
}

/* ---------- Admin: Promotions (admin.html#promotions) ---------- */
.promos-table {
  min-width: 760px;
}

#promos-count {
  margin: 12px 0;
}

.promo-code-link {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.04em;
}

.status-badge.promo-on {
  background: color-mix(in srgb, var(--status-green) 18%, transparent);
}

.status-badge.promo-off {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.promo-expired-note {
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
  color: var(--error);
}

/* One code: a centred column, like a member's page. */
.admin-content:has(> [data-view-panel="promotion-edit"]:not([hidden])) {
  max-width: none;
}

[data-view-panel="promotion-edit"] {
  max-width: 760px;
  margin-inline: auto;
}

/* Only when the title is the code itself, not "New promo code". */
.promo-form .editor-head h1.is-code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.promo-form .profile-sections {
  margin-top: 16px;
}

.field .promo-code-input {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.promo-value-field {
  max-width: 260px;
  margin-top: 16px;
}

/* The number with its unit (% or AED) inside the box: number on the left,
   unit on the right, in both languages (numbers read left to right). */
.promo-value-wrap {
  position: relative;
  direction: ltr;
}

.field .promo-value-wrap input {
  padding-right: 64px;
  text-align: left;
}

.promo-value-unit {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  pointer-events: none;
}

.promo-example {
  margin: 8px 0 0;
}

.promo-applies {
  margin-top: 20px;
}

.promo-uses-wrap {
  margin-top: 12px;
}

.promo-uses-table {
  min-width: 560px;
}

/* ---------- Admin: Insights (admin.html#insights) ---------- */
.insights-refresh {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.insights-refresh .field-hint {
  margin: 0;
}

.insights {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.insights-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.insights-card h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.insights-card > .field-hint {
  margin: 0 0 12px;
}

/* Live now: the one big number on the page. */
.insights-live h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--status-green);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-green) 60%, transparent);
  animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.insights-hero {
  margin: 4px 0;
  font-size: 3.25rem;
  font-weight: var(--weight-bold);
  line-height: 1;
}

.insights-live-split {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 8px;
  color: var(--text-muted);
}

.insights-live-split strong {
  color: var(--text);
  font-weight: var(--weight-bold);
}

/* Today / this week / this month */
.insights-periods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.insights-figures {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
}

.insights-figures > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.insights-figures dt {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.insights-figures dd {
  margin: 0;
  font-size: 1.35rem;
  font-weight: var(--weight-bold);
}

/* Side by side: label above the figure. */
.insights-figures-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.insights-figures-row > div {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

/* Chart */
.insights-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 8px;
}

.insights-range {
  width: min(100%, 300px);
  margin: 0;
}

.insights-chart {
  position: relative;
  width: 100%;
  min-height: 240px;
}

.insights-chart svg {
  display: block;
}

.chart-grid {
  stroke: color-mix(in srgb, var(--border) 55%, transparent);
  stroke-width: 1;
}

.chart-baseline {
  stroke: var(--border);
  stroke-width: 1;
}

.chart-tick {
  fill: var(--text-muted);
  font-family: var(--font-en);
  font-size: 11px;
}

.chart-hit {
  fill: transparent;
}

.chart-mark {
  fill: var(--accent);
  transition: fill 0.12s;
}

.chart-bar {
  cursor: default;
  outline: none;
}

.chart-bar.is-active .chart-hit {
  fill: color-mix(in srgb, var(--text) 5%, transparent);
}

.chart-bar.is-active .chart-mark {
  fill: var(--accent-hover);
}

.chart-bar:focus-visible .chart-hit {
  stroke: var(--accent);
  stroke-width: 2;
}

.insights-chart-empty {
  position: absolute;
  inset: 40% 0 auto;
  margin: 0;
  color: var(--text-muted);
  text-align: center;
}

.insights-tooltip {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  pointer-events: none;
}

.insights-tooltip.is-inside {
  transform: translate(-50%, 0);
}

.insights-tooltip strong {
  font-size: 1rem;
}

.insights-tooltip span {
  color: var(--text-muted);
}

.insights-table-toggle {
  margin-top: 12px;
}

.insights-table-toggle summary {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.insights-table-toggle .bookings-table-wrap {
  max-height: 320px;
  margin-top: 8px;
  overflow-y: auto;
}

.insights-table {
  min-width: 0;
}

/* Most viewed */
.insights-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.insights-rank {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
}

.insights-rank li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  font-size: 0.95rem;
}

.insights-rank-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insights-rank-value {
  font-weight: var(--weight-medium);
}

/* A thin bar under each row, as long as its share of the top row. */
.insights-rank-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--share), color-mix(in srgb, var(--border) 45%, transparent) var(--share));
}

:root[dir="rtl"] .insights-rank-bar {
  background: linear-gradient(to left, var(--accent) var(--share), color-mix(in srgb, var(--border) 45%, transparent) var(--share));
}

.insights-rank-empty {
  display: block !important;
  color: var(--text-muted);
}

/* Bookings, revenue and promo codes (supabase/052) */
.ib-figures > div {
  min-width: 0;
}

.ib-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.ib-note {
  margin: 14px 0 0;
}

.ib-empty {
  position: static;
  margin: 12px 0 0;
}

.ib-skeleton {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ib-codes-title {
  margin: 18px 0 8px;
  font-size: 1rem;
}

/* Per promo code: a list that wraps on any phone. */
.ib-codes {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.ib-codes li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 10px 12px;
}

.ib-codes li + li {
  border-top: 1px solid var(--border);
}

.ib-code {
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.ib-code-figures {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ib-code-cancelled {
  flex-basis: 100%;
  font-size: 0.8rem;
}

/* 7 days / 30 days / All time on one line, even at 320px. */
.insights-money .insights-range .segmented-option {
  padding-inline: 6px;
  white-space: nowrap;
}

.insights-money .listings-error + .btn {
  margin-top: 8px;
}

.insights-later .member-placeholder-tag {
  margin: 4px 0 4px;
}

.insights-later dd {
  color: var(--text-muted);
}

.insights-footnote {
  margin: 0;
}

@media (max-width: 860px) {
  .insights-periods,
  .insights-two {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot {
    animation: none;
  }

  .chart-mark {
    transition: none;
  }
}

/* ---------- Admin: Overview (admin.html#overview) ---------- */
.ov-date {
  margin: 0;
  color: var(--text-muted);
}

/* Phones and tablets: one column, blocks in reading order. Wide screens:
   Today + Needs attention, then This week + Live now, then Latest. */
.ov {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 24px;
}

@media (min-width: 1180px) {
  .ov {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 32px 24px;
  }

  .ov-latest {
    grid-column: 1 / -1;
  }
}

.ov-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ov-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[lang="ar"] .ov-title {
  font-size: 0.95rem;
  letter-spacing: 0;
}

.ov-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.ov-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ov-value {
  font-size: 2.25rem;
  font-weight: var(--weight-bold);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.ov-value.is-none {
  color: var(--text-muted);
}

.ov-calm {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.ov-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 1. Today: two cards; tap one to see its bookings. */
.ov-today-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.ov-day {
  padding: 0;
  overflow: hidden;
}

/* An opened card takes the full row so its list has room. */
.ov-day.is-open {
  grid-column: 1 / -1;
}

.ov-day-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 104px;
  padding: 20px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: background-color 0.2s ease-out;
}

.ov-day-toggle:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.ov-day-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.ov-day-toggle:disabled {
  cursor: default;
}

.ov-day-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.ov-day-icon svg {
  width: 22px;
  height: 22px;
}

:root[dir="rtl"] .ov-day-icon svg {
  transform: scaleX(-1);
}

.ov-day.is-empty .ov-day-icon {
  background: color-mix(in srgb, var(--border) 30%, transparent);
  color: var(--text-muted);
}

.ov-day-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ov-chevron {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.2s ease-out;
}

.ov-day-toggle[aria-expanded="true"] .ov-chevron {
  transform: rotate(180deg);
}

.ov-day-toggle:disabled .ov-chevron {
  visibility: hidden;
}

.ov-day-list {
  padding: 0 8px 8px;
  border-top: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
}

/* Rows: bookings, inquiries and attention items. Each is a link. */
.ov-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease-out;
}

.ov-row:hover {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.ov-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.ov-row-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ov-row-top,
.ov-row-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  min-width: 0;
}

.ov-row-number {
  color: var(--accent);
  white-space: nowrap;
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
}

.ov-row-name {
  min-width: 0;
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.ov-row-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ov-row-ref {
  font-size: 0.8rem;
}

.ov-row-chevron {
  display: flex;
  flex: none;
  color: var(--text-muted);
}

.ov-row-chevron svg {
  width: 18px;
  height: 18px;
}

:root[dir="rtl"] .ov-row-chevron svg {
  transform: scaleX(-1);
}

.ov-row .status-badge {
  flex: none;
}

/* 2. Needs attention */
.ov-attention .ov-card {
  padding: 8px;
}

.ov-attention-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.ov-attention-icon svg {
  width: 18px;
  height: 18px;
}

.ov-attention-row .ov-row-main {
  font-weight: var(--weight-medium);
}

.ov-attention-count {
  flex: none;
  min-width: 28px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.85rem;
  font-weight: var(--weight-bold);
  text-align: center;
}

.ov-caught-up {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 12px;
}

.ov-caught-up svg {
  flex: none;
  width: 36px;
  height: 36px;
  color: var(--accent);
}

.ov-caught-up > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ov-caught-up strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: var(--weight-medium);
}

/* 3. This week */
.ov-number-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ov-number {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ov-number .ov-value {
  font-size: 1.85rem;
  overflow-wrap: anywhere;
}

.ov-unit {
  margin-inline-start: 4px;
  color: var(--text-muted);
  font-size: 0.5em;
  font-weight: var(--weight-medium);
}

.ov-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.ov-trend-icon {
  display: flex;
  flex: none;
}

.ov-trend-icon svg {
  width: 14px;
  height: 14px;
}

.ov-trend.is-up .ov-trend-icon {
  color: var(--accent);
}

/* 4. Live now */
.ov-live-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ov-live-total {
  font-size: 3rem;
}

.ov-live-card .insights-live-split,
.ov-live-card .field-hint {
  margin: 0;
}

/* 5. Latest activity */
.ov-latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.ov-latest .ov-card {
  padding: 16px 8px 8px;
}

.ov-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 8px;
}

.ov-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: var(--weight-medium);
}

.ov-see-all {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.ov-see-all:hover {
  text-decoration: underline;
}

.ov-latest .ov-calm {
  padding: 12px 12px 16px;
}

/* Loading skeletons and the small retry. */
.ov-skel {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--border) 40%, transparent);
  animation: ov-pulse 1.4s ease-in-out infinite;
}

.ov-skel-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
}

.ov-skel-line {
  width: 70%;
}

.ov-skel-line.is-short {
  width: 40%;
}

.is-loading [data-value],
.is-loading .ov-live-total,
.is-loading .insights-live-split strong {
  border-radius: 8px;
  background: color-mix(in srgb, var(--border) 40%, transparent);
  color: transparent;
  animation: ov-pulse 1.4s ease-in-out infinite;
}

.is-loading [data-value] {
  display: inline-block;
  min-width: 2.5em;
}

.is-loading .ov-day-toggle .ov-chevron,
.is-loading [data-trend],
.is-loading [data-empty] {
  visibility: hidden;
}

@keyframes ov-pulse {
  50% { opacity: 0.45; }
}

.is-error > :not(.ov-title, .ov-card-head, .ov-retry) {
  display: none !important;
}

.ov-retry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 14px 16px;
  border: 1px dashed color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ov-card .ov-retry {
  margin: 4px 12px 12px;
}

@media (max-width: 760px) {
  .ov-latest-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Phones: the week's numbers become rows, label and change on one side,
   the number on the other. */
@media (max-width: 560px) {
  .ov {
    gap: 28px;
  }

  .ov-number-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .ov-number {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label value" "trend value";
    align-items: center;
    gap: 2px 12px;
    padding: 14px 16px;
  }

  .ov-number .ov-label { grid-area: label; }
  .ov-number [data-value] { grid-area: value; font-size: 1.6rem; text-align: end; }
  .ov-number [data-trend] { grid-area: trend; }

  .ov-day-toggle {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-height: 0;
    padding: 16px;
  }

  .ov-day-text {
    width: 100%;
  }

  .ov-chevron {
    position: absolute;
    inset-block-start: 16px;
    inset-inline-end: 16px;
  }

  .ov-day {
    position: relative;
  }

  /* Rows with a status: the badge goes under the text. */
  .ov-row:has(> .status-badge) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .ov-row > .status-badge {
    grid-row: 2;
    grid-column: 1;
    justify-self: start;
  }

  .ov-row:has(> .status-badge) .ov-row-chevron {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .ov-value {
    font-size: 1.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ov-skel,
  .is-loading [data-value],
  .is-loading .ov-live-total,
  .is-loading .insights-live-split strong {
    animation: none;
  }

  .ov-day-toggle,
  .ov-row,
  .ov-chevron {
    transition: none;
  }
}

/* ---------- Admin: Top Pick card in the listing editors ---------- */
.top-pick-warning {
  margin: -6px 0 18px;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  font-size: 0.9rem;
}

.top-pick-warning ul {
  margin: 6px 0 0;
  padding-inline-start: 20px;
  font-weight: var(--weight-medium);
}

.top-pick-options {
  margin-bottom: 4px;
}

.top-pick-timer {
  margin-top: 0;
}

.top-pick-field {
  max-width: 260px;
  margin: 16px 0 0;
}

.top-pick-hint {
  margin: 12px 0 0;
}

.top-pick-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.top-pick-status.is-live {
  color: var(--text);
  font-weight: var(--weight-medium);
}

.top-pick-status.is-live::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* "Top Pick" on a list row. */
.top-pick-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.top-pick-badge svg {
  width: 12px;
  height: 12px;
}

/* ---------- Member home page (home.html) ---------- */
.home-banner {
  max-width: 1152px;
  margin: 20px auto 0;
  padding: 0 16px;
}

.home-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 32px 16px 88px;
}

/* The first section under the banner sits right under it (the Top Picks
   sections stay hidden until they have picks). */
.home-body > :not([hidden]):not(:not([hidden]) ~ *) {
  margin-top: 0;
}

.pick-card:focus-visible,
.picks-all:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.quick-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  color: var(--accent);
}

.quick-icon svg {
  width: 26px;
  height: 26px;
}

.picks-all svg {
  flex-shrink: 0;
  transition: transform 0.2s ease-out;
}

/* Arrows point the way the page reads. */
:root[dir="rtl"] .picks-all svg {
  transform: scaleX(-1);
}

:root[dir="rtl"] .picks-all:hover svg {
  transform: scaleX(-1) translateX(3px);
}

/* Small "View Gallery" link under the tabs, at the end side. */
/* Top 3 sections */
.home-picks {
  margin-top: 64px;
  animation: picks-in 0.35s ease-out both;
}

@keyframes picks-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Title, a gold hairline, then "View all". */
.picks-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.picks-head h2 {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.25;
}

.picks-head::after {
  content: "";
  order: 1;
  flex: 1 1 24px;
  min-width: 24px;
  height: 1px;
  background: color-mix(in srgb, var(--accent) 40%, transparent);
}

.picks-all {
  order: 2;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  min-height: 40px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
  text-decoration: none;
  white-space: nowrap;
}

.picks-all svg {
  width: 16px;
  height: 16px;
}

.picks-all:hover {
  color: var(--accent-hover);
}

.picks-all:hover svg {
  transform: translateX(3px);
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pick-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.pick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.pick-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
}

.pick-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}

.pick-card:hover .pick-media img {
  transform: scale(1.04);
}

/* Dark fade at the bottom of the photo, under the 01 / 02 / 03. These
   colours stay fixed in both themes, like the banner. */
.pick-media::after {
  content: "";
  position: absolute;
  inset: 55% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.pick-rank {
  position: absolute;
  bottom: 10px;
  inset-inline-start: 16px;
  z-index: 1;
  color: #fff;
  font-family: var(--font-en);
  font-size: 1.75rem;
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* "Made by Alshaal" on a sale pick: frosted pill at the top end corner. */
.pick-badge {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 1;
  max-width: calc(100% - 24px);
  padding: 4px 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(23, 28, 25, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pick-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 20px;
}

.pick-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: var(--weight-medium);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pick-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: pre-wrap;
}

.pick-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  margin: auto 0 0;
  padding-top: 10px;
}

.pick-price strong {
  font-size: 1.4rem;
  font-weight: var(--weight-bold);
  line-height: 1.2;
}

.pick-price-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Phones: the picks become a row to swipe through, with the next card
   peeking in. */
@media (max-width: 720px) {
  .home-banner {
    margin-top: 12px;
  }

  .home-body {
    padding: 24px 16px 64px;
  }

  .quick-icon {
    width: 44px;
    height: 44px;
  }

  .quick-icon svg {
    width: 22px;
    height: 22px;
  }

  .home-picks {
    margin-top: 48px;
  }

  .picks-head {
    margin-bottom: 16px;
  }

  .pick-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(80%, 320px);
    gap: 14px;
    margin-inline: -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .pick-grid::-webkit-scrollbar {
    display: none;
  }

  .pick-grid > li {
    scroll-snap-align: start;
  }

  .pick-card:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 360px) {
  .picks-head {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-picks {
    animation: none;
  }

  .picks-all svg,
  .pick-card,
  .pick-media img {
    transition: none;
  }

  .pick-card:hover,
  .pick-card:hover .pick-media img {
    transform: none;
  }
}

/* ---------- Placeholder pages (caravans.html and others, until built) ---------- */
.coming-soon {
  display: grid;
  place-items: center;
  padding: 64px 16px;
}

.coming-soon-card {
  max-width: 460px;
  padding: 40px 28px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  text-align: center;
}

.coming-soon-icon {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  color: var(--accent);
}

.coming-soon-icon svg {
  width: 32px;
  height: 32px;
}

.coming-soon h1 {
  margin: 20px 0 8px;
  font-size: 1.6rem;
  line-height: 1.25;
}

.coming-soon p {
  margin: 0 0 24px;
  color: var(--text-muted);
}

.coming-soon .btn {
  display: inline-flex;
  width: auto;
}

/* Member gallery page (gallery.html) */
.gallery-intro {
  max-width: 40em;
  margin: -8px 0 24px;
  color: var(--text-muted);
}

/* Titles typed in either language still line up with the page. */
:root[dir="ltr"] .pick-title {
  text-align: left;
}

:root[dir="rtl"] .pick-title {
  text-align: right;
}

/* ---------- Member navigation (js/member-nav.js) ---------- */
/* Top bar for members: menu button on the left, logo in the middle, nothing
   on the right. Left-to-right in both languages, like the rest of the
   header. <html class="member-header"> is set before the page paints, so
   the guest buttons and language button never flash. */
.member-header .site-header .header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 64px;
}

.member-header .site-header .header-brand {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  flex: none;
}

.member-header .site-header .header-brand picture {
  width: auto;
  max-width: none;
}

.member-header .site-header .header-logo {
  width: auto;
  height: 44px;
}

.member-header .site-header .header-actions {
  display: none;
}

.member-menu-button {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  width: 44px;
  height: 44px;
  border-color: transparent;
  border-radius: 12px;
  background: transparent;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

.member-menu-button:hover {
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.member-menu-button svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 520px) {
  .member-header .site-header .header-logo {
    height: 38px;
  }
}

/* ---------- Member menu (slides in from the menu button) ----------
   The dialog covers the screen as a dim layer; the panel slides in from the
   left in both languages, under the menu button. Text inside follows the
   language. */
.member-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgba(10, 13, 11, 0);
  color: var(--text);
  transition: background-color 0.24s ease-out;
}

.member-menu::backdrop {
  background: transparent;
}

.member-menu.is-open {
  background: rgba(10, 13, 11, 0.45);
}

:root.member-menu-open {
  overflow: hidden;
}

.member-menu-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: min(360px, 88vw);
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  box-shadow: var(--shadow);
  transform: translateX(-102%);
  transition: transform 0.24s ease-out;
}

.member-menu.is-open .member-menu-panel {
  transform: none;
}

.member-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.member-menu-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.01em;
}

.member-menu-close {
  width: 40px;
  height: 40px;
  border-color: transparent;
  background: transparent;
}

.member-menu-close:hover {
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Photo, name, email, phone. Opens the Profile page. */
.menu-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease-out;
}

.menu-card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.menu-card:focus-visible,
.member-menu-item:focus-visible,
.member-menu-logout:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.menu-card-avatar {
  width: 56px;
  height: 56px;
  font-size: 1.15rem;
}

.menu-card-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* Long names and emails wrap instead of being cut off. */
.menu-card-name {
  font-weight: var(--weight-medium);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.menu-card-line {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* Phone numbers and emails read left to right, but line up with the
   language's side of the card. */
:root[dir="rtl"] .menu-card-line {
  text-align: right;
}

.menu-card-phone {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.menu-card-phone [data-part="phone"] {
  white-space: nowrap;
}

.menu-card-phone [data-part="verified"] {
  display: inline-flex;
  flex-shrink: 0;
}

@media (max-width: 360px) {
  .menu-card {
    gap: 12px;
    padding: 14px 12px;
  }

  .menu-card-avatar {
    width: 46px;
    height: 46px;
    font-size: 1rem;
  }
}

/* Light green seal: phone verified. Same green in both themes. */
.menu-card-verified {
  width: 16px;
  height: 16px;
  color: #5cbf86;
}

.menu-card-arrow {
  display: inline-flex;
  color: var(--text-muted);
}

.menu-card-arrow svg {
  width: 18px;
  height: 18px;
}

:root[dir="rtl"] .menu-card-arrow svg {
  transform: scaleX(-1);
}

.member-menu-group {
  margin: 24px 4px 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[lang="ar"] .member-menu-group {
  letter-spacing: 0;
}

.member-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 6px 8px;
  border-radius: 12px;
  color: var(--text);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: background-color 0.2s ease-out;
}

.member-menu-item:hover {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.member-menu-item[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.member-menu-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  color: var(--accent);
}

.member-menu-icon svg {
  width: 19px;
  height: 19px;
}

.member-menu-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: border-color 0.2s ease-out, color 0.2s ease-out;
}

/* Space above Log Out even when the menu fills the screen. */
.member-menu-nav {
  margin-bottom: 28px;
}

.member-menu-logout:hover {
  border-color: var(--error);
  color: var(--error);
}

.member-menu-logout svg {
  width: 20px;
  height: 20px;
}

:root[dir="rtl"] .member-menu-logout svg {
  transform: scaleX(-1);
}

@media (prefers-reduced-motion: reduce) {
  .member-menu,
  .member-menu-panel,
  .member-menu-button {
    transition: none;
  }
}

/* Bottom bar: Home, My Bookings, Inbox, Profile. Full width on phones, a
   floating dock on wider screens. */
.member-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 45;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--bg-secondary) 94%, transparent);
  backdrop-filter: blur(12px);
}

.member-nav ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 560px;
  margin: 0 auto;
  padding: 6px 8px;
  list-style: none;
}

.member-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 56px;
  padding: 5px 2px;
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: var(--weight-medium);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: color 0.2s ease-out;
}

.member-nav-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 30px;
  border-radius: 999px;
  transition: background-color 0.2s ease-out;
}

.member-nav-icon svg {
  width: 22px;
  height: 22px;
}

.member-nav-item:hover {
  color: var(--text);
}

.member-nav-item[aria-current="page"] {
  color: var(--accent);
}

.member-nav-item[aria-current="page"] .member-nav-icon {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.member-nav-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.member-nav-badge {
  position: absolute;
  top: -5px;
  inset-inline-end: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.68rem;
  box-shadow: 0 0 0 2px var(--bg-secondary);
}

/* Room at the bottom so the bar never covers the page. */
body.has-member-nav {
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
  .member-nav {
    bottom: 16px;
    left: 50%;
    right: auto;
    width: 440px;
    padding-bottom: 0;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    border-radius: 999px;
    box-shadow: var(--shadow);
    transform: translateX(-50%);
  }

  .member-nav ul {
    padding: 6px 14px;
  }

  body.has-member-nav {
    padding-bottom: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .member-nav-item,
  .member-nav-icon {
    transition: none;
  }
}

/* ---------- Member Profile (profile.html) ---------- */
.member-main.member-profile {
  max-width: 720px;
}

.member-profile .profile-head h1 {
  margin: 0;
}

.member-profile .back-link {
  margin-bottom: 12px;
}

.member-profile .profile-section + .profile-section {
  margin-top: 16px;
}

.profile-lead {
  max-width: 36em;
  margin: -8px 0 20px;
  color: var(--text-muted);
}

/* Profile card: photo, name, email, phone. */
.member-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 26px 24px;
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--bg-secondary);
}

.avatar-xl {
  width: 84px;
  height: 84px;
  font-size: 1.8rem;
  box-shadow: 0 0 0 3px var(--bg-secondary), 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent);
}

.member-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.member-card-name {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: var(--weight-bold);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.member-card-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

/* "Not verified", "Needed for booking": gold tint instead of green. */
.profile-tag.is-missing {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Menu: Account and Legal. */
.profile-menu {
  margin-top: 32px;
}

.profile-menu-title {
  margin: 0 0 10px;
  padding-inline: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[lang="ar"] .profile-menu-title {
  font-size: 0.9rem;
  letter-spacing: 0;
}

.menu-list + .profile-menu-title {
  margin-top: 28px;
}

.menu-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  list-style: none;
}

.menu-list li + li {
  border-top: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 14px 18px;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s ease-out;
}

.menu-row:hover {
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-secondary));
}

.menu-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.menu-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  color: var(--accent);
}

.menu-icon svg {
  width: 20px;
  height: 20px;
}

.menu-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.menu-label {
  font-weight: var(--weight-medium);
}

.menu-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.menu-row .profile-tag {
  flex-shrink: 0;
}

.menu-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

:root[dir="rtl"] .menu-chevron,
:root[dir="rtl"] .member-logout svg {
  transform: scaleX(-1);
}

.member-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.member-logout svg {
  width: 20px;
  height: 20px;
}

/* ID or passport */
.id-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 12px 0 4px;
  text-align: center;
}

.id-empty-icon,
.id-file-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  color: var(--accent);
}

.id-empty-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
}

.id-empty-icon svg {
  width: 32px;
  height: 32px;
}

.id-empty-title {
  margin: 0;
  font-weight: var(--weight-medium);
}

.id-empty .btn,
.id-file-actions .btn {
  width: auto;
}

.id-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 16px;
}

.id-file-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.id-file-icon svg {
  width: 24px;
  height: 24px;
}

.id-file-name {
  margin: 0 0 2px;
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.id-file-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px 12px;
}

.id-file-actions .id-remove:not(:disabled) {
  margin-inline-start: auto;
  color: var(--error);
}

.id-hint {
  margin: 20px 0 0;
}

#id-notice:not(:empty) {
  margin-top: 8px;
}

@media (max-width: 560px) {
  .member-card {
    gap: 16px;
    padding: 20px 18px;
  }

  .avatar-xl {
    width: 68px;
    height: 68px;
    font-size: 1.45rem;
  }

  .member-card-name {
    font-size: 1.15rem;
  }

  .menu-row {
    gap: 12px;
    padding: 12px 14px;
  }
}

@media (max-width: 360px) {
  .member-card {
    align-items: flex-start;
  }

  .avatar-xl {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }

  .menu-sub {
    display: none;
  }

  .id-file {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .id-file > .profile-tag {
    grid-column: 2;
    justify-self: start;
  }
}

/* Names typed in either language still line up with the page. */
:root[dir="ltr"] .member-profile [data-full-name] {
  text-align: left;
}

:root[dir="rtl"] .member-profile [data-full-name] {
  text-align: right;
}

.member-profile .profile-identity {
  margin-bottom: 0;
}

/* Small phones: tab labels stay on one line. */
@media (max-width: 360px) {
  .member-nav ul {
    padding-inline: 4px;
  }

  .member-nav-item {
    font-size: 0.66rem;
    white-space: nowrap;
  }

  .member-nav-icon {
    width: 48px;
  }
}

/* ---------- Listing cards with the favourites heart (js/listing-card.js) ----------
   The card is the link; the heart row sits under it, outside the link. */
.pick-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.pick-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  border-radius: var(--radius);
}

.pick-card .fav-row {
  margin: 0 20px;
  padding: 12px 0 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}

/* Small label above the title: "Campsite", "Caravan rental"... */
.pick-kind {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[lang="ar"] .pick-kind {
  letter-spacing: 0;
}

/* ---------- Favourites heart and live count (js/favourites.js) ---------- */
.fav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fav-button {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease-out, background-color 0.2s ease-out, color 0.2s ease-out;
}

.fav-button svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease-out;
}

.fav-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fav-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.fav-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.fav-button[aria-pressed="true"] svg {
  fill: currentColor;
}

.fav-button.is-popping svg {
  transform: scale(1.22);
}

.fav-count {
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.3;
}

.fav-row.is-centered {
  justify-content: center;
  margin: 0 0 24px;
}

/* "Log in to save" box for guests. */
.fav-login-dialog {
  width: min(400px, calc(100vw - 32px));
}

.fav-login-dialog .fav-login-body {
  padding: 4px 24px 24px;
}

.fav-login-dialog p {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.fav-login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fav-login-actions .btn {
  flex: 1 1 120px;
  width: auto;
}

.fav-login-actions .btn-link {
  flex-basis: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .fav-button,
  .fav-button svg {
    transition: none;
  }

  .fav-button.is-popping svg {
    transform: none;
  }
}

/* ---------- Favourites page (favourites.html) ---------- */
.fav-intro {
  max-width: 40em;
  margin: -8px 0 28px;
  color: var(--text-muted);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fav-empty {
  padding: 24px 0;
}

.fav-empty .coming-soon-card {
  margin: 0 auto;
}

@media (max-width: 560px) {
  .listing-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

/* ---------- Home page: Gallery banner, About Us and Contact Us ---------- */
.home-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  margin-top: 72px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  animation: picks-in 0.35s ease-out both;
}

.gallery-collage {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  min-height: 320px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
}

.gallery-collage img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}

.gallery-collage > :first-child {
  grid-row: span 2;
}

.gallery-collage[data-count="1"] > :first-child {
  grid-column: span 2;
}

.gallery-collage[data-count="2"] > * {
  grid-row: span 2;
}

.collage-tile {
  overflow: hidden;
  min-height: 0;
}

.home-gallery:hover .collage-tile img {
  transform: scale(1.03);
}

/* No photos yet: a calm gold-tinted panel with the gallery icon. */
.gallery-collage[data-count="0"] {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  color: var(--accent);
}

.gallery-collage[data-count="0"] svg {
  width: 56px;
  height: 56px;
  opacity: 0.8;
}

.home-gallery-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 44px;
}

.home-eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

:root[lang="ar"] .home-eyebrow {
  letter-spacing: 0;
}

.home-gallery-text h2 {
  margin: 0 0 12px;
  font-size: 1.6rem;
  font-weight: var(--weight-medium);
  line-height: 1.25;
  text-wrap: balance;
}

.home-gallery-text p:not(.home-eyebrow) {
  margin: 0 0 26px;
  color: var(--text-muted);
  line-height: 1.6;
}

.home-gallery-text .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
}

.home-gallery-text .btn svg,
.more-arrow {
  width: 18px;
  height: 18px;
}

:root[dir="rtl"] .home-gallery-text .btn svg,
:root[dir="rtl"] .more-arrow {
  transform: scaleX(-1);
}

.home-more {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.more-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}

.more-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: var(--shadow);
}

.more-card:focus-visible,
.home-gallery-text .btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.more-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.more-title {
  font-size: 1.1rem;
  font-weight: var(--weight-medium);
}

.more-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.more-arrow {
  flex-shrink: 0;
  color: var(--accent);
}

@media (max-width: 760px) {
  .home-gallery {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 56px;
  }

  .gallery-collage {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .home-gallery-text {
    padding: 26px 22px 28px;
  }

  .home-gallery-text h2 {
    font-size: 1.35rem;
  }
}

@media (max-width: 560px) {
  .home-more {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .more-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-gallery {
    animation: none;
  }

  .gallery-collage img,
  .more-card {
    transition: none;
  }

  .home-gallery:hover .collage-tile img,
  .more-card:hover {
    transform: none;
  }
}

/* ---------- Contact page (contact.html) ---------- */
.contact-main {
  max-width: 680px;
}

.contact-intro {
  max-width: 34em;
  margin: -8px 0 32px;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact-eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:root[dir="rtl"] .contact-eyebrow {
  letter-spacing: 0;
}

.contact-card {
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  box-shadow: var(--shadow);
}

.contact-card h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: var(--weight-medium);
}

.contact-card-text {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.contact-form-card .field {
  margin-bottom: 16px;
}

.contact-form-card textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 16px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 6px;
}

.contact-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding-inline: 28px;
}

.contact-send svg {
  width: 20px;
  height: 20px;
}

.contact-actions .profile-notice {
  margin: 0;
}

.contact-gate {
  margin-top: 6px;
  padding: 18px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 9%, var(--bg));
}

.contact-gate p {
  margin: 0 0 14px;
  line-height: 1.6;
}

.contact-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-done {
  padding: 12px 0 4px;
  text-align: center;
}

.contact-done-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.contact-done-icon svg {
  width: 28px;
  height: 28px;
}

.contact-done h3 {
  margin: 14px 0 6px;
  font-size: 1.2rem;
}

.contact-done p {
  margin: 0 0 20px;
  color: var(--text-muted);
}

/* Call, WhatsApp, Email, Visit on Maps */
.contact-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.contact-quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease-out, transform 0.15s ease-out;
}

.contact-quick-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}

.contact-quick-card:active {
  transform: scale(0.98);
}

.contact-quick-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-quick-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.contact-quick-icon svg {
  width: 20px;
  height: 20px;
}

.contact-quick-title {
  font-weight: var(--weight-medium);
}

.contact-quick-sub {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Business hours and location */
.contact-info {
  margin-top: 28px;
  box-shadow: none;
}

.contact-hours {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.contact-hours li {
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  line-height: 1.5;
}

.contact-hours li:last-child {
  border-bottom: 0;
}

.contact-address h3 {
  margin: 18px 0 6px;
  font-size: 1rem;
  font-weight: var(--weight-medium);
}

.contact-address p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 560px) {
  .contact-card {
    padding: 22px 18px;
  }

  .contact-send {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-quick-card {
    transition: none;
  }

  .contact-quick-card:active {
    transform: none;
  }
}

.fav-empty h2 {
  margin: 20px 0 8px;
  font-size: 1.4rem;
  line-height: 1.25;
}

.fav-empty p {
  margin: 0 0 24px;
  color: var(--text-muted);
}

.fav-empty .btn {
  display: inline-flex;
  width: auto;
}

/* ---------- Installed app on iPhone (status bar over the page) ----------
   Pages use viewport-fit=cover and a translucent status bar, so in the
   installed app the phone's clock sits on top of the page. A strip in the
   app's dark green sits behind it and the page starts below it. Outside
   the installed app these insets are 0, so nothing changes. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: env(safe-area-inset-top, 0px);
  background: #202720;
  pointer-events: none;
}

body.site {
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.site-header {
  top: env(safe-area-inset-top, 0px);
}

body.welcome,
body.auth-page {
  padding-top: calc(72px + env(safe-area-inset-top, 0px));
}

.lang-toggle {
  top: calc(16px + env(safe-area-inset-top, 0px));
}

.member-menu-panel {
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
}

/* ---------- Install the app (js/install-app.js) ---------- */
/* Install App in the member menu is a button that looks like the links. */
button.member-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: var(--weight-medium);
  text-align: start;
  cursor: pointer;
}

/* The invitation: a small card floating just above the bottom bar. */
.install-banner {
  position: fixed;
  inset-inline: 12px;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  z-index: 44;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 2px 12px;
  max-width: 460px;
  margin-inline: auto;
  padding: 12px 10px 12px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

:root[dir="rtl"] .install-banner {
  padding: 12px 12px 12px 10px;
}

.install-banner.is-shown {
  opacity: 1;
  transform: none;
}

.install-banner-icon {
  grid-row: span 2;
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.install-banner-text {
  grid-column: 2;
  min-width: 0;
  padding-top: 2px;
}

.install-banner-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: var(--weight-medium);
  line-height: 1.3;
}

.install-banner-sub {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Under the text, so the text gets the full width. */
.install-banner-button {
  grid-row: 2;
  grid-column: 2;
  justify-self: start;
  margin-top: 8px;
}

.install-banner-close {
  grid-row: 1;
  grid-column: 3;
  margin-top: -2px;
  width: 36px;
  height: 36px;
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
}

.install-banner-close:hover {
  border-color: transparent;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.install-banner-close svg {
  width: 18px;
  height: 18px;
}

/* The Share icon inside the iPhone tips, the way Safari draws it. */
.install-share {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin-inline: 2px;
  color: var(--accent);
  vertical-align: -0.2em;
}

@media (min-width: 900px) {
  .install-banner {
    bottom: 108px;
  }
}

@media (max-width: 360px) {
  .install-banner {
    inset-inline: 8px;
    gap: 10px;
  }

  .install-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}

/* iPhone: how to add it, step by step. */
.install-dialog-body {
  padding: 8px 24px 24px;
  text-align: center;
}

.install-dialog-icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.install-steps {
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  text-align: start;
}

.install-steps li {
  position: relative;
  padding-block: 10px;
  padding-inline-start: 40px;
  line-height: 1.5;
  counter-increment: step;
}

.install-steps li + li {
  border-top: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}

.install-steps li::before {
  content: counter(step);
  position: absolute;
  top: 10px;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: var(--weight-bold);
}

@media (prefers-reduced-motion: reduce) {
  .install-banner {
    transition: none;
  }
}

/* ---------- Security code before a password change (js/password-code.js) ---------- */
.pw-code-lead {
  max-width: 34em;
  margin: 0 0 16px;
}

.pw-code-email {
  color: var(--text);
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

/* One wide box for the 6 digits, easy to tap and to paste into. */
.pw-code-field {
  max-width: 260px;
}

.pw-code-field .code-input {
  height: 56px;
  font-family: var(--font-en);
  font-size: 1.6rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.4em;
  /* The last digit's spacing would push the row off-centre. */
  text-indent: 0.4em;
}

.pw-code .profile-actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.pw-code-ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-green) 14%, transparent);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
}

:root[dir="rtl"] .pw-code-ok {
  padding: 6px 10px 6px 14px;
}

.pw-code-ok svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--status-green);
}

/* Centred in Arabic too (an Arabic rule right-aligns left-to-right inputs). */
:root .pw-code .pw-code-field input.code-input {
  text-align: center;
}

/* ---------- Section tabs under the header (js/member-nav.js) ----------
   Caravans, Campsites, For Sale, Gallery. Part of the sticky header, so
   they stay in place while the page scrolls and never cover content. */
.section-tabs {
  border-top: 1px solid color-mix(in srgb, var(--border) 35%, transparent);
}

.section-tabs ul {
  display: flex;
  justify-content: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 8px;
  overflow-x: auto;
  list-style: none;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.section-tabs ul::-webkit-scrollbar {
  display: none;
}

/* Equal widths; if a tab can't fit (very large text), the row slides. */
.section-tabs li {
  flex: 1 1 0;
  min-width: max-content;
  max-width: 150px;
}

.section-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 48px;
  padding: 7px 10px 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease-out;
}

.section-tab svg {
  width: 20px;
  height: 20px;
}

.section-tab:hover {
  color: var(--text);
}

.section-tab[aria-current="page"] {
  color: var(--accent);
}

/* Thin gold underline on the current section. */
.section-tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline: 22%;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}

.section-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
  border-radius: 8px;
}

:root[lang="ar"] .section-tab {
  font-size: 0.8rem;
}

/* ---------- Big action button (listing detail pages, js/member-nav.js) ----------
   Takes the bottom bar's place: Rent Now, Book Now or Inquire. */
.member-action-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 45;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--bg-secondary) 94%, transparent);
  backdrop-filter: blur(12px);
}

.member-action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  min-height: 52px;
  margin: 0 auto;
  font-size: 1.05rem;
  text-decoration: none;
}

body.has-action-bar {
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 900px) {
  .member-action-bar {
    bottom: 16px;
    left: 50%;
    right: auto;
    width: 440px;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transform: translateX(-50%);
  }

  body.has-action-bar {
    padding-bottom: 104px;
  }
}

/* ---------- Room for the install invitation above the bottom bar ---------- */
body.has-member-nav.has-install-banner,
body.has-action-bar.has-install-banner {
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px) + var(--install-banner-space, 0px));
}

@media (min-width: 900px) {
  body.has-member-nav.has-install-banner,
  body.has-action-bar.has-install-banner {
    padding-bottom: calc(108px + var(--install-banner-space, 0px));
  }
}

/* ---------- Caravan rentals: list (caravans.html, js/caravan-rentals.js) ---------- */
.rentals-main {
  max-width: 880px;
}

.rentals-intro {
  max-width: 36em;
  margin: -8px 0 24px;
  color: var(--text-muted);
}

.rentals-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 14px;
}

.rentals-count {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.rentals-sort {
  position: relative;
  flex-shrink: 0;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: border-color 0.2s ease-out;
}

.sort-button svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.sort-button:hover,
.sort-button[aria-expanded="true"] {
  border-color: var(--accent);
}

.sort-button:focus-visible,
.sort-menu button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 30;
  width: max-content;
  min-width: 220px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.sort-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-align: start;
  cursor: pointer;
}

.sort-menu button:hover {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.sort-menu button svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent);
  visibility: hidden;
}

.sort-menu button[aria-checked="true"] {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.sort-menu button[aria-checked="true"] svg {
  visibility: visible;
}

/* One row per caravan: photo on one side, details on the other. */
.rental-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rental-row {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.15s ease-out;
}

.rental-row:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: var(--shadow);
}

.rental-link {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 176px;
  color: inherit;
  text-decoration: none;
}

.rental-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  border-radius: var(--radius);
}

/* Soft tint while the photo loads; the photo fades in over it. */
.rental-photo {
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-secondary));
}

.rental-photo img,
.rd-slide img,
.rd-viewer-slide img {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.rental-photo img.is-loaded,
.rd-slide img.is-loaded,
.rd-viewer-slide img.is-loaded {
  opacity: 1;
}

.rental-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease-out, transform 0.5s ease-out;
}

.rental-row:hover .rental-photo img {
  transform: scale(1.04);
}

.rental-badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 16px);
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.7rem;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.rental-badge svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.rental-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px 18px;
  padding-inline-end: 64px; /* room for the heart */
}

.rental-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 1.08rem;
  font-weight: var(--weight-medium);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rental-location {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.rental-location svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.rental-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.rental-facts li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.rental-facts svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* Campsite rows: up to 3 key amenities as small gold-tinted icon chips. */
.rental-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.rental-amenities li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  color: var(--accent);
}

.rental-amenities svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* An amenity the admin added has no icon: a short name instead. */
.rental-amenities li.is-named {
  max-width: 9.5em;
  padding-inline-end: 10px;
}

.rental-amenities li.is-named span {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Gentle press feedback on a row. */
.rental-row:active {
  transform: scale(0.985);
}

@media (prefers-reduced-motion: reduce) {
  .rental-row,
  .rental-photo img {
    transition: none;
  }

  .rental-row:active {
    transform: none;
  }
}

.rental-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 5px;
  margin: auto 0 0;
  padding-top: 8px;
}

.rental-price strong,
.rd-price-line strong {
  color: var(--accent);
  font-family: var(--font-en);
  font-weight: var(--weight-bold);
}

.rental-price strong {
  font-size: 1.3rem;
}

.price-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.rental-price.is-empty,
.rd-price-line.is-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* The heart in the row's corner, with the number under it. */
.rental-heart {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
}

.fav-row.is-compact {
  flex-direction: column;
  gap: 2px;
}

.fav-row.is-compact .fav-button {
  width: 38px;
  height: 38px;
  background: color-mix(in srgb, var(--bg-secondary) 85%, transparent);
}

.fav-row.is-compact .fav-count {
  min-height: 1.2em;
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: var(--weight-medium);
  line-height: 1.2;
}

/* Titles typed in either language still line up with the page. */
:root[dir="ltr"] .rental-title,
:root[dir="ltr"] .rd-title,
:root[dir="ltr"] .rd-description {
  text-align: left;
}

:root[dir="rtl"] .rental-title,
:root[dir="rtl"] .rd-title,
:root[dir="rtl"] .rd-description {
  text-align: right;
}

/* Loading: three calm rows. */
.rental-skeleton {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 176px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.sk-photo,
.rd-gallery-loading,
.sk-line,
.sk-lines span {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 10%, var(--bg-secondary)) 30%,
    color-mix(in srgb, var(--accent) 18%, var(--bg-secondary)) 50%,
    color-mix(in srgb, var(--accent) 10%, var(--bg-secondary)) 70%);
  background-size: 300% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}

.sk-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px;
}

.sk-lines span,
.sk-line {
  display: block;
  height: 12px;
  border-radius: 6px;
}

.sk-lines span:nth-child(1) { width: 75%; height: 16px; }
.sk-lines span:nth-child(2) { width: 50%; }
.sk-lines span:nth-child(3) { width: 35%; margin-top: auto; height: 18px; }

@keyframes sk-shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

@media (max-width: 640px) {
  .rental-link,
  .rental-skeleton {
    grid-template-columns: minmax(112px, 36%) minmax(0, 1fr);
    min-height: 150px;
  }

  .rental-info {
    gap: 5px;
    padding: 12px 14px;
    padding-inline-end: 52px;
  }

  .rental-title {
    font-size: 0.98rem;
  }

  .rental-price strong {
    font-size: 1.15rem;
  }

  .rental-heart {
    top: 8px;
    inset-inline-end: 8px;
  }

  .fav-row.is-compact .fav-button {
    width: 36px;
    height: 36px;
  }

  .rental-row:hover {
    box-shadow: none;
  }
}

@media (max-width: 360px) {
  .rental-info {
    padding: 10px 12px;
    padding-inline-end: 48px;
  }

  .rental-facts {
    gap: 3px 10px;
  }
}

/* ---------- Caravan rentals: detail (listing.html?kind=caravan) ---------- */
.listing-main {
  width: 100%;
}

.rental-detail {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.rd-back {
  margin-bottom: 12px;
}

.rd-back svg {
  width: 18px;
  height: 18px;
}

:root[dir="rtl"] .rd-back svg {
  transform: scaleX(-1);
}

.rd-gallery {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-secondary));
}

.rd-gallery-loading {
  position: absolute;
  inset: 0;
}

.rd-gallery.is-empty {
  display: grid;
  place-items: center;
  color: var(--accent);
}

.rd-gallery.is-empty svg {
  width: 72px;
  height: 72px;
  opacity: 0.7;
}

/* Swipe between photos; each snaps into place. */
.rd-track,
.rd-viewer-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.rd-track::-webkit-scrollbar,
.rd-viewer-track::-webkit-scrollbar {
  display: none;
}

.rd-slide {
  flex: 0 0 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.rd-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rd-slide:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

/* Over photos these stay the same in both themes. */
.rd-counter,
.rd-viewer-count {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(23, 28, 25, 0.62);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--font-en);
  font-size: 0.78rem;
  font-weight: var(--weight-medium);
  direction: ltr;
}

.rd-counter {
  position: absolute;
  bottom: 12px;
  inset-inline-end: 12px;
  pointer-events: none;
}

.rd-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(242, 241, 236, 0.9);
  color: #202720;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity 0.2s ease-out;
}

.rd-arrow svg {
  width: 20px;
  height: 20px;
}

.rd-prev {
  inset-inline-start: 12px;
}

.rd-next {
  inset-inline-end: 12px;
}

:root[dir="rtl"] .rd-arrow svg {
  transform: scaleX(-1);
}

.rd-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.rd-arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Phones swipe; the arrows are for mouse and keyboard. */
@media (hover: none) {
  .rd-gallery .rd-arrow {
    display: none;
  }
}

.rd-body {
  padding-top: 20px;
}

.rd-head-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rd-title {
  margin: 0 0 6px;
  font-size: 1.7rem;
  font-weight: var(--weight-bold);
  line-height: 1.25;
}

.rd-location {
  font-size: 0.95rem;
}

.rd-head .sk-title {
  width: 70%;
  height: 24px;
  margin-bottom: 10px;
}

.rd-head .sk-line:not(.sk-title) {
  width: 40%;
}

.rd-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.rd-facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 11%, var(--bg));
  font-size: 0.875rem;
  font-weight: var(--weight-medium);
}

.rd-facts svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.rd-price {
  margin-top: 22px;
  padding: 16px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.rd-price:empty {
  display: none;
}

.rd-price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  margin: 0;
}

.rd-price-line strong {
  font-size: 1.8rem;
  line-height: 1.2;
}

.rd-price-note {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.rd-section {
  margin-top: 32px;
}

.rd-section h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: var(--weight-medium);
}

.rd-description {
  max-width: 65ch;
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap;
}

.rd-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--bg-secondary);
  font-size: 0.9rem;
}

.rd-features svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--accent);
}

/* Phones: photos edge to edge, like an app. */
@media (max-width: 640px) {
  .rental-detail {
    padding-top: 12px;
  }

  .rd-gallery {
    aspect-ratio: 4 / 3;
    margin-inline: -16px;
    border-radius: 0;
  }

  .rd-title {
    font-size: 1.4rem;
  }

  .rd-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .rd-features {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Full-screen photos. Dark in both themes, like a photo viewer. */
.rd-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #0d100e;
  color: #fff;
}

.rd-viewer::backdrop {
  background: rgba(0, 0, 0, 0.9);
}

:root.rd-viewer-open {
  overflow: hidden;
}

.rd-viewer-bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
}

.rd-viewer-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.rd-viewer-close svg {
  width: 22px;
  height: 22px;
}

.rd-viewer-close:focus-visible {
  outline: 2px solid #b89a65;
  outline-offset: 2px;
}

.rd-viewer-slide {
  display: grid;
  flex: 0 0 100%;
  place-items: center;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.rd-viewer-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.rd-viewer .rd-arrow {
  z-index: 2;
}

/* ---------- Big bottom button: not ready yet ("Coming soon") ---------- */
.member-action-button.is-soon,
.member-action-button.is-soon:disabled {
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
  color: var(--text-muted);
  opacity: 1;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .sk-photo,
  .rd-gallery-loading,
  .sk-line,
  .sk-lines span {
    animation: none;
  }

  .rental-row,
  .rental-photo img,
  .rd-slide img,
  .rd-viewer-slide img,
  .sort-button {
    transition: none;
  }

  .rental-row:hover .rental-photo img {
    transform: none;
  }
}

/* ---------- Map location (js/listing-location.js) ---------- */
.location-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.location-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  color: var(--accent);
}

.location-icon svg {
  width: 22px;
  height: 22px;
}

.location-text {
  flex: 1 1 160px;
  min-width: 0;
}

.location-label {
  margin: 0;
  font-weight: var(--weight-medium);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.location-place {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

:root[dir="ltr"] .location-label,
:root[dir="ltr"] .location-place {
  text-align: left;
}

:root[dir="rtl"] .location-label,
:root[dir="rtl"] .location-place {
  text-align: right;
}

.location-button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 44px;
}

.location-button svg {
  width: 18px;
  height: 18px;
}

/* Phones: the button gets its own full-width line. */
@media (max-width: 480px) {
  .location-button {
    flex-basis: 100%;
  }
}

/* Admin: the map link box and its Test button. */
.map-field .inline-inputs input {
  flex: 1;
  min-width: 0;
}

.map-test {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  width: auto;
  white-space: nowrap;
}

.map-test[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Admin Location card: a little air between its parts. */
[aria-labelledby$="location-title"] > .profile-muted {
  margin-bottom: 16px;
}

.map-field {
  margin: 16px 0;
}

/* Map preview in the Location block (js/listing-location.js). The whole
   preview is one link; the map inside can't be touched, so it never traps
   the page scroll. */
.location-map {
  position: relative;
  display: block;
  flex: 1 1 100%;
  height: 180px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
}

.location-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

.location-map.is-loaded iframe {
  opacity: 1;
}

.location-map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent);
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
}

.location-map-placeholder svg {
  width: 36px;
  height: 36px;
}

.location-map:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* With a preview, the button sits under it at full width. */
.location-map ~ .location-button {
  flex-basis: 100%;
}

@media (min-width: 641px) {
  .location-map {
    height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .location-map iframe {
    transition: none;
  }
}

/* Campsite placeholder: keep the placeholder card's paragraph style out. */
.coming-soon .location-label,
.coming-soon .location-place {
  margin-bottom: 0;
}

.coming-soon .location-label {
  color: var(--text);
}

/* ---------- Caravans for sale: list rows and detail (js/rentals.js) ---------- */
/* "By Alshaal" with the seal icon, top corner of a sale photo (list card
   and detail gallery). Fixed colours: it sits on a photo in both themes. */
.alshaal-badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 16px);
  padding: 4px 10px 4px 6px;
  padding-inline: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 24, 22, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: var(--weight-medium);
  line-height: 1.2;
  white-space: nowrap;
}

.alshaal-badge svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #d9bb7f; /* champagne gold, readable on the dark pill */
}

.rd-gallery .alshaal-badge {
  top: 12px;
  inset-inline-start: 12px;
  padding-block: 6px;
  font-size: 0.8rem;
}

.rd-gallery .alshaal-badge svg {
  width: 18px;
  height: 18px;
}

/* Sale detail: heart and Share above the title. */
.rental-detail.is-sale .rd-heart {
  order: -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rd-share {
  position: relative;
}

.rd-share-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease-out, color 0.2s ease-out;
}

.rd-share-button svg {
  width: 19px;
  height: 19px;
}

.rd-share-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.rd-share-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Share menu where the browser has no share sheet: WhatsApp, Copy link. */
.rd-share-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-secondary);
  box-shadow: var(--shadow);
}

.rd-share-menu[hidden] {
  display: none;
}

.rd-share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}

.rd-share-option:hover,
.rd-share-option:focus-visible {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  outline: none;
}

.rd-share-option svg {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  color: var(--accent);
}

/* Sale detail: the full description right under the title. */
.rd-sale-description {
  margin-top: 14px;
}

/* Specifications: label | value rows. */
.rd-specs {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.rd-spec {
  display: grid;
  grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 18px;
}

.rd-spec + .rd-spec {
  border-top: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

.rd-spec dt {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.rd-spec dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.rd-spec-amenities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-spec-amenities-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rd-spec-amenities-list svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: var(--accent);
}

/* Similar caravans: a strip of small cards (photo, title, price). */
.similar-strip {
  display: grid;
  grid-auto-columns: minmax(180px, 1fr);
  grid-auto-flow: column;
  gap: 14px;
  margin: 0 -16px;
  padding: 2px 16px 10px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.similar-strip li {
  scroll-snap-align: start;
}

.similar-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  color: var(--text);
  text-decoration: none;
}

.similar-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-secondary));
}

.similar-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease-out, transform 0.4s ease-out;
}

.similar-photo img.is-loaded {
  opacity: 1;
}

.similar-card:hover .similar-photo img {
  transform: scale(1.04);
}

.similar-card:focus-visible {
  outline: none;
}

.similar-card:focus-visible .similar-photo {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.similar-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: var(--weight-medium);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.similar-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 4px;
  margin: auto 0 0;
}

.similar-price strong {
  color: var(--accent);
  font-family: var(--font-en);
  font-size: 1.02rem;
  font-weight: var(--weight-bold);
}

.similar-price.is-empty {
  color: var(--text-muted);
  font-size: 0.82rem;
}

@media (min-width: 720px) {
  .similar-strip {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 2px 0 0;
    overflow: visible;
  }
}

/* Two stacked big buttons (sale: WhatsApp, then Inquire). */
.member-action-bar.is-stacked {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-action-button svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-inline-end: 8px;
}

.member-action-bar.is-stacked .member-action-button {
  min-height: 48px;
}

body.has-action-bar.has-stacked-actions {
  padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
}

body.has-action-bar.has-stacked-actions.has-install-banner {
  padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px) + var(--install-banner-space, 0px));
}

@media (min-width: 900px) {
  body.has-action-bar.has-stacked-actions {
    padding-bottom: 156px;
  }

  body.has-action-bar.has-stacked-actions.has-install-banner {
    padding-bottom: calc(156px + var(--install-banner-space, 0px));
  }
}

/* Contact form: the listing the question is about. */
.contact-listing {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
  color: var(--text);
  text-decoration: none;
}

.contact-listing[hidden] {
  display: none;
}

.contact-listing:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-listing-photo,
.inquiry-listing-photo {
  flex-shrink: 0;
  width: 76px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-secondary));
}

.contact-listing-photo img,
.inquiry-listing-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-listing-text,
.inquiry-listing-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-listing-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.contact-listing-title,
.inquiry-listing-name {
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

/* Admin Inquiries: the listing an inquiry came from. */
.inquiry-listing {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  margin: -8px 0 20px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.inquiry-listing[hidden] {
  display: none;
}

.inquiry-listing-ref {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.inquiry-listing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 2px;
  font-size: 0.85rem;
}

.inquiry-listing-links a {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.inquiry-listing-links a[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .similar-photo img,
  .rd-share-button {
    transition: none;
  }

  .similar-card:hover .similar-photo img {
    transform: none;
  }
}

/* "Ref: C-07" under the title on every listing page. */
.rd-ref {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* ---------- View-only mode (admins browsing the member site) ---------- */
.view-only-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 16px;
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-secondary));
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
}

.view-only-bar svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.member-menu-admin {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  margin: 12px 0 14px;
  padding: 6px 12px 6px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: background-color 0.2s ease-out;
}

.member-menu-admin:hover {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.member-menu-admin:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.view-only-note {
  position: fixed;
  bottom: calc(96px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: var(--weight-medium);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.view-only-note.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .view-only-note {
    transition: none;
  }
}

/* Admin sidebar: "View website as a member", under the profile card. */
.admin-view-site {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.3;
  min-height: 42px;
  margin: -8px 0 20px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: background-color 0.2s ease-out;
}

.admin-view-site:hover {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.admin-view-site:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-view-site svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* Admin Bookings: the listing's Listing ID under the booking number. */
.booking-listing-ref {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: var(--weight-regular, 400);
}

/* Admin inquiry thread: reference and contact details from the Contact page. */
.inquiry-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 20px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-secondary);
}

.inquiry-contact dt {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.inquiry-contact dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

/* ---------- Booking calendar (js/booking-calendar.js) ----------
   A bottom sheet on phones, a centred panel on wider screens. The dialog
   is a dim layer over the page; the panel slides up (or fades in). */
.book-sheet {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgba(10, 13, 11, 0);
  color: var(--text);
  transition: background-color 0.24s ease-out;
}

.book-sheet::backdrop {
  background: transparent;
}

.book-sheet.is-open {
  background: rgba(10, 13, 11, 0.5);
}

:root.book-open {
  overflow: hidden;
}

.book-panel {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  max-height: 94dvh;
  border-radius: 22px 22px 0 0;
  background: var(--bg);
  box-shadow: var(--shadow);
  transform: translateY(102%);
  transition: transform 0.26s ease-out;
}

.book-sheet.is-open .book-panel {
  transform: none;
}

@media (min-width: 720px) {
  .book-panel {
    inset: 50% auto auto 50%;
    width: min(480px, calc(100vw - 48px));
    max-height: min(860px, calc(100dvh - 48px));
    border-radius: var(--radius);
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.98);
    transition: transform 0.22s ease-out, opacity 0.22s ease-out;
  }

  .book-sheet.is-open .book-panel {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  .book-grip {
    display: none;
  }
}

.book-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 20px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.book-grip {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--border) 70%, transparent);
  transform: translateX(-50%);
}

.book-head-text {
  flex: 1;
  min-width: 0;
}

.book-kicker {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

:root[lang="ar"] .book-kicker {
  font-size: 0.9rem;
  letter-spacing: 0;
}

.book-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: var(--weight-bold);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.book-title:focus {
  outline: none;
}

.book-ref {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.book-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -6px -8px 0 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease-out;
}

:root[dir="rtl"] .book-close {
  margin: -6px 0 0 -8px;
}

.book-close:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-secondary));
}

.book-close:focus-visible,
.book-arrow:focus-visible,
.book-day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.book-close svg {
  width: 20px;
  height: 20px;
}

.book-body {
  flex: 1;
  min-height: 0;
  padding: 16px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.book-foot {
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  background: var(--bg);
}

.book-continue {
  min-height: 52px;
  font-size: 1.05rem;
}

/* Month and arrows */
.book-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.book-month {
  margin: 0;
  font-size: 1.1rem;
  font-weight: var(--weight-medium);
  text-align: center;
}

.book-arrow {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease-out, opacity 0.15s ease-out;
}

.book-arrow:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.book-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.book-arrow svg {
  width: 20px;
  height: 20px;
}

:root[dir="rtl"] .book-arrow svg {
  transform: scaleX(-1);
}

.book-hint {
  margin: 10px 0 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Days: Monday first; the grid mirrors in Arabic. */
.book-weekdays,
.book-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.book-weekdays {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  text-align: center;
}

.book-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 52px;
  padding: 4px 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out, transform 0.1s ease-out;
  -webkit-tap-highlight-color: transparent;
}

.book-day:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.book-day:active:not(:disabled) {
  transform: scale(0.94);
}

.book-day-num {
  font-size: 0.95rem;
  font-weight: var(--weight-medium);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.book-day-price {
  color: var(--text-muted);
  font-size: 0.62rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.book-day:disabled {
  background: transparent;
  color: color-mix(in srgb, var(--text-muted) 55%, transparent);
  cursor: default;
}

.book-day:disabled .book-day-num {
  font-weight: var(--weight-regular, 400);
}

.book-day.is-today .book-day-num {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* A date that can only be the check-out (the morning after the last free
   night). */
.book-day.is-out-only {
  border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  background: transparent;
}

/* The chosen stay: gold ends, a soft gold band between. */
.book-day.is-in {
  background: color-mix(in srgb, var(--accent) 22%, var(--bg-secondary));
}

.book-day.is-start,
.book-day.is-end {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.book-day.is-start .book-day-price,
.book-day.is-end .book-day-price,
.book-day.is-start.is-out-only .book-day-price {
  color: color-mix(in srgb, var(--on-accent) 80%, transparent);
}

.book-blank {
  min-height: 52px;
}

.book-message {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.book-legend {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

/* Summary card */
.book-summary {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.book-summary-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.book-summary-rows > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.book-summary-rows dt {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.book-summary-rows dd {
  margin: 0;
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.book-summary-rows .book-total dd {
  font-size: 1.25rem;
  font-weight: var(--weight-bold);
}

.book-breakdown {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
}

.book-breakdown summary {
  min-height: 32px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.book-breakdown ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.book-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.book-breakdown li span:first-child {
  color: var(--text-muted);
}

.book-clear {
  width: auto;
  margin: 10px 0 0;
  padding: 6px 0;
  font-size: 0.9rem;
}

/* The listing page: Continue's placeholder */
.book-next .book-summary {
  margin-top: 0;
}

.book-next .book-summary-rows > div:first-child {
  grid-column: 1 / -1;
}

.book-soon {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius);
}

.book-soon svg {
  flex: none;
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.book-soon p {
  margin: 0;
  font-weight: var(--weight-medium);
}

.book-viewonly {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Log in first / dates not available / couldn't load */
.book-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 4px 12px;
  text-align: center;
}

.book-notice > svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--accent);
}

.book-notice h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.book-notice p {
  max-width: 340px;
  margin: 0;
  color: var(--text-muted);
}

.book-notice-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin-top: 20px;
}

/* Loading */
.book-skel {
  display: block;
  border-radius: 12px;
  background: color-mix(in srgb, var(--border) 40%, transparent);
  animation: ov-pulse 1.4s ease-in-out infinite;
}

.book-skel-month {
  width: 50%;
  height: 24px;
  margin: 10px auto 34px;
}

.book-skel-day {
  min-height: 52px;
}

/* Phones under 360px: tighter cells. */
@media (max-width: 359px) {
  .book-body {
    padding: 14px 12px 18px;
  }

  .book-head,
  .book-foot {
    padding-inline: 14px;
  }

  .book-weekdays,
  .book-grid {
    gap: 3px;
  }

  .book-day {
    min-height: 48px;
    border-radius: 10px;
  }

  .book-day-num {
    font-size: 0.88rem;
  }

  .book-day-price {
    font-size: 0.58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-sheet,
  .book-panel,
  .book-day,
  .book-arrow {
    transition: none;
  }

  .book-skel {
    animation: none;
  }
}

/* ---------- Booking, stage 2: "Your booking" (js/booking-calendar.js) ---------- */
.book-details,
.book-next {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.book-back {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  margin: -6px 0 0 -6px;
  padding: 6px 10px 6px 4px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.95rem;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

:root[dir="rtl"] .book-back {
  margin: -6px -6px 0 0;
  padding: 6px 4px 6px 10px;
}

.book-back:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.book-back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.book-back svg {
  width: 18px;
  height: 18px;
}

:root[dir="rtl"] .book-back svg {
  transform: scaleX(-1);
}

.book-card {
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.book-card-title {
  display: block;
  margin: 0 0 12px;
  font-size: 1.02rem;
  font-weight: var(--weight-medium);
}

.book-card .book-summary-rows .book-wide {
  grid-column: 1 / -1;
}

.book-card-hint {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.book-card-hint a,
.book-alert a {
  color: var(--accent);
  font-weight: var(--weight-medium);
  text-underline-offset: 3px;
}

/* The stay */
.book-trip-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
}

.book-trip-photo {
  flex: none;
  width: 72px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: color-mix(in srgb, var(--border) 35%, transparent);
}

.book-trip-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.book-trip-title {
  font-weight: var(--weight-bold);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.book-trip-ref {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Guest details */
.book-phone {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.book-alert {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Notes */
.book-optional {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: var(--weight-regular);
}

.book-note {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.book-note::placeholder {
  color: var(--text-muted);
}

.book-note:focus-visible {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 1px;
}

.book-counter {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: end;
}

.book-counter.is-full {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

/* Checkout policy: noticeable, not alarming. */
.book-policy {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-secondary));
}

.book-agree {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.book-agree input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* "Terms and Conditions" inside the tick label: opens in a new tab. */
.book-terms-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.book-terms-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.book-agree input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Placeholder after "Your booking" */
.book-note-text {
  font-weight: var(--weight-regular);
  white-space: pre-wrap;
}

@media (max-width: 359px) {
  .book-card {
    padding: 16px 14px;
  }

  .book-trip-photo {
    width: 60px;
    height: 48px;
  }
}

.book-when {
  display: flex;
  flex-direction: column;
}

.book-time {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Booking, stages 3 and 4: Price and payment (js/booking-payment.js) ---------- */
.book-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Promo code */
.book-promo-row {
  display: flex;
  gap: 10px;
}

.book-promo-input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.book-promo-input::placeholder {
  color: var(--text-muted);
  letter-spacing: 0;
  text-transform: none;
}

.book-promo-input:focus-visible {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: 1px;
}

:root[dir="rtl"] .book-promo-input {
  text-align: right;
}

.book-promo-apply {
  width: auto;
  flex: none;
  min-height: 48px;
  padding: 10px 18px;
}

.book-promo-applied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.book-promo-icon {
  display: flex;
  color: var(--accent);
}

.book-promo-icon svg {
  width: 18px;
  height: 18px;
}

.book-promo-code {
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
}

.book-promo-off {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.book-promo-remove {
  width: auto;
  margin-inline-start: auto;
  padding: 4px 0;
  font-size: 0.9rem;
}

.book-promo-msg {
  margin: 10px 0 0;
  color: var(--status-red);
  font-size: 0.88rem;
}

.book-promo-msg.is-ok {
  color: var(--text-muted);
}

/* Price breakdown */
.book-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.book-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.book-line dt {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.book-line dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.book-line.is-discount dd {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.book-line.is-total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}

.book-line.is-total dt {
  color: var(--text);
  font-weight: var(--weight-medium);
}

.book-line.is-total dd {
  font-weight: var(--weight-bold);
}

.book-split {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
}

.book-pay-now,
.book-balance {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.book-pay-now span {
  font-weight: var(--weight-medium);
}

.book-pay-now strong {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.book-balance {
  margin-top: 8px;
  color: var(--text-muted);
}

.book-balance strong {
  color: var(--text);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.book-split .book-card-hint {
  margin-top: 10px;
}

.book-price-skel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.book-skel-line {
  height: 14px;
}

.book-skel-line:nth-child(2n) {
  width: 70%;
}

/* Cancellation policy (js/booking-payment.js, noteCard) */
.book-cancel-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-inline-start: 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.book-cancel-list li::marker {
  color: var(--accent);
}

.book-cancel-final {
  margin: 0;
  padding: 12px 14px;
  border-inline-start: 3px solid var(--accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: var(--weight-bold);
  line-height: 1.5;
}

.book-cancel-terms {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: var(--weight-medium);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* ID or passport */
.book-id-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.book-id-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-muted);
}

.book-id-status.is-done {
  color: var(--text);
  font-weight: var(--weight-medium);
}

.book-id-status svg {
  width: 22px;
  height: 22px;
  color: #3f9b6a;
}

.book-id-button {
  width: auto;
  min-height: 44px;
  padding: 10px 16px;
}

.book-id-msg {
  margin: 10px 0 0;
  font-size: 0.88rem;
}

/* Card form */
.book-consent {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 0.9rem;
  line-height: 1.5;
}

.book-card-mount {
  min-height: 120px;
}

.book-skel-card {
  height: 120px;
}

.book-pay-msg {
  margin: 12px 0 0;
  color: var(--status-red);
  font-size: 0.9rem;
}

/* Footer: Pay */
.book-pay-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.book-pay-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.book-pay-button svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.book-pay-button.is-busy {
  cursor: progress;
}

.book-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.book-trust svg {
  width: 14px;
  height: 14px;
}

.book-issue p {
  margin: 0 0 14px;
  line-height: 1.5;
}

.book-issue .btn {
  width: auto;
}

/* After paying */
.book-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.book-result-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px 4px;
  text-align: center;
}

.book-result-head > svg {
  width: 56px;
  height: 56px;
  color: var(--accent);
}

.book-result-head.is-paid > svg {
  color: #3f9b6a;
}

.book-result-head.is-failed > svg {
  color: var(--status-red);
}

.book-result-head h3 {
  margin: 0;
  font-size: 1.25rem;
}

.book-result-head p {
  max-width: 360px;
  margin: 0;
  color: var(--text-muted);
}

.book-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: book-spin 0.9s linear infinite;
}

@keyframes book-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 359px) {
  .book-promo-apply {
    padding: 10px 14px;
  }

  .book-pay-now strong {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-spinner {
    animation-duration: 3s;
  }
}

/* Arabic: full weekday names over the calendar, a little smaller. */
:root[lang="ar"] .book-weekdays {
  font-size: 0.66rem;
  white-space: nowrap;
}

@media (max-width: 359px) {
  :root[lang="ar"] .book-weekdays {
    font-size: 0.58rem;
    letter-spacing: -0.02em;
  }
}

/* ---------- Booking, stage 5: confirmation (js/booking-payment.js) ---------- */
.book-result-head.is-booked > svg {
  color: #3f9b6a;
}

.book-result-head.is-taken > svg {
  color: var(--accent);
}

.book-number {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 8px;
  margin: 4px 0 0 !important;
  padding: 8px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  color: var(--text) !important;
}

.book-number span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.book-number bdi {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
}

.book-sent {
  margin: 0;
  text-align: center;
}

/* ---------- Inbox: messages from Alshaal (js/inbox-messages.js) ---------- */
.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.message-item {
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.message-item.is-unread {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.message-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  min-height: 52px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.message-head::-webkit-details-marker {
  display: none;
}

.message-head:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: var(--radius);
}

.message-title {
  font-weight: var(--weight-medium);
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.message-body {
  padding: 0 16px 16px;
}

.message-body > p {
  margin: 0 0 12px;
}

.message-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0 0 12px;
}

.message-details > div:first-child {
  grid-column: 1 / -1;
}

.message-details dt {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.message-details dd {
  margin: 0;
  font-weight: var(--weight-medium);
}

.message-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.message-link {
  width: auto;
  display: inline-block;
}

/* An announcement from the team (supabase/053): picture, message, video. */
.message-announcement .message-title bdi {
  overflow-wrap: anywhere;
}

.message-picture,
.message-video img {
  display: block;
  width: 100%;
  max-height: 420px;
  margin: 0 0 14px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg);
}

.message-body > .message-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.message-video {
  display: block;
  margin: 0 0 14px;
  color: var(--accent);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.message-video img {
  margin-bottom: 8px;
}

.message-video-label::before {
  content: "\25B6";
  margin-inline-end: 8px;
  font-size: 0.8em;
}

.message-video:hover .message-video-label,
.message-video:focus-visible .message-video-label {
  text-decoration: underline;
}

/* ---------- Admin: notifications bell (js/admin-notifications.js) ---------- */
.admin-bell {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-inline-start: auto;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.admin-bell:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.admin-bell:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-bell svg {
  width: 20px;
  height: 20px;
}

.admin-bell-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.72rem;
  font-weight: var(--weight-bold);
  line-height: 18px;
  text-align: center;
}

.admin-bell.is-urgent .admin-bell-count {
  background: var(--status-red);
  color: #fff;
}

/* The sidebar bell sits next to the title; the top bar one at the far end. */
.admin-sidebar-header .admin-bell {
  margin-inline-start: auto;
}

.admin-topbar .admin-bell {
  margin-left: auto;
}

@media (max-width: 860px) {
  .admin-sidebar-header .admin-bell {
    display: none;
  }
}

.notif-panel {
  position: fixed;
  top: 16px;
  left: 260px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(400px, calc(100vw - 280px));
  max-height: calc(100dvh - 32px);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .notif-panel {
    top: 64px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100dvh - 80px);
  }
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}

.notif-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.notif-head h2:focus {
  outline: none;
}

.notif-state {
  margin: 0;
  padding: 18px;
  color: var(--text-muted);
}

.notif-list {
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
}

.notif-item {
  position: relative;
  border-radius: 10px;
}

.notif-item + .notif-item {
  margin-top: 2px;
}

.notif-item.is-unread {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.notif-item.is-urgent {
  border: 1px solid color-mix(in srgb, var(--status-red) 55%, transparent);
  background: color-mix(in srgb, var(--status-red) 8%, transparent);
}

.notif-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

a.notif-main:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

a.notif-main:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.notif-title {
  font-weight: var(--weight-medium);
}

.notif-urgent {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--status-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
}

.notif-line {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notif-ref {
  color: var(--accent);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.notif-time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.notif-done {
  margin: 0 14px 10px;
  font-size: 0.85rem;
}

/* ---------- Admin: Bookings table and one booking (js/admin-bookings.js) ---------- */
.bookings-table .member-row {
  cursor: pointer;
}

.booking-link {
  color: inherit;
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.booking-link:hover,
.booking-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.booking-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 20px;
}

.booking-type {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .booking-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.booking-card {
  min-width: 0;
  margin: 0;
}

.booking-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.booking-facts > div {
  min-width: 0;
}

.booking-facts .is-wide {
  grid-column: 1 / -1;
}

.booking-facts dt {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.booking-facts dd {
  margin: 2px 0 0;
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

:root[dir="rtl"] .booking-facts dd[dir="ltr"] {
  text-align: right;
}

.booking-note {
  font-weight: var(--weight-regular);
  white-space: pre-wrap;
}

.booking-payments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.booking-card .book-lines {
  margin-top: 4px;
}

.booking-detail > .profile-section,
.booking-detail .booking-grid + .profile-section {
  margin-top: 16px;
}

.booking-refund-note {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-size: 0.9rem;
}

/* Refunds (supabase/052): a record only, money moves in Stripe. */
.booking-refunds .book-lines {
  margin: 4px 0 16px;
}

.booking-refund-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.booking-refund-list li.is-editing {
  border-color: var(--accent);
}

.booking-refund-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.booking-refund-text {
  flex-basis: 100%;
  font-size: 0.9rem;
}

.booking-refund-list .booking-refund-tools {
  margin-inline-start: auto;
}

.booking-refund-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.booking-refund-none {
  margin: 0 0 8px;
}

.booking-refund-form {
  margin-top: 8px;
}

.booking-refund-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.booking-refund-fields input,
.booking-refund-form input {
  width: 100%;
}

@media (max-width: 480px) {
  .booking-refund-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.booking-refund-history {
  margin-top: 16px;
}

.booking-refund-history summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.booking-refund-history ul {
  margin-top: 10px;
}

.booking-admin-note {
  margin-top: 20px;
}

.booking-admin-note textarea {
  width: 100%;
}

.booking-admin-note .btn,
.booking-detail .profile-section > .btn {
  width: auto;
}

.booking-cancel {
  margin-top: 20px;
}

.booking-msg.is-error {
  color: var(--status-red);
}

@media (max-width: 480px) {
  .booking-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

.booking-card a:not(.btn) {
  color: var(--accent);
  text-underline-offset: 3px;
}

.booking-detail .btn {
  width: fit-content;
  max-width: 100%;
}

/* ---------- My Bookings (bookings.html, js/member-bookings.js) ---------- */
.mybook-main {
  max-width: 960px;
}

.mybook-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 24px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 12px;
  background: var(--bg);
}

.mybook-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: var(--weight-medium);
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}

.mybook-tab:hover {
  color: var(--text);
}

.mybook-tab[aria-selected="true"] {
  background: var(--bg-secondary);
  color: var(--text);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--shadow-color) 50%, transparent);
}

.mybook-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mybook-tab-count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: 0.75rem;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
  .mybook-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mybook-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mybook-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.mybook-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: var(--shadow);
}

.mybook-card.has-alert {
  border-color: color-mix(in srgb, var(--status-red) 50%, transparent);
}

.mybook-card.is-skeleton {
  min-height: 180px;
  animation: ov-pulse 1.4s ease-in-out infinite;
}

.mybook-card-photo,
.mybook-hero-photo {
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--border) 30%, var(--bg));
}

.mybook-card-photo img,
.mybook-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-out;
}

.mybook-card:hover .mybook-card-photo img {
  transform: scale(1.04);
}

.mybook-card-photo.is-empty,
.mybook-hero-photo.is-empty {
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.mybook-card-photo.is-empty svg,
.mybook-hero-photo.is-empty svg {
  width: 40px;
  height: 40px;
}

.mybook-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 20px 22px;
}

.mybook-card-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.mybook-card-ref {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.mybook-card-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
  font-weight: var(--weight-medium);
}

.mybook-arrow {
  color: var(--accent);
}

:root[dir="rtl"] .mybook-arrow {
  display: inline-block;
  transform: scaleX(-1);
}

.mybook-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.mybook-number {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.mybook-number bdi {
  color: var(--text);
  font-weight: var(--weight-bold);
  letter-spacing: 0.03em;
}

.mybook-flag {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--status-red) 12%, transparent);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: var(--weight-medium);
  line-height: 1.4;
}

.mybook-flag svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--status-red);
}

.mybook-view {
  align-self: flex-start;
  width: auto;
  margin-top: auto;
}

@media (max-width: 640px) {
  .mybook-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .mybook-card-photo {
    aspect-ratio: 16 / 9;
  }

  .mybook-card-body {
    padding: 18px;
  }

  .mybook-view {
    align-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mybook-card,
  .mybook-card-photo img,
  .mybook-tab {
    transition: none;
  }

  .mybook-card:hover .mybook-card-photo img {
    transform: none;
  }
}

/* One booking */
#mybook-detail-view .back-link {
  margin-bottom: 16px;
}

.mybook-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin: 0 0 24px;
}

.mybook-hero-photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}

.mybook-hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.mybook-detail-title {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.mybook-detail-title:focus {
  outline: none;
}

.mybook-hero-text .mybook-card-ref {
  margin: 0;
}

.mybook-detail-number {
  margin: 4px 0 0 !important;
}

.mybook-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 720px) {
  .mybook-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .mybook-hero-photo {
    aspect-ratio: 16 / 9;
  }

  .mybook-detail-title {
    font-size: 1.5rem;
  }
}

.mybook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.mybook-price {
  grid-column: 2;
  grid-row: 1 / span 2;
}

@media (max-width: 720px) {
  .mybook-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mybook-price {
    grid-column: auto;
    grid-row: auto;
  }
}

.mybook-section {
  min-width: 0;
  padding: 20px;
}

.mybook-when {
  display: flex;
  flex-direction: column;
}

.mybook-time {
  color: var(--text-muted);
  font-weight: var(--weight-regular);
  font-size: 0.9rem;
}

.mybook-section .booking-facts dd bdi[dir="ltr"] {
  display: inline-block;
}

/* Failed balance, new card, thank-you */
.mybook-notice {
  margin: 0 0 20px;
  padding: 20px;
  border-radius: var(--radius);
}

.mybook-notice.is-alert {
  border: 1px solid color-mix(in srgb, var(--status-red) 50%, transparent);
  background: color-mix(in srgb, var(--status-red) 8%, var(--bg-secondary));
}

.mybook-notice.is-done {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--status-green) 50%, transparent);
  background: color-mix(in srgb, var(--status-green) 10%, var(--bg-secondary));
}

/* Pay remaining balance (supabase/051): calm, not an alert. */
.mybook-notice.is-balance {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.mybook-notice.is-balance .mybook-notice-head svg {
  color: var(--accent);
}

.mybook-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
}

.mybook-notice .book-pay-msg:not([hidden]) {
  margin-top: 12px;
}

.mybook-early-close {
  width: 100%;
  margin-top: 6px;
}

.mybook-notice-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mybook-notice svg {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
}

.mybook-notice.is-alert .mybook-notice-head svg {
  color: var(--status-red);
}

.mybook-notice.is-done > svg {
  color: var(--status-green);
}

.mybook-notice h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.mybook-notice p {
  margin: 0;
  line-height: 1.5;
}

.mybook-notice .book-consent {
  margin: 18px 0 14px;
}

.mybook-notice .book-card-mount {
  padding: 4px 0;
}

.mybook-pay {
  width: 100%;
  margin: 16px 0 10px;
}

.mybook-inline-btn {
  display: inline-flex;
  width: auto;
  margin-top: 16px;
}

.mybook-cancel {
  margin-top: 16px;
}

.mybook-cancel-text {
  margin: 0;
}

.mybook-cancelled-on {
  margin: 16px 0 0;
}

.mybook-detail-skel {
  min-height: 320px;
}

/* ---------- Admin: the balance (js/admin-bookings.js) ---------- */
.status-badge.balance-scheduled {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.status-badge.balance-charged {
  border: 1px solid color-mix(in srgb, var(--status-green) 60%, transparent);
}

.status-badge.balance-failed {
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--status-red) 16%, transparent);
}

.status-badge.balance-not_needed {
  border: 1px dashed var(--border);
  color: var(--text-muted);
}

.booking-sub {
  margin: 4px 0 8px;
  font-size: 0.95rem;
}

.booking-attempt.is-succeeded {
  color: var(--status-green);
  font-weight: var(--weight-medium);
}

.booking-attempt.is-failed {
  color: var(--status-red);
  font-weight: var(--weight-medium);
}

.booking-attempt-ref {
  color: var(--text-muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.booking-attempt-error {
  font-size: 0.85rem;
}

.booking-new-card {
  margin: 0 0 20px;
}

.booking-new-card .btn {
  width: auto;
}

.booking-alert {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--status-red) 10%, transparent);
  font-size: 0.9rem;
}

/* ---------- Privacy Policy (privacy.html, js/privacy.js) ---------- */
.privacy-main {
  max-width: 760px;
}

.privacy-article h1 {
  margin: 0 0 6px;
}

.privacy-updated {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.privacy-body {
  line-height: 1.7;
}

.privacy-text {
  margin: 0 0 14px;
}

.privacy-heading {
  margin: 36px 0 12px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  font-size: 1.15rem;
  font-weight: var(--weight-bold);
  line-height: 1.4;
  scroll-margin-top: 80px;
}

.privacy-list {
  margin: 0 0 16px;
  padding-inline-start: 22px;
}

.privacy-list li {
  margin-bottom: 8px;
  padding-inline-start: 4px;
}

.privacy-list li::marker {
  color: var(--accent);
}

.privacy-email {
  color: var(--accent);
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

/* The two tables (providers, retention): fit a phone width, text wraps. */
.privacy-table-wrap {
  margin: 4px 0 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.privacy-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.92rem;
  line-height: 1.55;
}

.privacy-table th,
.privacy-table td {
  padding: 11px 14px;
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.privacy-table thead th {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
  font-weight: var(--weight-bold);
}

.privacy-table thead th:first-child {
  width: 36%;
}

.privacy-table tbody th {
  font-weight: var(--weight-medium);
}

.privacy-table tbody tr {
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.privacy-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--bg-secondary) 55%, transparent);
}

@media (max-width: 420px) {
  .privacy-table th,
  .privacy-table td {
    padding: 9px 10px;
  }

  .privacy-table {
    font-size: 0.86rem;
  }
}

/* Privacy Policy link in the sign-in screens' footer. */
.footer-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-link:hover {
  color: var(--accent);
}

.auth-footer {
  text-align: center;
}

/* ---------- Page banners on the browse pages (caravans.html, campsites.html,
   caravans-for-sale.html, js/banner.js) ---------- */
/* At the top, above the listings. Shorter than the Home banner so the
   listings stay close on a phone. Hidden (no space at all) when empty. */
.page-banner {
  margin: 0 0 24px;
}

.page-banner .banner-slides {
  height: clamp(220px, 36vw, 380px);
}

@media (max-width: 560px) {
  .page-banner .banner-slides {
    height: clamp(180px, 56vw, 300px);
  }
}

/* ---------- Add-ons (js/booking-addons.js, js/member-addons.js, supabase/041) ---------- */
.addon-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.addon-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
}

.addon-item.is-picked {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--bg));
}

.addon-item.is-out {
  opacity: 0.7;
}

.addon-head {
  display: flex;
  flex: 1 1 200px;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.addon-photo {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
  color: var(--accent);
}

.addon-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.addon-photo svg {
  width: 26px;
  height: 26px;
}

.addon-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.addon-name,
.addon-price {
  margin: 0;
}

.addon-name {
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.addon-price {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.addon-out {
  width: fit-content;
  margin-top: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-red) 14%, transparent);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: var(--weight-medium);
}

/* Sold: − 2 + */
.addon-stepper {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.addon-step {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.addon-step:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.addon-step:disabled {
  opacity: 0.35;
  cursor: default;
}

.addon-step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.addon-step svg {
  width: 18px;
  height: 18px;
}

.addon-qty {
  min-width: 2ch;
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Rented: one chip per day of the stay. */
.addon-days {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px;
}

.addon-day {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
}

.addon-day[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: var(--weight-medium);
}

.addon-day:disabled {
  cursor: default;
  opacity: 0.6;
}

.addon-day.is-out .addon-day-date {
  text-decoration: line-through;
}

.addon-day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.addon-day-note {
  font-size: 0.72rem;
  font-weight: var(--weight-medium);
}

.book-addons-total {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
}

.book-addons-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 10px;
}

.book-skip {
  min-height: 52px;
}

/* Add-on price lines: the name, with the days under it. */
.addon-line-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.addon-line-days {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.book-line.is-addon dt {
  overflow-wrap: anywhere;
}

.book-line.is-unavailable dt,
.book-line.is-unavailable dd {
  color: var(--status-red);
}

.book-line.is-unavailable dd {
  text-decoration: line-through;
}

/* My Bookings: add-ons bought later. */
.mybook-addons {
  margin-top: 16px;
}

.mybook-addon-purchase + .mybook-addon-purchase {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.mybook-addon-when {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.mybook-add-addons {
  margin-top: 14px;
}

.book-notice.is-done > svg {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--status-green) 18%, transparent);
  color: var(--status-green);
}

/* Admin: the add-ons list and editor. */
.addons-tabs {
  width: min(100%, 320px);
  margin: 16px 0 4px;
}

.addons-admin-list .album-admin-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.addons-admin-thumb {
  display: grid;
  place-items: center;
  width: 64px;
  color: var(--accent);
}

.addons-admin-thumb svg {
  width: 26px;
  height: 26px;
}

.status-badge.addon-out-badge {
  background: color-mix(in srgb, var(--status-red) 16%, transparent);
}

.addon-photo-field {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.addon-photo-preview {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  color: var(--accent);
}

.addon-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.addon-photo-preview svg {
  width: 34px;
  height: 34px;
}

.addon-photo-field .field-label {
  margin: 0 0 6px;
  font-weight: var(--weight-medium);
}

.addon-names,
.addon-numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.addon-dialog .choice-field {
  max-width: none;
  margin-bottom: 14px;
}

.addon-dialog .choice-field input:disabled + span {
  opacity: 0.6;
}

.addon-dialog-more {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-inline-start: auto;
}

@media (max-width: 480px) {
  .addon-names,
  .addon-numbers {
    grid-template-columns: minmax(0, 1fr);
  }

  .addon-day {
    min-width: calc(50% - 4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .addon-item,
  .addon-day {
    transition: none;
  }
}

/* ---------- Cookie banner (js/cookie-consent.js) ---------- */
/* A slim card at the bottom, above the member bar or the booking buttons.
   A spacer at the end of the page keeps it from covering anything. */
.cookie-banner {
  position: fixed;
  inset-inline: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 46;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "text   accept"
    "links  accept";
  align-items: center;
  gap: 4px 16px;
  max-width: 620px;
  margin-inline: auto;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  box-shadow: var(--shadow);
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.cookie-banner.is-shown {
  opacity: 1;
  transform: none;
}

.cookie-text {
  grid-area: text;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.cookie-accept {
  grid-area: accept;
  min-width: 150px;
  min-height: 48px;
  font-size: 1rem;
}

/* "Essentials only" and "Privacy Policy": small, plain, always readable. */
.cookie-links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin: 0;
}

.cookie-link {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: var(--weight-regular);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cookie-link:hover {
  color: var(--accent);
}

.cookie-link:focus-visible,
.cookie-preferences:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Member pages: above the bottom bar. Listing pages: above the big buttons. */
body.has-member-nav .cookie-banner {
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

body.has-action-bar .cookie-banner {
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
}

body.has-action-bar.has-stacked-actions .cookie-banner {
  bottom: calc(136px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 900px) {
  body.has-member-nav .cookie-banner,
  body.has-action-bar .cookie-banner {
    bottom: 96px;
  }

  body.has-action-bar.has-stacked-actions .cookie-banner {
    bottom: 148px;
  }
}

/* Phones: the button under the text, full width; the links under it. */
@media (max-width: 560px) {
  .cookie-banner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "text"
      "accept"
      "links";
    gap: 10px;
    padding: 14px;
  }

  .cookie-accept {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .cookie-banner {
    inset-inline: 8px;
  }
}

/* "Cookie preferences" in the footer: a link, on a button. */
.cookie-preferences {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.cookie-footer {
  margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
  }
}

/* Bold lead-ins in the Privacy Policy ("**What cookies are.**"). */
.privacy-strong {
  font-weight: var(--weight-bold);
}

/* ---------- Terms and Conditions (terms.html, js/terms.js) ----------
   Laid out like the Privacy Policy (.privacy-* above, js/legal-text.js). */
.terms-skeleton {
  height: 14px;
  margin: 0 0 14px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--border) 30%, var(--bg));
  animation: ov-pulse 1.4s ease-in-out infinite;
}

.terms-skeleton:nth-child(3n) {
  width: 70%;
}

.terms-problem {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.terms-problem .listings-error {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .terms-skeleton {
    animation: none;
  }
}

/* ---------- Admin: Legal Pages (admin.html#legal, js/admin-legal.js) ---------- */
.legal-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 18px;
}

.legal-card-head h2 {
  margin: 0;
}

.legal-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.legal-view svg {
  width: 16px;
  height: 16px;
}

.legal-date-field input {
  max-width: 220px;
}

.legal-textarea {
  min-height: 280px;
  resize: vertical;
  line-height: 1.6;
}

.legal-help {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-help summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.legal-help ul {
  margin: 10px 0 0;
  padding-inline-start: 20px;
  line-height: 1.6;
}

/* ---------- My Bookings: For emergencies (js/member-bookings.js) ----------
   Calm, not alarming: the brand gold, not red. */
.emergency-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}

.emergency-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.emergency-icon svg {
  width: 20px;
  height: 20px;
}

.emergency-body {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-width: 0;
}

.emergency-title {
  margin: 0;
  font-size: 1rem;
  font-weight: var(--weight-bold);
}

.emergency-text {
  margin: 0;
  line-height: 1.6;
}

.emergency-number {
  color: var(--accent);
  font-weight: var(--weight-bold);
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.emergency-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.emergency-whatsapp svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 400px) {
  .emergency-card {
    gap: 12px;
    padding: 14px;
  }

  .emergency-icon {
    width: 34px;
    height: 34px;
  }
}

.legal-card .field {
  margin-bottom: 20px;
}

/* Each box in its own language's font, whatever the panel language. */
.legal-textarea[lang="en"] {
  font-family: var(--font-en);
}

.legal-textarea[lang="ar"] {
  font-family: var(--font-ar);
}

/* ---------- Pay in full (supabase/043) ---------- */
/* "How would you like to pay?" on the price screen (js/booking-payment.js). */
.book-options {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

.book-options legend {
  float: left;
  width: 100%;
  margin-bottom: 4px;
  padding: 0;
}

.book-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
}

.book-option.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.book-option input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.book-option-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.book-option-title {
  font-weight: var(--weight-bold);
  line-height: 1.4;
}

.book-option-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.book-option-warn {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: var(--weight-medium);
  line-height: 1.5;
}

/* "Pay in full and save 5%" under the dates summary (js/booking-calendar.js). */
.book-offer-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: var(--weight-bold);
}

.book-offer-note svg {
  flex: none;
  width: 16px;
  height: 16px;
}

/* My Bookings: the Terms link in "can't be cancelled". */
.mybook-terms-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Admin: "Paid in full" tag in the Bookings table and booking details. */
.booking-full-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-green) 16%, transparent);
  color: var(--status-green);
  font-size: 0.72rem;
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.booking-number .booking-full-tag {
  display: table;
}

.booking-status .booking-full-tag {
  margin-top: 0;
  padding: 4px 10px;
  font-size: 0.8rem;
}

/* Admin: Pay in Full Offer (admin.html#offer, js/admin-offer.js). */
.offer-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font-weight: var(--weight-medium);
}

.offer-status-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
}

.offer-status.is-on {
  border-color: color-mix(in srgb, var(--status-green) 50%, transparent);
}

.offer-status.is-on .offer-status-dot {
  background: var(--status-green);
}

.offer-mode {
  margin-top: 20px;
}

.offer-mode .field-hint {
  margin: 8px 0 0;
}

.offer-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 16px;
  margin-top: 16px;
}

.offer-fixed {
  margin: 18px 0 0;
}

@media (max-width: 520px) {
  .offer-times {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Admin listing calendar: booked dates (supabase/045) ----------
   A distinct colour, "Booked" and the booking number. They can't be
   selected, so their price and minimum can't change. */
.cal-day.is-booked {
  border-color: color-mix(in srgb, var(--status-green) 55%, transparent);
  background: color-mix(in srgb, var(--status-green) 14%, var(--bg));
  cursor: not-allowed;
}

.cal-day.is-booked:hover:not(:disabled) {
  background: color-mix(in srgb, var(--status-green) 20%, var(--bg));
}

.cal-booked {
  display: grid;
  max-width: 100%;
  margin-top: auto;
  padding-top: 3px;
  color: var(--status-green);
  font-size: 0.62rem;
  font-weight: var(--weight-bold);
  line-height: 1.25;
}

.cal-booked > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-booked-word {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cal-day.is-booked .cal-chips {
  margin-top: 0;
}

.legend-booked {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  border: 1px solid color-mix(in srgb, var(--status-green) 55%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--status-green) 14%, var(--bg));
}

/* Phones: room for the whole booking number in a narrow day. */
@media (max-width: 480px) {
  .cal-day.is-booked {
    padding-inline: 3px;
  }

  .cal-booked {
    font-size: 0.54rem;
    letter-spacing: -0.01em;
  }
}

/* Very small phones: the cell keeps its colour; the numbers are in the
   "Booked dates" list under the calendar. */
@media (max-width: 400px) {
  .cal-booked {
    display: none;
  }
}

.booked-list {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--status-green) 40%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--status-green) 8%, var(--bg));
}

.booked-list-title {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: var(--weight-bold);
}

.booked-list ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}

.booked-list-number {
  color: var(--status-green);
  white-space: nowrap;
  font-weight: var(--weight-bold);
}

/* ---------- Admin listing calendar: reserved dates (supabase/055) ----------
   Reserved by the admin: a dashed gold outline with faint stripes, so it's
   never mistaken for a booking (green). Still selectable, to unreserve. */
.cal-day.is-reserved {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent) 0 4px, transparent 4px 9px),
    var(--bg);
}

.cal-day.is-reserved[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent);
}

.cal-day.is-reserved[aria-pressed="true"] .cal-reserved {
  color: var(--on-accent);
}

.cal-reserved {
  display: block;
  max-width: 100%;
  margin-top: auto;
  padding-top: 3px;
  overflow: hidden;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: var(--weight-bold);
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.cal-day.is-reserved .cal-chips {
  margin-top: 0;
}

.legend-reserved {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  border: 1px dashed color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: 4px;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent) 0 3px, transparent 3px 6px);
}

.selection-action > .selection-action-title {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
}

.selection-action > .field-hint {
  margin: 6px 0 0;
}

@media (max-width: 480px) {
  .cal-day.is-reserved {
    padding-inline: 3px;
  }

  .cal-reserved {
    font-size: 0.54rem;
    letter-spacing: -0.01em;
  }
}

/* Very small phones: the stripes and dashed outline still show it. */
@media (max-width: 400px) {
  .cal-reserved {
    display: none;
  }
}

/* ---------- About Us (about.html, js/about.js; supabase/046) ---------- */
.about-main {
  max-width: 820px;
}

.about-article h1 {
  margin: 0 0 18px;
}

.about-text {
  font-size: 1.02rem;
  line-height: 1.8;
}

.about-paragraph {
  margin: 0 0 14px;
}

/* Photos: one large, two side by side, three or more as a grid. */
.about-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 8px;
}

.about-photos.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.about-photos.is-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-photo {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  aspect-ratio: 4 / 3;
}

.about-photos.is-single .about-photo {
  aspect-ratio: 16 / 9;
}

.about-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 560px) {
  .about-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .about-photos.is-single .about-photo {
    aspect-ratio: 4 / 3;
  }

  /* An odd photo out at the end fills the row. */
  .about-photos:not(.is-single) .about-photo:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
  }
}

.about-blocks {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.about-block {
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
}

.about-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: var(--weight-bold);
}

.about-block-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.about-block-icon svg {
  width: 18px;
  height: 18px;
}

.about-hours-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.about-hours-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
}

.about-hours-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.about-hours-row dt {
  font-weight: var(--weight-medium);
}

.about-hours-row dd {
  margin: 0;
  color: var(--text-muted);
}

.about-address {
  margin: 0 0 12px;
  line-height: 1.6;
}

.about-maps,
.about-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.about-maps svg,
.about-whatsapp svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.about-whatsapp bdi {
  font-weight: var(--weight-bold);
}

.about-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.about-social {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
}

.about-social:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.about-social:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.about-social svg {
  width: 20px;
  height: 20px;
}

.about-problem {
  display: grid;
  justify-items: start;
  gap: 12px;
}

/* ---------- Admin: About Us editor (admin.html#about, js/admin-about.js) ---------- */
.about-admin-sections .field {
  margin-bottom: 16px;
}

.about-textarea {
  min-height: 180px;
}

.about-admin-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}

.about-admin-photo {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.about-admin-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-admin-photo-number {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-start: 6px;
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.78rem;
  font-weight: var(--weight-bold);
  text-align: center;
}

.about-admin-photo-tools {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 8px;
}

.about-photo-tool {
  width: 36px;
  height: 36px;
}

.about-photo-tool svg {
  width: 18px;
  height: 18px;
}

.about-photo-tool:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Arrows point the way the photos move (left/right flip in Arabic). */
:root[dir="rtl"] .about-photo-tool:not(:last-child) svg {
  transform: scaleX(-1);
}

.about-admin-hours {
  display: grid;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 0;
  list-style: none;
}

.about-hours-edit {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.about-hours-edit .field {
  margin: 0;
}

.about-hours-remove {
  margin-bottom: 10px;
  color: var(--error);
}

@media (max-width: 720px) {
  .about-hours-edit {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-hours-remove {
    justify-self: start;
    margin-bottom: 0;
  }
}

.about-admin-sub {
  margin: 22px 0 6px;
  font-size: 1rem;
}

.about-admin-socials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .about-admin-socials {
    grid-template-columns: minmax(0, 1fr);
  }
}

.about-social-field label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.about-social-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.about-admin-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex-wrap: wrap;
  padding: 14px 0;
  background: var(--bg);
}

/* ---------- Admin: member booking history (js/admin-members.js) ---------- */
.member-bookings-state {
  margin: 0;
}

.member-bookings-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

.member-booking:hover {
  border-color: var(--accent);
}

.member-booking:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.member-booking-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.member-booking-number {
  font-weight: var(--weight-bold);
}

.member-booking-type,
.member-booking-dates {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.member-booking-title {
  grid-column: 1;
  font-weight: var(--weight-medium);
}

.member-booking-dates {
  grid-column: 1;
}

.member-booking-total {
  grid-column: 2;
  grid-row: 1;
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.member-booking-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
  margin-top: 4px;
}

.about-admin-actions .btn {
  width: auto;
  min-width: 140px;
}

/* ---------- Search-friendly text: home story, FAQs, About lead ---------- */
/* Home: who we are beside the common questions; stacked on phones. */
.home-faq {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
  margin-top: 72px;
}

.home-story {
  padding-inline-start: 22px;
  border-inline-start: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.home-story h2 {
  margin: 0 0 12px;
  font-size: 1.6rem;
  line-height: 1.25;
  text-wrap: balance;
}

.home-story p:not(.home-eyebrow) {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

/* FAQ: tap a question to open its answer. */
.faq h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.rentals-main > .faq {
  margin-top: 56px;
}

.faq-list {
  border-top: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
}

.faq-item {
  border-bottom: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  font-weight: var(--weight-medium);
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s ease-out;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-item summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--accent);
  transition: transform 0.2s ease-out;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-item p {
  max-width: 42em;
  margin: 0 0 18px;
  padding-inline-end: 36px;
  color: var(--text-muted);
  line-height: 1.65;
}

.faq-item[open] p {
  animation: faq-in 0.2s ease-out both;
}

@keyframes faq-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* About: one fixed line under the heading, above the admin's text. */
.about-lead {
  max-width: 40em;
  margin: -6px 0 22px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .home-faq {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    margin-top: 56px;
  }

  .home-story h2 {
    font-size: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary,
  .faq-icon {
    transition: none;
  }

  .faq-item[open] p {
    animation: none;
  }
}

/* ---------- Pop-ups (js/announcement-popup.js, supabase/053) ----------
   Shown on the browsing pages, one after another. The picture or video
   sits at the top, the X over it (top right, top left in Arabic). */
html.popup-open {
  overflow: hidden;
}

.popup {
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--text);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

/* Fades in by itself (no script timing needed), fades out on close. */
.popup[open] {
  animation: popup-in 0.22s ease-out;
}

.popup.is-closing {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

@keyframes popup-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.popup[lang="en"] {
  --font-body: var(--font-en);
}

.popup[lang="ar"] {
  --font-body: var(--font-ar);
}

.popup::backdrop {
  background: rgba(10, 12, 11, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.popup-card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: var(--radius);
  background: var(--bg-secondary);
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  text-align: start;
}

.popup-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid color-mix(in srgb, #ffffff 30%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, #0c0f0d 55%, transparent);
  color: #ffffff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background-color 0.15s ease-out;
}

.popup-close:hover {
  background: color-mix(in srgb, #0c0f0d 75%, transparent);
}

.popup-close svg {
  width: 20px;
  height: 20px;
}

.popup-close:focus-visible,
.popup-ctrl:focus-visible,
.popup-bigplay:focus-visible,
.popup-unmute:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Text only: the X sits in the card's corner, so leave room for it. */
.popup-card.is-text-only .popup-close {
  border-color: var(--border);
  background: var(--bg);
  color: var(--text);
}

.popup-card.is-text-only .popup-content {
  padding-top: 28px;
}

.popup-card.is-text-only .popup-title {
  padding-inline-end: 44px;
}

.popup-media {
  position: relative;
  flex: none;
  max-height: 56dvh;
  overflow: hidden;
  background: #0c0f0d;
}

.popup-media-el {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56dvh;
  object-fit: cover;
}

.popup-video,
.popup-video video {
  width: 100%;
  height: 100%;
}

.popup-video video {
  object-fit: contain;
  background: #0c0f0d;
}

.popup-video-bar {
  position: absolute;
  bottom: 12px;
  inset-inline-start: 12px;
  display: flex;
  gap: 8px;
}

.popup-ctrl,
.popup-bigplay {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, #ffffff 30%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, #0c0f0d 55%, transparent);
  color: #ffffff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.popup-ctrl {
  width: 40px;
  height: 40px;
}

.popup-ctrl svg {
  width: 18px;
  height: 18px;
}

.popup-bigplay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
}

.popup-bigplay svg {
  width: 28px;
  height: 28px;
  margin-inline-start: 3px;
}

.popup-bigplay[hidden],
.popup-unmute[hidden] {
  display: none;
}

/* "With sound" videos start muted: a clear invitation to turn it on. */
.popup-unmute {
  position: absolute;
  bottom: 12px;
  inset-inline-end: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.5);
}

.popup-unmute svg {
  width: 18px;
  height: 18px;
}

.popup-content {
  padding: 22px 24px 24px;
  overflow-y: auto;
}

.popup-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: var(--weight-bold);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.popup-text {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.popup-button {
  margin-top: 20px;
}

@media (max-width: 360px) {
  .popup-content {
    padding: 18px 18px 20px;
  }

  .popup-title {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .popup,
  .popup[open],
  .popup.is-closing {
    animation: none;
    transition: none;
    transform: none;
  }
}

/* ---------- Admin: Announcements (admin.html#announcements, supabase/053) ---------- */
.ann-tabs {
  width: min(100%, 420px);
  margin: 20px 0 4px;
}

.ann-tabs .segmented-option {
  min-width: 0;
  padding-inline: 8px;
  white-space: nowrap;
}

@media (max-width: 360px) {
  .ann-tabs .segmented-option {
    padding-inline: 4px;
    font-size: 0.85rem;
  }
}

.ann-compose > .profile-muted {
  margin: -8px 0 20px;
  line-height: 1.55;
}

.ann-where {
  max-width: 68ch;
  margin: 16px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.ann-card .website-card-head {
  margin-bottom: 16px;
}

/* An English/Arabic pair: side by side when there's room, the Translate
   button under them, at the end. */
.ann-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 0 16px;
  margin-bottom: 8px;
}

.ann-pair .field {
  margin-bottom: 8px;
}

.ann-pair textarea {
  min-height: 96px;
  resize: vertical;
}

.ann-translate {
  grid-column: 1 / -1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}

.ann-translate svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.ann-translate:disabled {
  opacity: 0.6;
  cursor: progress;
}

.ann-translate-msg {
  grid-column: 1 / -1;
  margin: 0;
  text-align: end;
}

.ann-translate-msg:empty {
  display: none;
}

.ann-media-block,
.ann-link,
.ann-email-media {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.ann-media-block h3,
.ann-link h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.ann-media-type {
  width: min(100%, 360px);
  margin-bottom: 16px;
}

.ann-media-body .website-media-preview {
  max-width: 420px;
}

.ann-media-body .profile-notice:empty,
.website-media-block .profile-notice:empty {
  display: none;
}

.ann-video-options {
  max-width: 520px;
  margin-top: 16px;
}

.ann-video-options .choice-field {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.ann-video-options legend {
  margin-bottom: 8px;
  font-weight: var(--weight-medium);
}

.ann-video-options .field-hint {
  margin-top: 8px;
}

.ann-link .field {
  max-width: 420px;
}

.ann-link [data-part="labels"] {
  margin-top: 4px;
}

/* Send email */
.ann-recipient-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 16px 0 12px;
}

.ann-search {
  flex: 1 1 220px;
  max-width: 360px;
}

.ann-search input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: var(--weight-regular);
}

.ann-search input:focus {
  outline: none;
  border-color: var(--accent);
}

.ann-recipient-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ann-recipient-buttons .btn {
  width: auto;
}

.ann-recipient-list {
  max-height: 340px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  list-style: none;
}

.ann-recipient-list:empty {
  display: none;
}

.ann-recipient {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease-out;
}

.ann-recipient:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.ann-recipient input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.ann-recipient-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.ann-recipient-name {
  overflow: hidden;
  font-weight: var(--weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ann-recipient-email {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ann-recipient-lang {
  flex: none;
  min-width: 32px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
}

.ann-recipient-state {
  margin: 10px 0 0;
}

.ann-recipient-state:empty {
  display: none;
}

.ann-email-actions .btn {
  width: auto;
}

.ann-email-actions #ann-send {
  margin-inline-start: auto;
}

.ann-email-actions .profile-notice {
  flex-basis: 100%;
  margin: 0;
}

/* Sent */
.ann-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

#ann-history-count:empty {
  display: none;
}

#ann-history-count {
  margin: 16px 0 0;
}

.ann-history-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease-out, transform 0.15s ease-out;
}

.ann-history-item:hover {
  border-color: var(--accent);
}

.ann-history-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ann-history-title {
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.ann-history-meta,
.ann-detail-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ann-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.status-badge.ann-count-sent {
  background: color-mix(in srgb, var(--status-green) 18%, transparent);
}

.status-badge.ann-count-waiting {
  background: color-mix(in srgb, var(--status-yellow) 22%, transparent);
}

.status-badge.ann-count-failed {
  background: color-mix(in srgb, var(--status-red) 18%, transparent);
}

.status-badge.ann-count-skipped {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* One announcement */
.ann-detail-meta {
  margin: 4px 0 0;
}

.ann-detail-sections {
  margin-top: 4px;
}

.ann-sent-picture {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 0 16px;
  border-radius: 12px;
}

.ann-sent-lang + .ann-sent-lang {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.ann-sent-lang h3 {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: var(--weight-medium);
}

.ann-sent-lang[lang="en"] {
  font-family: var(--font-en);
}

.ann-sent-lang[lang="ar"] {
  font-family: var(--font-ar);
}

.ann-sent-subject {
  margin: 0 0 8px;
  font-weight: var(--weight-medium);
}

.ann-sent-body {
  margin: 0;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.ann-sent-button {
  display: inline-block;
  margin: 12px 0 0;
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.ann-sent-video {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.ann-sent-link {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.ann-people {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ann-person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 12px 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.ann-person:first-child {
  border-top: 0;
  padding-top: 0;
}

.ann-person-who {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  min-width: 0;
}

.ann-person-error {
  flex-basis: 100%;
  color: var(--text-muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .ann-email-actions #ann-send {
    margin-inline-start: 0;
  }

  .ann-email-actions .btn {
    flex: 1 1 100%;
  }

  .ann-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Arabic: names and email addresses line up on the right like the rest. */
html[dir="rtl"] .ann-person-who > *,
html[dir="rtl"] .ann-recipient-text > * {
  text-align: right;
}

.popup-title:focus {
  outline: none;
}

/* ---------- Connected campsites (supabase/054) ----------
   The "Add another campsite" step in the booking sheet
   (js/booking-connected.js, reusing the add-on rows and the calendar), the
   added campsites under a stay, and the admin's ticks in the Campsites
   editor. */
.connected-add {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}

.connected-add svg {
  width: 16px;
  height: 16px;
}

.connected-when {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 0;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.connected-when strong {
  margin-inline-start: auto;
  font-weight: var(--weight-bold);
}

.connected-actions {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.connected-remove {
  color: var(--text-muted);
}

.connected-cal-head {
  margin: 2px 0 14px;
}

.connected-cal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: var(--weight-bold);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* The main stay's nights, a small gold dot on the added campsite's
   calendar so the two stays are easy to line up. */
.book-day.is-main-stay {
  position: relative;
}

.book-day.is-main-stay::after {
  position: absolute;
  top: 5px;
  inset-inline-end: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.book-day.is-main-stay.is-start::after,
.book-day.is-main-stay.is-end::after {
  background: var(--on-accent);
}

.connected-main-note {
  margin: 10px 0 0;
}

/* An added campsite under the stay (booking sheet, My Bookings, admin). */
.book-added-campsite {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

/* The rows after the added campsites (add-ons, total) start a new group. */
.book-added-campsite + .book-summary-rows {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.book-added-name {
  margin: 0 0 8px;
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.book-added-label {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

:root[lang="ar"] .book-added-label {
  font-size: 0.85rem;
  letter-spacing: 0;
}

.mybook-card-added {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Admin: the Campsites editor's ticks. */
.connection-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.connection-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
}

.connection-option:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
}

.connection-option input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.connection-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.connection-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
}

.connection-name {
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.connection-ref {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.connection-archived {
  padding: 1px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 14%, transparent);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
}

@media (prefers-reduced-motion: reduce) {
  .connection-option {
    transition: none;
  }
}

/* ---------- Campsite descriptions: English + Arabic, formatted (supabase/057) ----------
   js/rentals.js descriptionBlocks(): a bold title, short paragraphs, bold
   section labels and bullet lists. Each block lines up with its own
   language (text-align: start), so Arabic reads right to left. */
.rd-description.is-formatted {
  display: grid;
  gap: 10px;
  white-space: normal;
}

.rd-description.is-formatted > * {
  margin: 0;
  text-align: start;
}

.rd-desc-title {
  font-size: 1.1rem;
  font-weight: var(--weight-bold);
  line-height: 1.45;
}

.rd-description.is-formatted > .rd-desc-label {
  margin-top: 8px;
}

.rd-desc-label {
  font-size: 1rem;
  font-weight: var(--weight-bold);
  line-height: 1.45;
}

.rd-desc-list {
  display: grid;
  gap: 4px;
  padding-inline-start: 1.4em;
}

.rd-desc-list li::marker {
  color: var(--accent);
}

.rd-description strong {
  font-weight: var(--weight-bold);
}

/* Admin: the Arabic box sits right under the English one. */
.description-ar-block {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.description-ar-block[hidden] {
  display: none;
}

.description-format-hint {
  margin: 0;
}
