/* Shared Light/Dark palette. The aliases connect the original page styles to it. */
:root {
  color-scheme: light;
  --theme-paper: #f4f8fc;
  --theme-panel: #fbfdff;
  --theme-inset: #eaf2f7;
  --theme-chrome: #edf4f9;
  --theme-ink: #193d53;
  --theme-muted: #496271;
  --theme-line: #c3d4df;
  --theme-control-line: #7c97a7;
  --theme-primary: #bed5e5;
  --theme-primary-ink: #27546f;
  --theme-secondary: #e5eff5;
  --theme-secondary-ink: #2d607b;
  --theme-outline: #577c91;
  --theme-outline-ink: #285b77;
  --theme-focus: #326a85;
  --theme-date: #285b77;
  --theme-date-soft: #dfedf6;
  --theme-shadow: 0 12px 30px #193d531a;
  --theme-scrim: #102b406b;
  --theme-photo: #e5eff5;
  --theme-switch-track: #dcebf4;
  --theme-switch-thumb: #fbfdff;
  --theme-switch-icon: #366781;
  --theme-switch-on: #244f69;
  --theme-switch-shadow: 0 2px 7px #285b7740;

  --ink: var(--theme-ink);
  --muted: var(--theme-muted);
  --sand: var(--theme-paper);
  --paper: var(--theme-paper);
  --surface: var(--theme-paper);
  --surface-raised: var(--theme-panel);
  --line: var(--theme-line);
  --gold: var(--theme-date);
  --accent: var(--theme-primary);
  --accent-text: var(--theme-primary-ink);
  --accent-soft: var(--theme-date-soft);
  --accent-glow: none;
  --graphite: var(--theme-inset);
  --graphite-text: var(--theme-ink);
  --graphite-muted: var(--theme-muted);
  --graphite-line: var(--theme-line);
  --graphite-edge: var(--theme-line);
  --graphite-glass: var(--theme-chrome);
  --graphite-panel: var(--theme-panel);
  --graphite-inset: var(--theme-inset);
  --graphite-shadow: var(--theme-shadow);
  --request-surface: var(--theme-primary);
  --request-edge: var(--theme-outline);
  --period-edge: var(--theme-line);
  --date-orange: var(--theme-date);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --theme-paper: #1a2123;
  --theme-panel: #232a2e;
  --theme-inset: #282f33;
  --theme-chrome: #21282c;
  --theme-ink: #faf5f0;
  --theme-muted: #c3cbd0;
  --theme-line: #465258;
  --theme-control-line: #748189;
  --theme-primary: #c5743a;
  --theme-primary-ink: #1e2223;
  --theme-secondary: #282f33;
  --theme-secondary-ink: #f1b58a;
  --theme-outline: #c5743a;
  --theme-outline-ink: #fffcf7;
  --theme-focus: #f1b58a;
  --theme-date: #f1b58a;
  --theme-date-soft: #2b231f;
  --theme-shadow: 0 12px 30px #0c10135e;
  --theme-scrim: #0b1015af;
  --theme-photo: #1a2123;
  --theme-switch-track: #161d20;
  --theme-switch-thumb: #4b3325;
  --theme-switch-icon: #c7b9ab;
  --theme-switch-on: #ffd6b2;
  --theme-switch-shadow: 0 2px 8px #0b0e10a6;
}

body, .request { background: var(--theme-paper); color: var(--theme-ink); }
body { accent-color: var(--theme-focus); }
.official-nav,
.official-footer,
.dock,
.dock-peek,
#more-menu.full-menu,
.listing-dialog,
.booking-dialog {
  color: var(--theme-ink);
  background: var(--theme-chrome);
  border-color: var(--theme-line);
}
.official-footer { box-shadow: none; }
.official-footer .footer-signature { color: var(--theme-muted); border-color: var(--theme-line); }
.official-footer address a svg, .dock .dock-dates svg { color: var(--theme-date); }
.dock::before { background: none; }
.dock a, .dock #more-toggle { color: var(--theme-ink); } .dock a:hover, .dock #more-toggle:is(:hover, [aria-expanded="true"]),
.official-nav nav a:is(:hover, :focus-visible) {
  color: var(--theme-outline-ink);
  background: var(--theme-secondary);
  border-color: var(--theme-line);
  box-shadow: none;
}

