/* Mi Estancia 1.1.6 · Visita virtual 360° (features/tour.js) y buscador «¿Te apetece volver?» (features/rebook.js). */

/* ---------- Tarjeta de la visita en «Mi alojamiento» ---------- */
.tour-card { display: grid; grid-template-columns: 1fr auto; width: 100%; padding: 0; border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-md); text-align: left; font: inherit; cursor: pointer; margin-bottom: var(--space-4); }
.tour-card__media { position: relative; grid-column: 1 / -1; display: block; height: 196px; background: #d9cdb8 center / cover no-repeat; }
.tour-card__badge { position: absolute; top: var(--space-3); left: var(--space-3); padding: 6px 10px; border-radius: var(--radius-pill); background: rgba(20, 24, 20, .72); color: #fff; font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; }
.tour-card__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--color-brand); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.tour-card__play svg { width: 30px; height: 30px; }
.tour-card__text { display: grid; gap: 2px; padding: 14px var(--space-4); }
.tour-card__text strong { font-size: var(--text-md); }
.tour-card__text small { font-size: var(--text-sm); color: var(--color-muted); }
.tour-card__go { align-self: center; margin-right: var(--space-4); padding: 10px 14px; border-radius: var(--radius-pill); background: var(--color-brand); color: var(--color-on-brand); font-size: var(--text-sm); font-weight: 600; }

/* ---------- Visor y buscador a pantalla completa ---------- */
body.has-tour { overflow: hidden; }
.tour, .rebook-sheet { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; font-family: var(--font-ui); }
.tour { background: #101410; color: #fff; }
.tour__stage { position: absolute; inset: 0; }
.tour__cover { position: absolute; inset: 0; display: grid; place-items: center; background: #1b211b center / cover no-repeat; }
.tour__cover[hidden] { display: none; }
.tour__loading { max-width: 300px; padding: 10px 16px; border-radius: var(--radius-md); background: rgba(16, 20, 16, .78); color: #fff; font-size: var(--text-sm); text-align: center; line-height: 1.4; }
.tour__bar { position: relative; z-index: 2; display: flex; align-items: center; gap: var(--space-3); padding: calc(var(--space-3) + env(safe-area-inset-top)) var(--space-4) var(--space-3); background: rgba(16, 20, 16, .66); }
.tour__title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tour__title strong { font-size: var(--text-md); }
.tour__title span { font-size: var(--text-sm); color: #d7ddd2; }
.tour__btn { flex: none; display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; }
.tour__btn svg, .tour__btn .icon { width: 20px; height: 20px; }
.tour__fs { position: absolute; z-index: 2; right: var(--space-4); top: calc(84px + env(safe-area-inset-top)); background: rgba(16, 20, 16, .66); }
.tour__link { display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: rgba(16, 20, 16, .45); color: #fff; cursor: pointer; }
.tour__link svg { width: 26px; height: 26px; }
.tour__foot { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; gap: var(--space-3); padding: var(--space-3) 0 calc(var(--space-4) + env(safe-area-inset-bottom)); background: rgba(16, 20, 16, .72); }
.tour__hint { padding: 0 var(--space-4); font-size: 13px; color: #d7ddd2; text-align: center; }
.tour__rooms { display: flex; gap: var(--space-2); padding: 0 var(--space-4); overflow-x: auto; }
.tour__rooms[hidden] { display: none; }
.tour__room { flex: none; min-height: var(--tap); padding: 0 var(--space-4); border: 1px solid rgba(255, 255, 255, .5); border-radius: var(--radius-pill); background: transparent; color: #fff; font: inherit; font-size: var(--text-sm); cursor: pointer; }
.tour__room.is-on { border-color: #fff; background: #fff; color: var(--color-text); font-weight: 600; }
@media (orientation: landscape) and (max-height: 500px) {
  .tour__hint { display: none; }
  .tour__fs { top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ---------- Buscador de la portada ---------- */
.rebook { display: grid; gap: var(--space-3); padding: var(--space-4); border-radius: 16px; background: var(--color-brand-soft); border: 1px solid #cfdccd; }
.rebook__head { display: grid; gap: 2px; }
.rebook__head small { font-size: 13px; color: #4a5a4d; }
.rebook__head h2 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--color-text); }
.rebook__box { display: grid; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); overflow: hidden; }
.rebook__row { display: flex; align-items: center; gap: var(--space-3); min-height: 58px; padding: 0 14px; border: 0; background: transparent; color: var(--color-text); font: inherit; text-align: left; cursor: pointer; }
.rebook__row + .rebook__row { border-top: 1px solid var(--color-border); }
.rebook__ico svg, .rebook__go svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rebook__ico { color: var(--color-brand); }
.rebook__txt { display: grid; gap: 2px; min-width: 0; }
.rebook__txt b { font-size: var(--text-xs); }
.rebook__txt span { font-size: 15px; color: var(--color-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rebook__txt span.is-set { color: var(--color-text); }
.rebook__go { display: flex; align-items: center; justify-content: center; gap: var(--space-2); }

/* ---------- Hoja del buscador y motor ---------- */
.rebook-sheet { background: var(--color-bg); color: var(--color-text); }
.rebook-sheet__bar { display: flex; align-items: center; gap: var(--space-3); padding: calc(var(--space-3) + env(safe-area-inset-top)) var(--space-4) var(--space-3); background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.rebook-sheet__bar h2 { flex: 1; margin: 0; font-family: var(--font-display); font-size: var(--text-lg); }
.rebook-sheet .tour__btn { background: var(--color-surface-muted); color: var(--color-text); border: 1px solid var(--color-border); }
.rebook-sheet .tour__btn[hidden] { display: none; }
.rebook-sheet__body { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: var(--space-5); width: 100%; max-width: var(--shell-max); margin: 0 auto; padding: var(--space-4); box-sizing: border-box; }
.rebook-sheet__body[hidden], .rebook-sheet__foot[hidden], .rebook-sheet__motor[hidden] { display: none; }
.rebook-sheet__foot { width: 100%; max-width: var(--shell-max); margin: 0 auto; padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom)); box-sizing: border-box; }
.rebook-sheet__motor { position: relative; flex: 1; display: flex; background: #fff; }
.rebook-sheet__frame { flex: 1; width: 100%; border: 0; }
.rebook-sheet__loading { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); padding: 10px 16px; border-radius: var(--radius-md); background: var(--color-surface-muted); color: var(--color-muted); font-size: var(--text-sm); }
.rebook-sheet__loading[hidden] { display: none; }
.rb-field, .rb-block { display: grid; gap: var(--space-2); }
.rb-label { font-size: var(--text-sm); font-weight: 700; }
.rb-field select, .rb-age select { width: 100%; min-height: var(--control-height); padding: 0 var(--space-3); border: 1px solid var(--color-border-strong); border-radius: 10px; background: var(--color-surface); color: var(--color-text); font: inherit; }
.rb-cal { padding: var(--space-3); border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.rb-cal__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2); }
.rb-cal__month { text-transform: capitalize; }
.rb-cal__nav { width: var(--tap); height: var(--tap); border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-surface); color: var(--color-text); font-size: 22px; line-height: 1; cursor: pointer; }
.rb-cal__nav:disabled { opacity: .35; cursor: default; }
.rb-cal__wd, .rb-cal__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.rb-cal__wd span { padding: 4px 0 8px; font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); text-align: center; text-transform: uppercase; }
.rb-cal__d { position: relative; height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--color-text); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.rb-cal__d:disabled { color: #c9c4bd; cursor: default; }
.rb-cal__d.is-today { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.rb-cal__d.in-range { border-radius: 0; background: var(--color-brand-soft); }
.rb-cal__d.is-start, .rb-cal__d.is-end { background: var(--color-brand); color: var(--color-on-brand); font-weight: 700; }
.rb-cal__sum { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.rb-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.rb-row b, .rb-row small { display: block; }
.rb-row small { font-size: 13px; color: var(--color-muted); }
.rb-step { display: flex; align-items: center; gap: 14px; }
.rb-step button { width: var(--tap); height: var(--tap); border: 1px solid var(--color-border-strong); border-radius: 50%; background: var(--color-surface); color: var(--color-text); font-size: 20px; line-height: 1; cursor: pointer; }
.rb-step button:disabled { opacity: .3; cursor: default; }
.rb-step output { min-width: 20px; text-align: center; font-weight: 700; }
.rb-ages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); padding-top: var(--space-3); }
.rb-age { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.rb-age select.is-bad { border-color: var(--color-danger); box-shadow: 0 0 0 3px var(--color-danger-soft); }
.rb-msg { margin: 0; padding: 10px 14px; border-radius: var(--radius-md); background: var(--color-warning-soft); color: var(--color-warning); font-size: var(--text-sm); }
.rb-msg[hidden] { display: none; }
