/*
 * Cookie consent (inc/Privacy/Consent.php): banner, preferences dialog, consent-gated
 * embeds and the Cookie Policy table. Uses the coastal palette from lux.css, repeated
 * here because the banner also appears on pages outside body.lux-page.
 * Loaded only while consent management is in use.
 */

.vo-consent,
.vo-embed,
.vo-cookie-table {
  --vo-c-green: #23403a;
  --vo-c-ink: #22302c;
  --vo-c-text: #5d615a;
  --vo-c-brass: #8c6d38;
  --vo-c-sea: #3d6964;
  --vo-c-ivory: #fbf8f1;
  --vo-c-sand: #ece2cf;
  --vo-c-line: #e3d9c6;
  --vo-c-display: "Marcellus", Georgia, "Times New Roman", serif;
  --vo-c-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --vo-c-label: "Raleway", "Helvetica Neue", Arial, sans-serif;
}

.vo-consent [hidden] {
  display: none !important;
}

.vo-consent :focus-visible,
.vo-embed :focus-visible,
.vo-cookie-table :focus-visible {
  outline: 2px solid var(--vo-c-brass);
  outline-offset: 2px;
}

/* Buttons (banner, dialog, embeds, Cookie Policy) */

.vo-consent__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.75rem 1.1rem;
  color: var(--vo-c-green, #23403a);
  background: transparent;
  border: 1px solid var(--vo-c-green, #23403a);
  border-radius: 0;
  font-family: var(--vo-c-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.vo-consent__button:hover,
.vo-consent__button:focus-visible {
  color: #fff;
  background: var(--vo-c-green, #23403a);
}

.vo-consent__button--solid {
  color: #fff;
  background: var(--vo-c-green, #23403a);
}

.vo-consent__button--solid:hover,
.vo-consent__button--solid:focus-visible {
  background: var(--vo-c-brass, #8c6d38);
  border-color: var(--vo-c-brass, #8c6d38);
}

/* Banner: a card bottom left on larger screens, clear of the sticky booking button */

.vo-consent__banner {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 90;
  display: grid;
  gap: 0.85rem;
  width: min(26rem, calc(100% - 2.5rem));
  padding: 1.5rem 1.5rem 1.35rem;
  color: var(--vo-c-text);
  background: var(--vo-c-ivory);
  border: 1px solid var(--vo-c-line);
  border-top: 3px solid var(--vo-c-brass);
  box-shadow: 0 1.25rem 3rem rgb(26 48 43 / 18%);
  font-family: var(--vo-c-body);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.6;
  animation: vo-consent-in 320ms ease both;
}

.vo-consent__title {
  margin: 0;
  color: var(--vo-c-ink);
  font-family: var(--vo-c-display);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

.vo-consent__text {
  margin: 0;
}

.vo-consent__text a {
  color: var(--vo-c-green);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.vo-consent__text a:hover {
  color: var(--vo-c-brass);
}

.vo-consent__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.vo-consent__more {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0.3rem 0;
  color: var(--vo-c-green);
  background: none;
  border: 0;
  font-family: var(--vo-c-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-transform: uppercase;
  text-underline-offset: 0.3em;
  cursor: pointer;
}

.vo-consent__more:hover {
  color: var(--vo-c-brass);
}

@keyframes vo-consent-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Preferences dialog */

.vo-consent__dialog {
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  color: var(--vo-c-text);
  background: var(--vo-c-ivory);
  border: 1px solid var(--vo-c-line);
  border-top: 3px solid var(--vo-c-brass);
  box-shadow: 0 1.5rem 4rem rgb(26 48 43 / 25%);
  font-family: var(--vo-c-body);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.6;
}

.vo-consent__dialog:focus-visible {
  outline: none;
}

.vo-consent__dialog::backdrop {
  background: rgb(26 48 43 / 45%);
}

.vo-consent__panel {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
}

.vo-consent__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.vo-consent__close {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  margin: -0.5rem -0.75rem 0 0;
  padding: 0;
  color: var(--vo-c-ink);
  background: none;
  border: 0;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.vo-consent__close:hover {
  color: var(--vo-c-brass);
}

.vo-consent__note {
  margin: 0;
  padding: 0.65rem 0.85rem;
  color: var(--vo-c-ink);
  background: var(--vo-c-sand);
  font-size: 0.82rem;
}

.vo-consent__category {
  padding-top: 1rem;
  border-top: 1px solid var(--vo-c-line);
}

.vo-consent__category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.vo-consent__label {
  color: var(--vo-c-ink);
  font-family: var(--vo-c-display);
  font-size: 1.1rem;
  line-height: 1.3;
}

.vo-consent__always {
  color: var(--vo-c-sea);
  font-family: var(--vo-c-label);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vo-consent__category-text {
  margin: 0.3rem 0 0;
}

.vo-consent__switch {
  position: relative;
  display: inline-flex;
  flex: none;
}

.vo-consent__switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.vo-consent__track {
  position: relative;
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  background: var(--vo-c-sand);
  border: 1px solid #c9b995;
  border-radius: 1rem;
  transition: background 200ms ease, border-color 200ms ease;
}

.vo-consent__track::after {
  position: absolute;
  top: calc(50% - 0.55rem);
  left: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgb(26 48 43 / 30%);
  content: "";
  transition: transform 200ms ease;
}

.vo-consent__switch input:checked + .vo-consent__track {
  background: var(--vo-c-green);
  border-color: var(--vo-c-green);
}

.vo-consent__switch input:checked + .vo-consent__track::after {
  transform: translateX(1.2rem);
}

.vo-consent__switch input:focus-visible + .vo-consent__track {
  outline: 2px solid var(--vo-c-brass);
  outline-offset: 2px;
}

.vo-consent__services {
  margin-top: 0.5rem;
}

.vo-consent__services summary {
  width: fit-content;
  color: var(--vo-c-green);
  font-family: var(--vo-c-label);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.vo-consent__services ul {
  display: grid;
  gap: 0.5rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.vo-consent__services li {
  padding: 0.6rem 0.8rem;
  background: #fff;
  border: 1px solid var(--vo-c-line);
  font-size: 0.82rem;
}

.vo-consent__services strong {
  color: var(--vo-c-ink);
  font-weight: 500;
}

.vo-consent__services span {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--vo-c-sea);
  font-size: 0.76rem;
}

.vo-consent__actions--dialog {
  grid-template-columns: repeat(3, 1fr);
  padding-top: 1.1rem;
  border-top: 1px solid var(--vo-c-line);
}

/* Footer: "Cookie settings" in the Legal Menu, styled like its links */

footer.lux-footer .vo-consent-link {
  padding: 0;
  color: rgb(255 255 255 / 62%);
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color 220ms ease;
}

footer.lux-footer .vo-consent-link:hover,
footer.lux-footer .vo-consent-link:focus-visible {
  color: var(--lux-gold-soft);
}

/* Embeds waiting for consent (Google Maps on Contact and Explore) */

.vo-embed {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 1.5rem;
  color: var(--vo-c-text);
  background:
    linear-gradient(rgb(251 248 241 / 90%), rgb(251 248 241 / 90%)),
    repeating-linear-gradient(0deg, var(--vo-c-line) 0 1px, transparent 1px 2.5rem),
    repeating-linear-gradient(90deg, var(--vo-c-line) 0 1px, transparent 1px 2.5rem),
    var(--vo-c-sand);
  font-family: var(--vo-c-body);
  text-align: center;
}

.vo-embed__placeholder {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  max-width: 30rem;
}

.lux-home .vo-embed__service {
  margin: 0;
  color: var(--vo-c-brass);
  font-family: var(--vo-c-label);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lux-home .vo-embed__text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.6;
}

.vo-embed__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1.25rem;
  margin-top: 0.4rem;
}

.vo-embed__link {
  padding: 0.3rem 0;
  color: var(--vo-c-green);
  background: none;
  border: 0;
  font-family: var(--vo-c-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-transform: uppercase;
  text-underline-offset: 0.3em;
  cursor: pointer;
}

.vo-embed__link:hover {
  color: var(--vo-c-brass);
}

/* Gallery: note under the video play button */

.lux-home .vo-video-note {
  margin-top: 1rem;
  color: rgb(255 255 255 / 88%);
  font-size: 0.8rem;
  text-shadow: 0 1px 6px rgb(0 0 0 / 45%);
}

/* Cookie Policy page: service list */

.vo-cookie-table {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--vo-c-line);
}

.vo-cookie-table__pending {
  padding: 0.65rem 0.85rem;
  color: var(--vo-c-ink);
  background: var(--vo-c-sand);
  font-size: 0.9rem;
}

.vo-cookie-table__action {
  margin: 1.25rem 0 2rem;
}

.vo-cookie-table h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.35rem;
}

.vo-cookie-table__scroll {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.vo-cookie-table table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.55;
}

.vo-cookie-table th,
.vo-cookie-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--vo-c-line);
}

.vo-cookie-table thead th {
  color: var(--vo-c-ink);
  background: var(--vo-c-sand);
  font-family: var(--vo-c-label);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vo-cookie-table tbody th {
  width: 28%;
  color: var(--vo-c-ink);
  font-weight: 600;
}

.vo-cookie-table tbody th span {
  display: block;
  color: var(--vo-c-text);
  font-size: 0.85rem;
  font-weight: 400;
}

.vo-cookie-table td ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.vo-cookie-table code {
  padding: 0.05rem 0.3rem;
  color: var(--vo-c-ink);
  background: var(--vo-c-ivory);
  border: 1px solid var(--vo-c-line);
  font-size: 0.82em;
}

/* Phones: full-width sheet above the Request to Book bar */

@media (max-width: 700px) {
  .vo-consent__banner {
    right: 0;
    bottom: 0;
    left: 0;
    gap: 0.6rem;
    width: auto;
    max-height: 70vh;
    overflow-y: auto;
    padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    font-size: 0.84rem;
    line-height: 1.55;
  }

  body:has(.lux-mobile-book) .vo-consent__banner {
    bottom: calc(3.5rem + env(safe-area-inset-bottom));
    padding-bottom: 1rem;
  }

  .vo-consent__banner .vo-consent__title {
    font-size: 1.15rem;
  }

  .vo-consent__panel {
    padding: 1.35rem 1.1rem;
  }

  .vo-embed {
    padding: 1rem;
  }

  .lux-home .vo-embed__text {
    font-size: 0.82rem;
  }
}

@media (max-width: 560px) {
  .vo-consent__actions--dialog {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vo-consent__banner {
    animation: none;
  }

  .vo-consent__button,
  .vo-consent__track,
  .vo-consent__track::after {
    transition: none;
  }
}