.official-nav .nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(.3rem, 1vw, .65rem);
  flex: 0 0 auto;
}
.official-nav .request-label-short { display: none; }
.official-nav .header-request {
  background: var(--theme-primary);
  color: var(--theme-primary-ink);
  border-color: var(--theme-primary);
  min-height: 44px;
  white-space: nowrap;
}
.official-nav .header-request::before { content: none; }
.theme-switch:not([hidden]) {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: transparent;
  cursor: pointer;
}
.theme-switch-track {
  --switch-step: 25px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, var(--switch-step));
  place-items: center;
  inline-size: max-content;
  padding: 3px;
  border: 1px solid var(--theme-control-line);
  border-radius: inherit;
  background: var(--theme-switch-track);
  box-shadow: inset 0 1px 3px #0c1d2d17;
}
.theme-switch-track::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  inline-size: var(--switch-step);
  border-radius: inherit;
  background: var(--theme-switch-thumb);
  box-shadow: var(--theme-switch-shadow);
  transition: transform 180ms ease-out;
}
.theme-switch[aria-checked="true"] .theme-switch-track::before { transform: translateX(var(--switch-step)); }
.theme-switch svg {
  position: relative;
  inline-size: 18px;
  block-size: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--theme-switch-icon);
}
.theme-switch[aria-checked="false"] .theme-sun,
.theme-switch[aria-checked="true"] .theme-moon { color: var(--theme-switch-on); }
.theme-switch:hover .theme-switch-track { border-color: var(--theme-focus); }
@media (prefers-reduced-motion: reduce) { .theme-switch-track::before { transition: none; } }
@media (min-width: 731px) { .official-nav { inset-inline: max(16px, calc((100% - 810px) / 2)); } }
@media (max-width: 730px) {
  .official-nav .request-label-full { display: none; }
  .official-nav .request-label-short { display: inline; }
  .official-nav .header-request { padding-inline: .65rem; }
  .official-nav .wordmark { min-width: 0; line-height: 1.25; }
}
@media (max-width: 360px) {
  .official-nav .wordmark { font-size: .72rem; letter-spacing: .025em; white-space: nowrap; }
  .official-nav .header-request { padding-inline: .55rem; }
}

