/* The section sets the size. A filled or outlined pill can use any of the three
   sizes. Sizes are minimums so labels can wrap and browser text can grow. */
:root {
  --al-cta-type: 1rem;
  --al-cta-height: 2.75rem;
  --al-cta-pad-x: 1.125rem;
  --al-cta-pad-y: .625rem;
  --al-cta-gap: .75rem;
  --al-cta-arrow: .875rem;
  --al-cta-teal: var(--swatch--teal, #004f53);
  --al-cta-light: var(--swatch--almost-white, #f9f8f5);
}

:where(.native-alalaho-nav, .sticky-nav, .retreat_buttons, [data-al-rc="chooser"],
       .home-pathway-links, .button.is-team:not(.home-pathway-cta), [data-cta-size="compact"]) {
  --al-cta-type: .9375rem;
  --al-cta-height: 2.75rem;
  --al-cta-pad-x: .875rem;
  --al-cta-pad-y: .375rem;
  --al-cta-gap: .5rem;
  --al-cta-arrow: .8125rem;
}

:where(.retreat_hero-wrap, .grid_split.is-hero, .grid_split:has(h1), .hero-actions, .book-cta, .returners-booking-action,
       section.is-final-cta, .editorial-closing, .closing-image, .booking-button-2.color-teal,
       .checkout-grid .primary, [data-cta-size="invitation"]) {
  --al-cta-type: 1rem;
  --al-cta-height: 3.125rem;
  --al-cta-pad-x: 1.5rem;
  --al-cta-pad-y: .75rem;
  --al-cta-gap: 1rem;
  --al-cta-arrow: 1rem;
}
@media (max-width: 700px) {
  :where(.retreat_hero-wrap, .grid_split.is-hero, .grid_split:has(h1), .hero-actions, .book-cta, .returners-booking-action,
         section.is-final-cta, .editorial-closing, .closing-image, .booking-button-2.color-teal,
         .checkout-grid .primary, [data-cta-size="invitation"]) {
    --al-cta-pad-x: 1.125rem;
    --al-cta-gap: .75rem;
  }
}

/* Legacy CMS embeds and vendor forms carry their own specificity and important
   declarations. Limit the override to action geometry and interaction states.
   Sections retain their layout, button widths and the surrounding whitespace. */
@layer alalaho-actions {
  :where(a.button, a.booking-button, a.booking-button-2, a.button-small, a.brand-button, a.home-pathway-cta,
         [id^="fd-form-"] button.fd-btn, .checkout-grid button.primary) {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: var(--al-cta-height) !important;
    height: auto !important;
    padding: var(--al-cta-pad-y) var(--al-cta-pad-x) !important;
    column-gap: var(--al-cta-gap) !important;
    font: 400 var(--al-cta-type)/1.2 'Value Serif', Value, Georgia, serif !important;
    white-space: normal !important;

    & :is(.button-text, .button-text-2, .brand-button-label, span[data-draw-element="editable"]) {
      min-width: 0 !important;
      font: inherit !important;
      color: inherit !important;
      white-space: normal !important;
      overflow-wrap: break-word;
    }
    & :is(.icon-button-arrow, .icon-button-arrow-2, .brand-button-arrow) {
      width: var(--al-cta-arrow) !important;
      height: auto !important;
      flex: 0 0 var(--al-cta-arrow) !important;
      color: inherit !important;
    }
    & > .code-embed:has(> style:only-child) { display: none !important; }
    &:focus-visible {
      outline: 2px solid var(--al-cta-teal) !important;
      outline-offset: 3px !important;
      box-shadow: 0 0 0 3px white !important;
    }
    @media (forced-colors: active) {
      &:focus-visible { outline-color: Highlight !important; box-shadow: none !important; }
    }
    @media (prefers-reduced-motion: no-preference) {
      & :is(.button-text, .button-text-2, .brand-button-label, span[data-draw-element="editable"], .icon-button-arrow, .icon-button-arrow-2, .brand-button-arrow) {
        transition: transform .25s ease !important;
      }
      &:is(:hover, :focus-visible):not(:disabled, [aria-disabled="true"]) {
        & :is(.button-text, .button-text-2, .brand-button-label, span[data-draw-element="editable"]) { transform: skewX(-8deg) !important; }
        & :is(.icon-button-arrow, .icon-button-arrow-2, .brand-button-arrow) { transform: translateX(.25rem) !important; }
      }
    }
    @media (prefers-reduced-motion: reduce) {
      &, & :is(.button-text, .button-text-2, .brand-button-label, span[data-draw-element="editable"], .icon-button-arrow, .icon-button-arrow-2, .brand-button-arrow) {
        transition: none !important;
        transform: none !important;
      }
    }
  }

  /* A compact pill paints 36px inside its 44px link. The transparent space is
     part of the link, including for outlines and when two actions sit together.
     Navigation already paints this inset using a transparent 4px border. */
  :where(.sticky-nav a.button-small, .retreat_buttons a:is(.booking-button, .button),
         [data-al-rc="chooser"] a.button, a.home-pathway-cta--secondary,
         a.button.is-team:not(.home-pathway-cta), a[data-cta-size="compact"]) {
    position: relative;
    isolation: isolate;
    background: transparent !important;
    border: 0 !important;
    color: var(--al-compact-ink, var(--al-cta-teal)) !important;
    &::before {
      content: '';
      position: absolute;
      inset: .25rem 0;
      z-index: -1;
      pointer-events: none;
      border-radius: 100px;
      border: 1px solid var(--al-compact-edge, currentColor);
      background: var(--al-compact-fill, transparent);
    }
  }
  @media (max-width: 479px) {
    /* Small guide-profile links use the existing underlined name on phones. */
    .button.is-team:not(.home-pathway-cta) { --al-cta-pad-x: 0; }
    .button.is-team:not(.home-pathway-cta)::before { content: none; }
  }

  #whats-included a.booking-button.color-teal:is(:hover, :focus-visible, :active),
  .booking-button-2.color-teal:is(:hover, :focus-visible, :active) { background-color: var(--al-cta-teal) !important; }
  .private-page a.brand-button-small:is(:link, :visited, :hover, :focus-visible, :active) {
    color: var(--al-cta-teal) !important;
    background-color: transparent !important;
    border: 1px solid currentColor !important;
  }
  [data-native-footer] .footer_button-wrap a.booking-button { border-color: transparent !important; }
  .checkout-grid button.primary:not(:disabled):is(:hover, :focus-visible, :active) {
    background-color: var(--al-cta-teal) !important;
    border-color: var(--al-cta-teal) !important;
  }
  [id^="fd-form-"] button.fd-btn {
    background-color: var(--al-signup-fill, var(--al-cta-teal)) !important;
    color: var(--al-signup-ink, white) !important;
    border: 1px solid transparent !important;
    &:is(:hover, :focus-visible, :active):not(:disabled) { opacity: 1 !important; }
    & span[data-draw-element="editable"] { display: inline-block; }
  }
  [id^="fd-form-"] button.fd-btn :is(div, span) { font: inherit !important; }
  [id^="fd-form-"] input.fd-form-control:not([type="hidden"]) { min-height: 2.75rem !important; }
}

:where(.sticky-nav a.button-small, [data-al-rc="chooser"] .retreat-type_block .button,
       .retreat_buttons [data-wf--button--variant="small-button-teal"],
       .retreat_buttons [data-wf--booking-button--variant="teal-small"]) {
  --al-compact-fill: var(--al-cta-teal);
  --al-compact-edge: transparent;
  --al-compact-ink: white;
}
.retreat_buttons [data-wf--booking-button--variant="white-small"] {
  --al-compact-fill: white;
  --al-compact-edge: transparent;
  --al-compact-ink: var(--al-cta-teal);
}
/* On the home photo cards the booking action is filled. Its companion is an
   outline on the same darkened photo. A single overview action stays filled. */
.retreat_buttons.is-home:has(.booking-button) > .button {
  --al-compact-fill: transparent;
  --al-compact-edge: white;
  --al-compact-ink: white;
}

/* The common newsletter form sits on teal. The guide and archive forms sit on light surfaces. */
#fd-form-68e139c599a5c474e192fa9d { --al-signup-fill: white; --al-signup-ink: var(--al-cta-teal); }
