/* Menu inteligente (bottom nav + bottom sheet)
   Extracted from styles.css to keep global styles lean.
*/

:root{
    --bottomnav-space: 76px;
    --sheet-duration: 200ms;
    --sheet-radius: 26px;
  }

  body{
    padding-bottom: calc(var(--bottomnav-space) + env(safe-area-inset-bottom));
  }

  /* Bottom bar */
  .bottomnav-footer{
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;   /* antes z-index: 40; */
    padding: 0 .9rem env(safe-area-inset-bottom);
    background: var(--paper, #ffffff);
    color: #1f2d3a;
    box-shadow: 0 -8px 24px rgba(0,0,0,.12);
    font-size: .9rem;
  }

.bottomnav-footer .bottomnav{
    /* Side buttons keep a safe tap-target width,
       while the center CTA gets the remaining space. */
    --bottomnav-side: clamp(68px, 20vw, 92px);

    display: grid;
    grid-template-columns: var(--bottomnav-side) minmax(0, 1fr) var(--bottomnav-side);
    gap: .55rem;
    align-items: center;
    padding: 8px 0 6px;
    margin: 0;
  }

  .bottomnav-footer .bbtn{
    min-height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(31,58,51,.12);
    background: rgba(31,58,51,.04);
    color: #1f2d3a;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    user-select: none;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
  }

  .bottomnav-footer .bbtn:hover{
    background: rgba(31,58,51,.06);
    border-color: rgba(31,58,51,.16);
  }

  .bottomnav-footer .bbtn--icon:hover{
    background: transparent;
    border-color: transparent;
  }


  .bottomnav-footer .bbtn:active{
    transform: scale(.98);
    opacity: .96;
  }

  .bottomnav-footer .bbtn:focus-visible{
    outline: 3px solid rgba(152, 193, 255, .9);
    outline-offset: 3px;
  }

  /* Side icon buttons */
  .bottomnav-footer .bbtn--icon{
    border: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    padding: 6px 8px;
  }
  .bottomnav-footer .bbtn--icon .bbtn__icon{
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    font-size: 1.15rem;
    line-height: 1;
  }
  .bottomnav-footer .bbtn__label{
    display: block;
    font-size: .72rem;
    line-height: 1.1;
    color: rgba(34,34,34,.65);
    letter-spacing: .02em;
    max-width: 7.5rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Center CTA */
  .bottomnav-footer .bbtn--cta{
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.06);
    color: #fff;
    font-weight: 800;
    letter-spacing: .01em;
    background: linear-gradient(180deg, rgba(255,107,107,1), rgba(255,107,107,.92));}

  .bottomnav-footer .bbtn--cta:hover{
    border-color: rgba(0,0,0,.10);
    background: linear-gradient(180deg, rgba(255,107,107,1), rgba(255,107,107,.88));
  }

  /* CTA text (2 lines) */
  .bottomnav-footer .bbtn__cta-main{
    font-weight: 750;
    font-size: .98rem;
    line-height: 1.02;
  }
  .bottomnav-footer .bbtn__cta-sub{
    font-size: .72rem;
    line-height: 1.02;
    letter-spacing: .02em;
    font-weight: 650;
    color: rgba(255,255,255,.88);
    white-space: nowrap;
  }

  /* Move CTA text up by 3px (without changing button height) */
  .bottomnav-footer .bbtn--cta .bbtn__cta-main,
  .bottomnav-footer .bbtn--cta .bbtn__cta-sub{
    position: relative;
    top: -1px;
  }

  .bottomnav-footer .bbtn--cta:active{
    transform: scale(.985);
    opacity: .98;
  }

  /* Ultra-small screens: give the CTA a tiny bit more breathing room */
  @media (max-width: 360px){
    .bottomnav-footer .bottomnav{ gap: .5rem; }
    .bottomnav-footer .bbtn--cta{
      min-height: 50px;
      padding: 0 14px;
    }
    .bottomnav-footer .bbtn__cta-sub{
      font-size: .70rem;
      letter-spacing: .01em;
    }
  }

  /* Hide bottom bar on desktop (top nav already exists) */
  @media (min-width: 860px){
    body{ padding-bottom: 0; }
    .bottomnav-footer{ display: none; }
  }

  @media (prefers-reduced-motion: reduce){
    .bottomnav-footer *{ transition: none !important; }
  }

  /* Sheet modal */
  .sheet{
    position: fixed;
    top: 0; left: 0; right: 0;
    /* Keep the bottom nav visible/clickable: the sheet stops ABOVE it */
    bottom: calc(var(--bottomnav-space) + env(safe-area-inset-bottom)); /* bottom: calc(var(--bottomnav-space) + env(safe-area-inset-bottom) + 8px); */
    z-index: 70;
    pointer-events: none;
    visibility: hidden;
  }

  .sheet.is-open{
    pointer-events: auto;
    visibility: visible;
  }

  .sheet__backdrop{
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(0,0,0,.36);
    opacity: 0;
    transition: opacity var(--sheet-duration) ease;
  }

  .sheet.is-open .sheet__backdrop{ opacity: 1; }

  .sheet__panel{
    position: absolute;
    left: 0; right: 0; bottom: 0;
    margin: 0;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
    box-shadow: 0 -18px 46px rgba(0,0,0,.18);
    transform: translateY(110%);
    transition: transform var(--sheet-duration) cubic-bezier(.2,.8,.2,1);
    max-height: min(78vh, 640px);
    overflow: auto;
    padding: 12px 12px 14px;
  }

  .sheet.is-open .sheet__panel{ transform: translateY(0); }

  .sheet__header{
    /* Minimal header: no title, no X (close via backdrop / ESC / toggle button). */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px 8px;
  }

  /* Small “grab handle” vibe (premium, non-intrusive) */
  .sheet__header::before{
    content: "";
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(34,34,34,.18);
    opacity: .65;
  }

  /* Legacy elements (if they exist somewhere) */
  .sheet__title,
  .sheet__close{
    display: none !important;
  }

.sheet__list{
    /* iOS/Instagram-like list: no “cards” per row, just subtle separators */
    display: block;
    padding: 0;
    margin: 6px 6px 0;
    background: rgba(34,34,34,.03);
    border: 1px solid rgba(0,0,0,.05);
    border-radius: 18px;
    overflow: hidden;
  }

  .sheet__item{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 16px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .18s ease, opacity .18s ease;
  }

  /* Separator line between rows */
  .sheet__item + .sheet__item{
    border-top: 1px solid rgba(34,34,34,.08);
  }

  .sheet__item:hover{
    background: rgba(34,34,34,.03);
  }

  .sheet__item:active{
    background: rgba(34,34,34,.05);
    opacity: .98;
  }

  .sheet__item:focus-visible{
    outline: 3px solid rgba(152, 193, 255, .9);
    outline-offset: -3px; /* keep focus ring inside (no clipping) */
  }

  /* Buttons should look like links (same row styling) */
  button.sheet__item{
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    text-align: left;
  }

  .sheet__item-left{
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
  }

  .sheet__icon{
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 1.45rem;
    line-height: 1;
    border: 0;
    background: transparent;
  }

  .sheet__label{
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Single-line only (match reference). Keep meta in config, but don’t show it. */
  .sheet__meta{ display: none !important; }

  /* No chevron in this visual style */
  .sheet__chev{ display: none !important; }

  body.is-sheet-open{
    overflow: hidden;
    touch-action: none;
  }

  @media (prefers-reduced-motion: reduce){
    .sheet *{ transition: none !important; }
  }

  /* Step 8 — booking summary bar + child ages */
.bookingSummary[hidden],
.availChildAges[hidden]{
  display:none !important;
}

.bookingSummary{
  display:grid;
  gap:8px;
  padding:8px 0 8px;
  border-bottom:1px solid rgba(31,58,51,.08);
}

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

.bookingSummary__seg{
  min-height:44px;
  padding:8px 12px;
  border-radius:16px;
  border:1px solid rgba(31,58,51,.12);
  background:rgba(31,58,51,.04);
  color:inherit;
  display:grid;
  gap:1px;
  text-align:center;
  transition:transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.bookingSummary__seg:hover{
  background:rgba(152,193,255,.10);
  border-color:rgba(152,193,255,.42);
}

.bookingSummary__seg:active{
  transform:scale(.985);
}

.bookingSummary__seg:focus-visible,
.availChildAges__select:focus-visible{
  outline:3px solid rgba(152,193,255,.9);
  outline-offset:3px;
}

.bookingSummary__seg.is-active{
  background:rgba(152,193,255,.16);
  border-color:rgba(152,193,255,.90);
  box-shadow:none;
}

.bookingSummary__segLabel{
  font-size:.78rem;
  line-height:1.08;
  color:rgba(34,34,34,.68);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.bookingSummary__segPrice{
  font-size:.96rem;
  line-height:1.02;
  font-weight:760;
  letter-spacing:-.01em;
  white-space:nowrap;
}

.bookingSummary__money{
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
}

.bookingSummary__meta{
  display:grid;
  grid-template-columns:repeat(var(--booking-meta-cols, 3), minmax(0, 1fr));
  align-items:center;
  background:rgba(152,193,255,.16);
  border:1px solid rgba(152,193,255,.90);
  border-radius:8px;
  overflow:visible;
  padding:5px 0;
}

.bookingSummary__metaItem{
  min-width:0;
  padding:2px 8px;
  text-align:center;
  font-size:.74rem;
  line-height:1.02;
  color:#1f2d3a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  background:transparent;
}

.bookingSummary__metaItem + .bookingSummary__metaItem{
  border-left:none;
  box-shadow:-1px 0 0 rgba(152,193,255,.40);
}

.bookingSummary__policy{
  display:block;
  margin:0;
  padding:0 4px 8px;
  text-align:center;
  font-size:clamp(.54rem, 2.45vw, .72rem);
  line-height:1.15;
  letter-spacing:-.01em;
  word-spacing:.06em;
  font-weight:500;
  color:rgba(34,34,34,.68);
  white-space:nowrap;
}

.bookingSummary__policy[hidden]{
  display:none !important;
}

.availChildAges{
  margin:12px 0 0;
  padding:12px;
  border-radius:18px;
  border:1px solid rgba(31,58,51,.08);
  background:rgba(31,58,51,.03);
}

.availChildAges__title{
  font-size:.82rem;
  line-height:1.15;
  font-weight:720;
  color:#1f2d3a;
  margin:0 0 10px;
}

.availChildAges__grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

.availChildAges__item{
  display:grid;
  gap:6px;
}

.availChildAges__label{
  font-size:.79rem;
  line-height:1.1;
  color:rgba(34,34,34,.72);
}

.availChildAges__select{
  width:100%;
  min-height:44px;
  border-radius:14px;
  border:1px solid rgba(31,58,51,.12);
  background:#fff;
  color:#1f2d3a;
  font:inherit;
  padding:0 12px;
  -webkit-appearance:none;
  appearance:none;
}

.availChildAges__hint{
  margin:10px 0 0;
  font-size:.75rem;
  line-height:1.2;
  color:rgba(34,34,34,.62);
}

@media (min-width: 560px){
  .availChildAges__grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px){
  .bookingSummary__seg{
    min-height:48px;
    padding:7px 10px;
  }

  .bookingSummary__segLabel,
  .bookingSummary__metaItem{
    font-size:.71rem;
  }

  .bookingSummary__moneyValue{
    font-size:1rem;
  }
}

/* Desktop: larger text in booking summary to fill available space */
@media (min-width: 860px){
  .bookingSummary__metaItem{
    font-size:1.1rem;
  }

  .bookingSummary__segLabel{
    font-size:1rem;
  }

  .bookingSummary__segPrice{
    font-size:1.22rem;
  }
}

/* ===== Puerto Viejo Love — package selector (date widget) ===== */
/* Reuses the bookingSummary__seg design (room-type style) for 4 packages. */
.pkgPick{
  display:block;
  margin: 4px 0 12px;
}
.bookingSummary__selLegend{
  font-size:.82rem;
  font-weight:700;
  color:rgba(34,34,34,.72);
  margin:0 0 8px;
}
/* 2x2 grid keeps each chip at the size shown in the room-type design. */
.pkgPick .bookingSummary__selector{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}
/* Badge "Most popular" on the Picnic chip. */
.bookingSummary__seg{ position:relative; }
.bookingSummary__segBadge{
  position:absolute;
  top:-9px;
  left:50%;
  transform:translateX(-50%);
  white-space:nowrap;
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:#1f3a33;
  background:#ffd84d;
  border-radius:999px;
  padding:2px 8px;
  box-shadow:0 1px 2px rgba(0,0,0,.12);
}
/* Give the badge room so it doesn't overlap the label. */
.bookingSummary__seg:has(.bookingSummary__segBadge){
  padding-top:14px;
}

/* Puerto Viejo Love — extra toggle button "on" state. */
.avail__extras .step__btn.is-on{
  background:rgba(152,193,255,.18);
  border-color:rgba(152,193,255,.90);
  font-weight:800;
}

/* ===== Puerto Viejo Love — extras rows + Total block ===== */
.avail__extras{
  display:grid;
  gap:8px;
  margin:12px 0;
}
.avail__extras .step{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 12px;
  border:1px solid rgba(31,58,51,.12);
  border-radius:14px;
  background:rgba(255,255,255,.6);
}
.avail__extras .step__k{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:.9rem;
}
.avail__extras .step__btn{
  min-width:84px;
  min-height:38px;
  padding:6px 14px;
  border-radius:999px;
  border:1px solid rgba(31,58,51,.18);
  background:rgba(31,58,51,.04);
  font-weight:700;
  cursor:pointer;
  transition:background .18s ease, border-color .18s ease, transform .12s ease;
}
.avail__extras .step__btn:active{ transform:scale(.97); }

.avail__total{
  margin:14px 0 12px;
  padding:14px 16px;
  border-radius:16px;
  background:rgba(152,193,255,.12);
  border:1px solid rgba(152,193,255,.45);
}
.avail__totalRow{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}
.avail__totalLabel{
  font-size:.95rem;
  font-weight:700;
  color:rgba(34,34,34,.7);
}
.avail__totalValue{
  font-size:1.5rem;
  font-weight:850;
  letter-spacing:-.02em;
  color:#1f3a33;
}
.avail__deposit{
  margin:6px 0 0;
}