.full-menu-header, .listing-head { background: var(--theme-chrome); color: var(--theme-ink); }
.menu-group li a:hover { color: var(--theme-outline-ink); }
.menu-group .menu-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-block-start: .75rem;
}
.menu-shortcuts li { flex: 1 0 auto; }
.menu-shortcuts li a {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: .5rem .75rem;
  border: 1px solid var(--theme-line);
  border-radius: 99px;
  background: var(--theme-secondary);
  color: var(--theme-secondary-ink);
  text-align: center;
  font-size: .9375rem;
}
.menu-shortcuts li a:is(:hover, :focus-visible) { border-color: var(--theme-outline); }
#more-menu.full-menu::backdrop, .listing-dialog::backdrop, .booking-dialog::backdrop,
:is(#enquiry-dates, #stay-calendar)::backdrop { background: var(--theme-scrim); }
.full-menu-header button, .listing-head button,
.villa-photo-prev, .villa-photo-next, .villa-photo-count {
  color: var(--theme-ink);
  background: var(--theme-photo);
  border-color: var(--theme-control-line);
  box-shadow: none;
}
.villa-photo-prev:hover, .villa-photo-next:hover { background: var(--theme-primary); color: var(--theme-primary-ink); }
.villa-detail-media { position: relative; }
.gallery-view-all {
  position: absolute;
  z-index: 1;
  inset: auto auto .65rem .65rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .4rem .8rem;
  border: 1px solid #72828b;
  border-radius: 99px;
  color: #faf5f0;
  background: #1a2123;
  font-size: .875rem;
  line-height: 1.2;
  text-decoration: none;
}
.editorial a.gallery-view-all:not(.button), .villa-card a.gallery-view-all { text-decoration: none; }
.gallery-view-all:is(:hover, :focus-visible) { color: #f1b58a; }
.photo-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right))
    max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
  border: 0;
  color: #faf5f0;
  background: #111719;
}
.photo-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .8rem; }
body:has(.photo-lightbox[open]) { overflow: hidden; }
.photo-lightbox-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .6rem;
}
.photo-lightbox-header h2 { margin: 0; font-size: clamp(1.1rem, 3vw, 1.5rem); line-height: 1.2; }
.photo-lightbox-count { font-variant-numeric: tabular-nums; white-space: nowrap; color: #f1b58a; }
.photo-lightbox button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #748189;
  border-radius: 50%;
  color: #faf5f0;
  background: #282f33;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.photo-lightbox button:is(:hover, :focus-visible) { border-color: #f1b58a; color: #f1b58a; }
.photo-lightbox button:focus-visible { outline: 2px solid #f1b58a; outline-offset: 2px; }
.photo-lightbox-view {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: .5rem;
  min-height: 0;
}
.photo-lightbox figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  margin: 0;
  text-align: center;
  touch-action: pan-y pinch-zoom;
}
.photo-lightbox img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.photo-lightbox figcaption { padding: .55rem .15rem 0; line-height: 1.35; }
@media (max-width: 600px) {
  .photo-lightbox-view { position: relative; grid-template-columns: minmax(0, 1fr); }
  .photo-lightbox-view button { position: absolute; inset-block-start: 50%; translate: 0 -50%; z-index: 1; }
  .photo-lightbox-view [data-gallery-step="-1"] { inset-inline-start: .2rem; }
  .photo-lightbox-view [data-gallery-step="1"] { inset-inline-end: .2rem; }
}
.villa-comparison { background: var(--theme-inset); border-color: var(--theme-line); }
.villa-facts li { background: var(--theme-inset); }
.villa-card-rate strong { color: var(--theme-date); }

.article-grid article, .quick-facts > div, .guide-note, .table-scroll {
  color: var(--theme-ink);
  background: var(--theme-panel);
  border-color: var(--theme-line);
}
.island-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 1rem;
  margin-block: 1.5rem;
}
.island-photo { margin: 0; }
.island-photo img { width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 16px; }
.island-photo figcaption { margin-block-start: .4rem; color: var(--theme-muted); font-size: .875rem; }
.table-scroll :is(td, th), .editorial > .page-note, .home-island { border-color: var(--theme-line); }
.table-scroll thead, .comparison-table thead,
.comparison-table thead th:first-child, .comparison-table tbody th {
  color: var(--theme-ink);
  background: var(--theme-inset);
}
.villa-arrival time { color: var(--theme-date); font-weight: 700; font-variant-numeric: tabular-nums; }
.editorial a:not(.button):not(.island-card), .home-articles a { text-decoration-color: var(--theme-outline); }
.eyebrow { color: var(--theme-date); }

/* The three button roles are shared across the site. */
.button:not(.button-primary),
#booking .form-calendar-open, #booking .villa-buttons > button, #stay-calendar .villa-buttons > button,
.listing-buttons > button:not(.button), .listing-dates [data-undecided] {
  color: var(--theme-secondary-ink);
  background: var(--theme-secondary);
  border-color: var(--theme-line);
  box-shadow: none;
}
.button:is(:hover, :focus-visible), #booking .form-calendar-open:is(:hover, :focus-visible),
.listing-buttons > button:not(.button):hover, .listing-dates [data-undecided]:hover {
  color: var(--theme-secondary-ink);
  background: var(--theme-secondary);
  border-color: var(--theme-outline);
  box-shadow: none;
}
.button.button-primary, #booking > button[type="submit"], #owner-form > button[type="submit"],
#booking .villa-buttons > button[aria-pressed="true"], #stay-calendar .villa-buttons > button[aria-pressed="true"],
.official-nav .header-request:is(:hover, :focus-visible) {
  color: var(--theme-primary-ink);
  background: var(--theme-primary);
  border-color: var(--theme-primary);
  box-shadow: none;
}
.button.button-primary:hover, #booking > button[type="submit"]:hover,
#owner-form > button[type="submit"]:hover, .official-nav .header-request:hover,
#booking .villa-buttons > button:hover, #stay-calendar .villa-buttons > button:hover {
  border-color: var(--theme-outline);
}
.villa-card-body .listing-buttons > a:not(.button),
.villa-card-body .listing-buttons > a:not(.button):hover {
  color: var(--theme-outline-ink);
  background: transparent;
  border-color: var(--theme-outline);
}
.villa-card-body .listing-buttons > a:not(.button):hover { background: var(--theme-secondary); }

#booking, #owner-form, .listing-dates { color-scheme: inherit; }
#booking input:not([type="checkbox"]), #booking select, #booking textarea,
#owner-form :is(input, select, textarea), .listing-dates input,
.availability-search .availability-controls :is(select, input) {
  color-scheme: inherit;
  color: var(--theme-ink);
  background-color: var(--theme-panel);
  border-color: var(--theme-control-line);
  box-shadow: none;
}
#booking input.enquiry-date { background-image: none; }
.booking-contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1rem;
  margin-block-start: .65rem;
}
#booking :is(input, textarea)::placeholder, #owner-form :is(input, textarea)::placeholder { color: var(--theme-muted); }
.availability-search .availability-controls label, #period-results h3 { color: var(--theme-ink); }
.availability-search .availability-controls label { font-size: .875rem; font-weight: 600; }
#booking input[type="checkbox"], .stay-date-preferences input[type="checkbox"] { accent-color: var(--theme-focus); }

/* Date accents always follow the palette, including native date controls. */
#booking input[type="date"], .listing-dates input[type="date"],
.availability-search .availability-controls input:is([type="date"], [type="month"]),
#stay-month, #dates-month {
  color: var(--theme-date);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#booking input[type="date"], .listing-dates input[type="date"],
.availability-search .availability-controls input:is([type="date"], [type="month"]) {
  background-color: var(--theme-date-soft);
}
#booking input[type="date"]:not(:disabled), .listing-dates input[type="date"]:not(:disabled),
.availability-search input[type="date"], .availability-search input[type="month"] {
  border-inline-start: 3px solid var(--theme-outline);
}
:is(#booking, .listing-dates, .availability-search) input:is([type="date"], [type="month"])::-webkit-datetime-edit {
  color: var(--theme-date);
}
#period-results button, .listing-periods button {
  background: var(--theme-date-soft);
  border-color: var(--theme-control-line);
  color: var(--theme-date);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#period-results button:is(:hover, :focus-visible), .listing-periods button:hover {
  background: var(--theme-date-soft);
  border-color: var(--theme-outline);
  color: var(--theme-date);
  box-shadow: inset 3px 0 var(--theme-outline);
}
#period-results button[aria-pressed="true"] {
  background: var(--theme-primary);
  border-color: var(--theme-outline);
  color: var(--theme-primary-ink);
  box-shadow: inset 3px 0 var(--theme-outline);
}
.period-dates { display: block; font-size: 1rem; line-height: 1.3; }
.period-nights { display: block; margin-block-start: .24rem; font-size: .875rem; }
#period-summary { color: var(--theme-date); font-weight: 700; }

:is(#stay-calendar, #enquiry-dates) {
  --surface: var(--theme-chrome);
  --surface-raised: var(--theme-panel);
  --accent-text: var(--theme-primary-ink);
  --accent-glow: none;
  color-scheme: inherit;
  border-color: var(--theme-control-line);
}
.stay-date-preferences { background: var(--theme-inset); }
#stay-calendar .stay-days button,
#enquiry-dates .dates-grid button {
  background: var(--theme-panel);
  color: var(--theme-ink);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}
#stay-calendar .stay-days button.available,
#stay-calendar .stay-days button.in-range,
#enquiry-dates .dates-grid button.in-range {
  background: var(--theme-date-soft);
  border-color: var(--theme-control-line);
  color: var(--theme-date);
}
#stay-calendar .stay-days button.checkout-only { border-color: var(--theme-outline); }
:is(#stay-calendar, #enquiry-dates) :is(.stay-days, .dates-grid) button.selected {
  background: var(--theme-primary);
  border: 2px solid var(--theme-outline);
  color: var(--theme-primary-ink);
  box-shadow: none;
  font-weight: 700;
}
:is(#stay-calendar, #enquiry-dates) :is(.stay-days, .dates-grid) button:disabled {
  color: var(--theme-muted);
  opacity: .75;
}
.stay-selection strong, .dates-summary strong {
  color: var(--theme-date);
  font-size: .9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stay-selection small, .dates-summary small { font-size: .72rem; }

:root :is(a, button, input, select, textarea, summary):focus-visible,
:is(.official-nav, .official-footer, .dock, #more-menu, .booking-dialog, .villa-card, .villa-detail-hero,
    #booking, #owner-form, #stay-calendar, #enquiry-dates) :focus-visible {
  outline-color: var(--theme-focus);
}
