/* ==========================================================================
   Capa responsive estable para el portal de reservas
   Esta hoja se carga al final y reemplaza las compactaciones mÃ³viles histÃ³ricas.
   ========================================================================== */

:root {
  --booking-mobile-bar-h: 62px;
  --booking-content-max: 1180px;
  --booking-page-gutter: clamp(0.7rem, 3vw, 1.25rem);
  --booking-touch-target: 44px;
}
html {
  min-width: 320px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
  touch-action: manipulation;
}

img {
  max-width: 100%;
}

.tracker-mobile-status {
  display: none;
}

/* Reservar el espacio de las imÃ¡genes evita saltos mientras llegan por red. */
.header-logo-img {
  aspect-ratio: 227 / 39;
}

.room-img-container {
  aspect-ratio: 4 / 3;
}

.room-card-img {
  aspect-ratio: 4 / 3;
}

.room-card-img,
#lightbox-img {
  background: linear-gradient(110deg, #f1efe9 8%, #faf9f5 18%, #f1efe9 33%);
  background-size: 200% 100%;
}

/* ==========================================================================
   MÃ³vil y tablet: una pÃ¡gina, un solo scroll
   ========================================================================== */

@media (max-width: 899px) {
  html,
  body {
    width: 100%;
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    user-select: auto;
    -webkit-user-select: auto;
  }

  .hotel-header {
    position: sticky;
    top: 0;
    height: 50px;
    min-height: 50px;
    padding: 0 var(--booking-page-gutter);
    background: rgba(253, 251, 247, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 800;
  }

  .header-brand {
    max-width: min(62vw, 190px);
  }

  .header-logo-img {
    width: auto;
    height: 30px;
    max-width: 100%;
  }

  .back-to-home {
    min-height: var(--booking-touch-target);
    padding: 0 0.15rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  .booking-portal {
    flex: 1 0 auto !important;
    width: 100%;
    max-width: 680px;
    min-height: 0;
    margin: 0 auto;
    padding: 0.65rem var(--booking-page-gutter)
      calc(var(--booking-mobile-bar-h) + 1.2rem + env(safe-area-inset-bottom, 0px)) !important;
    gap: 0.65rem !important;
    overflow: visible !important;
  }

  .step-tracker {
    display: block !important;
    min-height: 52px;
    padding: 0.65rem 0.85rem !important;
    overflow: hidden;
  }

  .tracker-mobile-status {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
  }

  .tracker-mobile-current {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .tracker-mobile-label {
    min-width: 0;
    color: var(--hotel-primary);
    font-size: 0.8rem;
    font-weight: 700;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .step-tracker .tracker-step {
    display: none !important;
  }

  .step-tracker-line,
  .step-tracker-progress {
    right: 0.85rem;
    bottom: 0;
    left: 0.85rem;
    height: 3px;
    border-radius: 99px;
  }

  .wizard-column {
    display: block;
    width: 100%;
    min-height: 0;
  }

  .wizard-card {
    width: 100%;
    min-height: 0 !important;
    padding: 0.9rem clamp(0.8rem, 3.5vw, 1.15rem) !important;
    border-radius: 10px !important;
    overflow: visible !important;
    box-shadow: 0 10px 28px rgba(14, 34, 61, 0.1);
  }

  .wizard-card.active {
    display: flex;
  }

  .wizard-header {
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.55rem !important;
  }

  .wizard-title {
    gap: 0.4rem;
    margin: 0 !important;
    font-size: clamp(1.12rem, 5.2vw, 1.35rem) !important;
    line-height: 1.12;
  }

  .wizard-title span {
    flex: 0 0 auto;
    font-size: 1.15rem !important;
  }

  .wizard-subtitle {
    display: block !important;
    margin: 0.25rem 0 0 !important;
    color: var(--text-secondary);
    font-size: 0.76rem !important;
    line-height: 1.42;
  }

  .wizard-body,
  #wizard-step-4 .wizard-body,
  #wizard-step-5 .wizard-body,
  .rooms-grid {
    flex: none;
    min-height: 0;
    margin-bottom: 0.65rem;
    overflow: visible !important;
    overscroll-behavior: auto;
  }

  .wizard-footer {
    position: sticky;
    bottom: calc(var(--booking-mobile-bar-h) + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    width: calc(100% + clamp(1.6rem, 7vw, 2.3rem));
    margin: 0 clamp(-1.15rem, -3.5vw, -0.8rem) -0.9rem;
    padding: 0.65rem clamp(0.8rem, 3.5vw, 1.15rem)
      calc(0.65rem + env(safe-area-inset-bottom, 0px)) !important;
    gap: 0.55rem !important;
    background: rgba(253, 251, 247, 0.97);
    border-top: 1px solid rgba(14, 34, 61, 0.1);
    box-shadow: 0 -8px 20px rgba(14, 34, 61, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .wizard-footer > .btn {
    min-width: 0;
    min-height: var(--booking-touch-target);
    padding: 0.65rem 0.85rem !important;
    font-size: 0.73rem !important;
    line-height: 1.2;
    letter-spacing: 0.07em;
    text-align: center;
  }

  .wizard-footer > .btn:last-child {
    margin-left: auto;
  }

  #wizard-step-5 .wizard-footer {
    align-items: stretch;
  }

  #wizard-step-5 .wizard-footer .btn-whatsapp {
    flex: 1;
  }

  /* Los controles de formulario usan 16px para evitar zoom automÃ¡tico en iOS. */
  .input-field,
  select.input-field,
  textarea.input-field,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="time"] {
    min-height: var(--booking-touch-target);
    padding: 0.62rem 0.7rem !important;
    font-size: 16px !important;
    line-height: 1.25;
  }

  .input-label {
    margin-bottom: 0.12rem !important;
    font-size: 0.7rem !important;
    line-height: 1.3;
  }

  .form-grid,
  #panel-basic-details {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.72rem !important;
  }

  .form-grid .input-group.full-width,
  #panel-basic-details {
    grid-column: 1 !important;
  }

  textarea.input-field {
    min-height: 88px;
    resize: vertical;
  }

  /* Paso 1: calendario que realmente cabe desde 320px. */
  .date-selection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.7rem;
  }

  .date-selection-grid .input-field {
    min-width: 0;
    padding-right: 0.25rem !important;
    padding-left: 0.25rem !important;
    font-size: clamp(0.78rem, 3.7vw, 0.92rem) !important;
    overflow-wrap: anywhere;
  }

  .calendar-wrapper {
    min-height: 0;
    justify-content: flex-start;
    padding: 0.7rem 0.45rem 0.55rem;
  }

  .calendar-header-nav {
    margin-bottom: 0.55rem;
    padding: 0 0.1rem;
  }

  .calendar-nav-btn,
  .counter-btn,
  .mobile-summary-close,
  .lightbox-close,
  .flight-modal-close,
  .extras-overlay-close {
    min-width: var(--booking-touch-target);
    min-height: var(--booking-touch-target);
  }

  .calendar-nav-btn {
    width: var(--booking-touch-target);
    height: var(--booking-touch-target);
  }

  .calendar-month-title {
    font-size: 0.92rem !important;
  }

  .calendar-weekdays {
    margin-bottom: 0.25rem;
    font-size: clamp(0.55rem, 2.6vw, 0.65rem);
  }

  .calendar-days {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
  }

  .cal-day,
  .cal-day.limited {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 40px;
    aspect-ratio: 1;
    margin: 0;
    padding: 2px !important;
    border-radius: 8px !important;
    font-size: clamp(0.7rem, 3.3vw, 0.82rem) !important;
  }

  .cal-day.limited .cal-day-num {
    font-size: clamp(0.7rem, 3.2vw, 0.82rem) !important;
  }

  .cal-day.limited .cal-day-label {
    font-size: clamp(0.46rem, 2.2vw, 0.56rem) !important;
  }

  /* Paso 2: controles claros, sin expansiÃ³n innecesaria. */
  .guests-container {
    justify-content: flex-start;
    gap: 0.7rem;
  }

  .guest-row {
    min-height: 76px;
    padding: 0.8rem 0.85rem;
  }

  .guest-title {
    font-size: 0.94rem;
  }

  .guest-desc {
    font-size: 0.72rem;
  }

  .counter-controls {
    gap: 0.7rem;
  }

  .counter-btn {
    width: var(--booking-touch-target);
    height: var(--booking-touch-target);
    font-size: 1.1rem;
  }

  /* Paso 3: tarjetas legibles con imÃ¡genes reservadas y sin scroll anidado. */
  .rooms-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0;
  }

  .room-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 104px !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
  }

  .mobile-summary-toggle {
    position: fixed !important;
    right: 0;
    bottom: 0;
    left: 0;
  }

  .room-img-container {
    width: 104px !important;
    min-height: 104px;
    align-self: stretch;
  }

  .room-details {
    min-width: 0;
    height: auto;
    padding: 0.72rem 2.2rem 0.72rem 0.75rem;
    align-items: center;
  }

  .room-header {
    align-items: center;
    gap: 0.45rem;
  }

  .room-title {
    font-size: 1rem !important;
    line-height: 1.12;
  }

  .room-specs {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin-top: 0.3rem;
  }

  .room-spec-item {
    font-size: 0.65rem;
  }

  .room-price-info {
    min-width: 54px;
    font-size: 0.75rem !important;
  }

  .room-price {
    font-size: 0.98rem;
  }

  .room-select-badge {
    right: 0.62rem;
    width: 20px;
    height: 20px;
  }

  .room-card.unavailable::after {
    right: 0.65rem;
    max-width: calc(100% - 130px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Resumen inferior: Ãºnico elemento fijo, con espacio reservado en la pÃ¡gina. */
  .mobile-summary-toggle {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 500;
    min-height: var(--booking-mobile-bar-h);
    padding: 0.55rem max(var(--booking-page-gutter), env(safe-area-inset-left, 0px))
      calc(0.55rem + env(safe-area-inset-bottom, 0px))
      max(var(--booking-page-gutter), env(safe-area-inset-right, 0px));
    background: rgba(253, 251, 247, 0.98);
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: 0 -8px 24px rgba(14, 34, 61, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .mobile-summary-cost {
    font-size: 1rem;
  }

  .mobile-view-details-btn {
    min-height: 40px;
    padding: 0.45rem 0.75rem;
  }

  .mobile-summary-modal {
    max-height: min(84dvh, 720px);
    padding: 1rem var(--booking-page-gutter)
      calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .reservation-legal-footer {
    flex: 0 0 auto;
    width: 100%;
    padding: 1.2rem var(--booking-page-gutter)
      calc(var(--booking-mobile-bar-h) + 1.25rem + env(safe-area-inset-bottom, 0px)) !important;
    font-size: 0.7rem !important;
    line-height: 1.65 !important;
  }

  .reservation-legal-footer a,
  .reservation-legal-footer span {
    line-height: inherit !important;
  }

  .whatsapp-float {
    right: 0.75rem !important;
    bottom: calc(var(--booking-mobile-bar-h) + 0.8rem + env(safe-area-inset-bottom, 0px)) !important;
    width: 48px !important;
    height: 48px !important;
  }

  /* Modales y overlays respetan el viewport Ãºtil y las Ã¡reas seguras. */
  .custom-modal-overlay,
  .tp-modal-overlay,
  .vip-wa-overlay,
  .loading-overlay,
  .flight-inline-details {
    padding: max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px)) !important;
  }

  .custom-modal-content,
  .tp-modal-card,
  .vip-wa-modal,
  .flight-modal-card,
  .extras-overlay-panel {
    width: 100%;
    max-width: 560px;
    max-height: calc(100dvh - 1.5rem);
  }

  .custom-modal-content {
    padding: 1.25rem;
  }

  .payment-method-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem !important;
  }

  .payment-option-card {
    min-width: 0;
    min-height: var(--booking-touch-target);
  }

  .lightbox {
    padding:
      max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
  }

  #lightbox-img {
    width: min(100%, 960px);
    height: auto;
    max-height: calc(100dvh - 7rem);
    object-fit: contain;
  }
}

/* ==========================================================================
   Fold cerrado y mÃ³viles extremadamente angostos
   ========================================================================== */

@media (max-width: 359px) {
  :root {
    --booking-page-gutter: 0.55rem;
    --booking-mobile-bar-h: 58px;
  }

  .hotel-header {
    height: 46px;
    min-height: 46px;
  }

  .header-brand {
    max-width: 62vw;
  }

  .header-logo-img {
    height: 26px;
  }

  .back-to-home {
    font-size: 0;
  }

  .back-to-home .material-symbols-outlined {
    font-size: 1.15rem;
  }

  .step-tracker {
    min-height: 48px;
    padding: 0.58rem 0.7rem !important;
  }

  .tracker-mobile-current {
    font-size: 0.62rem;
  }

  .tracker-mobile-label {
    font-size: 0.72rem;
  }

  .wizard-card {
    padding: 0.78rem 0.68rem !important;
  }

  .wizard-title {
    font-size: 1.08rem !important;
  }

  .wizard-subtitle {
    font-size: 0.71rem !important;
  }

  .wizard-footer {
    width: calc(100% + 1.36rem);
    margin-right: -0.68rem;
    margin-left: -0.68rem;
    padding-right: 0.68rem !important;
    padding-left: 0.68rem !important;
  }

  .wizard-footer > .btn {
    min-height: 42px;
    padding: 0.58rem 0.55rem !important;
    font-size: 0.67rem !important;
    letter-spacing: 0.045em;
  }

  .wizard-footer > .btn .material-symbols-outlined {
    font-size: 0.9rem;
  }

  .date-selection-grid {
    gap: 0.35rem;
  }

  .date-selection-grid .input-label {
    font-size: 0.6rem !important;
  }

  .date-selection-grid .input-field {
    font-size: 0.72rem !important;
  }

  .calendar-wrapper {
    padding-right: 0.25rem;
    padding-left: 0.25rem;
  }

  .calendar-weekdays {
    font-size: 0.52rem;
  }

  .calendar-days {
    gap: 1px;
  }

  .cal-day,
  .cal-day.limited {
    min-height: 38px;
    border-radius: 7px !important;
  }

  .guest-row {
    min-height: 72px;
    padding: 0.7rem;
  }

  .guest-title {
    font-size: 0.88rem;
  }

  .counter-controls {
    gap: 0.42rem;
  }

  .counter-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .room-card {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 96px !important;
  }

  .room-img-container {
    width: 88px !important;
    min-height: 96px;
  }

  .room-details {
    padding: 0.6rem 1.95rem 0.6rem 0.6rem;
  }

  .room-header {
    display: block;
  }

  .room-title {
    font-size: 0.9rem !important;
  }

  .room-price-info {
    margin-top: 0.35rem;
    text-align: left;
  }

  .room-price {
    display: inline;
    font-size: 0.9rem;
  }

  .room-price-desc {
    display: inline;
    margin-left: 0.2rem;
  }

  .payment-method-selector {
    grid-template-columns: minmax(0, 1fr);
  }

  #wizard-step-5 .wizard-footer {
    flex-direction: column-reverse;
  }

  .mobile-summary-toggle {
    min-height: var(--booking-mobile-bar-h);
    padding-top: 0.4rem;
    padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
  }

  .mobile-summary-label {
    font-size: 0.52rem;
  }

  .mobile-summary-cost {
    font-size: 0.9rem;
  }

  .mobile-view-details-btn {
    min-height: 38px;
    padding: 0.4rem 0.6rem;
    font-size: 0.6rem;
  }

  .whatsapp-float {
    width: 44px !important;
    height: 44px !important;
  }
}

@media (max-width: 899px) {
  .mobile-back-action[hidden] {
    display: flex !important;
    visibility: hidden;
    pointer-events: none;
  }

  #foreign-country-container[hidden] {
    display: none !important;
  }
}

@media (max-width: 430px) {
  #panel-basic-details > .input-group:not(:first-child) > .input-label {
    display: flex;
    align-items: flex-end;
    min-height: 1.35rem;
  }

  #foreign-country-container {
    grid-column: 1 / -1 !important;
  }
}

/* ==========================================================================
   Asistente móvil en un solo viewport: el documento no conserva scroll
   ========================================================================== */

@media (max-width: 899px) {
  html,
  body {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  body {
    height: 100dvh !important;
    display: flex;
    flex-direction: column;
  }

  .hotel-header {
    position: relative;
    flex: 0 0 auto;
  }

  .booking-portal {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr);
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .step-tracker {
    flex: 0 0 auto;
  }

  .wizard-column {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .wizard-card,
  .wizard-card.active {
    width: 100%;
    height: 100%;
    min-height: 0 !important;
    max-height: 100%;
    overflow: hidden !important;
  }

  .wizard-card.active {
    display: flex;
    flex-direction: column;
  }

  .wizard-header {
    flex: 0 0 auto;
  }

  .wizard-body,
  #wizard-step-4 .wizard-body,
  #wizard-step-5 .wizard-body,
  .rooms-grid {
    min-height: 0;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .wizard-body::-webkit-scrollbar,
  .rooms-grid::-webkit-scrollbar {
    display: none;
  }

  #wizard-step-1 .wizard-body,
  #wizard-step-2 .wizard-body,
  #wizard-step-3 .wizard-body {
    overflow: hidden !important;
  }

  #wizard-step-3 .wizard-body {
    display: flex;
    flex-direction: column;
  }

  #wizard-step-3 .rooms-grid {
    display: grid;
    grid-template-rows: repeat(4, auto);
    flex: 1 1 auto;
    align-content: start;
    overflow: hidden !important;
  }

  #wizard-step-4 .wizard-body,
  #wizard-step-5 .wizard-body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .reservation-legal-footer {
    display: none !important;
  }

  .btn,
  .mobile-back-action,
  .mobile-view-details-btn,
  .mobile-primary-action,
  .counter-btn,
  .qty-btn {
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 430px) {
  #panel-basic-details {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-content: start;
  }

  #panel-basic-details > .input-group {
    min-width: 0;
    grid-column: auto !important;
  }

  #panel-basic-details > .input-group:first-child,
  #panel-basic-details > #cedula-search-container {
    grid-column: 1 / -1 !important;
  }

  #panel-basic-details > .input-group:first-child > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #panel-basic-details .radio-label {
    min-width: 0;
  }

  #panel-basic-details .input-field {
    width: 100%;
    min-width: 0;
  }
}

/* En alturas normales el formulario cabe completo; el scroll interno solo
   queda como red de seguridad al abrir el teclado o en landscape. */
@media (max-width: 899px) and (min-height: 650px) {
  #wizard-step-4 .wizard-body {
    overflow-y: hidden !important;
  }
}

@media (max-width: 359px) {
  #panel-basic-details {
    gap: 0.4rem !important;
  }

  #panel-basic-details .radio-label {
    padding-right: 0.4rem;
    padding-left: 0.4rem;
    font-size: 0.7rem !important;
  }
}

/* Teclado abierto, landscape y telÃ©fonos de poca altura. */
@media (max-width: 899px) and (max-height: 620px) {
  .hotel-header {
    position: relative;
  }

  .wizard-footer {
    position: static;
  }

  .mobile-summary-toggle {
    position: static;
    margin-top: 0.65rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: none;
  }

  .booking-portal {
    padding-bottom: 0.75rem !important;
  }

  .reservation-legal-footer {
    padding-bottom: 1.25rem !important;
  }

  .whatsapp-float {
    bottom: 0.75rem !important;
  }
}

/* Ronda de estabilidad móvil: evita recortes, campos angostos y overlays
   sobredimensionados sin alterar la identidad cromática de cada hotel. */
#success-overlay {
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#success-overlay .success-overlay-card {
  width: min(440px, calc(100vw - 2rem)) !important;
  max-width: 440px !important;
  max-height: min(680px, calc(100dvh - 2rem));
  padding: 0 !important;
  gap: 0 !important;
  align-items: stretch;
  overflow: hidden;
  text-align: left;
}

#success-overlay .success-overlay-header {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg-primary);
}

#success-overlay .success-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-width: 0;
}

#success-overlay .success-logo-img {
  width: 38px !important;
  min-width: 38px;
  max-width: 38px !important;
  height: 38px !important;
}

#success-overlay .success-title-block {
  min-width: 0;
}

#success-overlay .success-title-block h3 {
  margin: 0;
  color: var(--hotel-primary);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.15;
}

#success-overlay .success-title-block p {
  margin: 0.14rem 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#success-overlay .success-overlay-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.62rem;
  padding: 1rem;
  overflow-y: auto;
  text-align: center;
}

#success-overlay .success-check-circle {
  width: 52px !important;
  height: 52px !important;
  margin: 0 auto !important;
  flex: 0 0 52px;
}

#success-overlay .success-check-circle span {
  font-size: 2.1rem !important;
}

#success-overlay .success-overlay-kicker {
  margin: 0;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.2;
}

#success-overlay .success-overlay-title {
  margin: 0;
  font-size: 1rem !important;
  line-height: 1.18;
  text-align: center;
}

#success-overlay .success-overlay-desc {
  max-width: 38ch;
  margin: 0;
  font-size: 0.78rem !important;
  line-height: 1.4 !important;
}

#success-overlay .success-overlay-divider {
  margin: 0.08rem 0;
}

#success-overlay .success-overlay-meta {
  gap: 0.28rem !important;
  font-size: 0.72rem !important;
  line-height: 1.35;
  text-align: center;
}

#success-overlay .success-redirect-msg {
  font-size: 0.7rem !important;
}

#success-overlay .success-overlay-action {
  width: 100%;
  min-height: 44px !important;
  margin-top: 0.08rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.7rem !important;
  letter-spacing: 0.08em !important;
}

@media (max-width: 430px) {
  #wizard-step-3 .rooms-grid {
    gap: 0.38rem;
  }

  #wizard-step-3 .room-card:not(.selected) .room-amenities-list {
    display: none !important;
  }

  #wizard-step-3 .room-card.selected {
    min-height: 128px !important;
  }

  #wizard-step-3 .room-card.selected .room-img-container {
    min-height: 128px;
  }

  #wizard-step-3 .room-card.selected .room-details {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  #wizard-step-3 .room-card.selected .room-header > div:first-child {
    min-width: 0;
  }

  #wizard-step-3 .room-card.selected .room-amenities-list {
    display: flex !important;
    max-height: none !important;
    margin-top: 0.24rem;
    gap: 0.12rem 0.16rem;
    overflow: visible !important;
  }

  #wizard-step-3 .room-card.selected .room-amenity-badge {
    min-height: 15px;
    padding: 0.02rem 0.22rem;
    font-size: 0.47rem;
    line-height: 1.05;
    white-space: nowrap;
  }

  #wizard-step-3 .room-card.selected .room-amenity-badge span {
    font-size: 0.62rem;
  }

  #wizard-step-3 .room-card.selected .room-price-info {
    position: static;
    margin-top: 0.24rem;
  }

  #wizard-step-3 .room-card.selected .room-qty-selector {
    min-height: 30px;
    margin-top: 0.2rem !important;
  }

  #wizard-step-3 .room-card.selected .room-qty-selector .qty-btn {
    min-width: 30px;
    min-height: 30px;
  }

  #panel-basic-details {
    gap: 0.38rem 0.46rem !important;
  }

  #panel-basic-details > .input-group.mobile-wide-field {
    grid-column: 1 / -1 !important;
  }

  #panel-basic-details > .input-group:first-child > div {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.3rem !important;
  }

  #panel-basic-details .radio-label {
    min-height: 34px;
    padding: 0.34rem 0.42rem;
    gap: 0.3rem !important;
    font-size: 0.67rem !important;
    line-height: 1.12;
  }

  #panel-basic-details .radio-label input[type="radio"] {
    width: 14px !important;
    height: 14px !important;
    flex-basis: 14px;
  }

  #panel-basic-details .input-label {
    font-size: 0.58rem !important;
    line-height: 1.12;
  }

  #panel-basic-details .input-field {
    min-height: 40px !important;
    padding: 0.42rem 0.52rem !important;
    font-size: 16px !important;
    line-height: 1.1;
  }

  #panel-basic-details .input-field::placeholder {
    font-size: 0.76rem;
  }

  #success-overlay {
    padding: max(0.55rem, env(safe-area-inset-top, 0px))
      max(0.55rem, env(safe-area-inset-right, 0px))
      max(0.55rem, env(safe-area-inset-bottom, 0px))
      max(0.55rem, env(safe-area-inset-left, 0px));
  }

  #success-overlay .success-overlay-card {
    width: min(390px, calc(100vw - 1.1rem)) !important;
    max-height: calc(100dvh - 1.1rem);
    border-radius: 12px;
  }

  #success-overlay .success-overlay-header {
    min-height: 56px;
    padding: 0.65rem 0.75rem;
  }

  #success-overlay .success-logo-img {
    width: 34px !important;
    min-width: 34px;
    max-width: 34px !important;
    height: 34px !important;
    font-size: 11px !important;
  }

  #success-overlay .success-title-block h3 {
    font-size: 0.76rem !important;
  }

  #success-overlay .success-title-block p {
    font-size: 0.62rem !important;
  }

  #success-overlay .success-overlay-body {
    gap: 0.5rem;
    padding: 0.78rem 0.75rem 0.75rem !important;
  }

  #success-overlay .success-check-circle {
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px;
  }

  #success-overlay .success-check-circle span {
    font-size: 1.8rem !important;
  }

  #success-overlay .success-overlay-title {
    font-size: 0.9rem !important;
  }

  #success-overlay .success-overlay-desc {
    font-size: 0.72rem !important;
    line-height: 1.34 !important;
  }

  #success-overlay .success-overlay-meta {
    font-size: 0.67rem !important;
  }

  #success-overlay .success-redirect-msg {
    font-size: 0.65rem !important;
  }

  #success-overlay .success-overlay-action {
    min-height: 42px !important;
    font-size: 0.65rem !important;
  }
}

@media (max-width: 359px) {
  #wizard-step-3 .room-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  #wizard-step-3 .room-img-container {
    width: 76px !important;
  }

  #wizard-step-3 .room-card.selected .room-details {
    padding-right: 1.45rem;
    padding-left: 0.42rem;
  }

  #panel-basic-details {
    gap: 0.34rem !important;
  }

  #panel-basic-details .radio-label {
    padding-right: 0.3rem;
    padding-left: 0.3rem;
    font-size: 0.61rem !important;
  }

  #panel-basic-details .input-field::placeholder {
    font-size: 0.7rem;
  }
}

/* Escritorio conserva dos columnas, pero permite scroll natural en pantallas bajas. */
@media (min-width: 900px) and (max-height: 720px) {
  html,
  body {
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body {
    min-height: 100dvh;
  }

  .booking-portal {
    min-height: 650px;
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Acciones móviles persistentes y compactación real para 320–430 px
   ========================================================================== */

.mobile-back-action,
.mobile-primary-action {
  display: none;
}

@media (max-width: 899px) {
  .booking-portal {
    padding-bottom: calc(var(--booking-mobile-bar-h) + 0.9rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .wizard-footer {
    display: none !important;
  }

  .mobile-summary-toggle {
    display: grid !important;
    grid-template-columns: auto minmax(54px, auto) auto minmax(98px, auto);
    justify-content: stretch;
    gap: 0.4rem;
    cursor: default;
  }

  .mobile-back-action,
  .mobile-primary-action {
    min-height: 42px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
  }

  .mobile-back-action {
    display: flex;
    width: 42px;
    padding: 0;
    color: var(--hotel-primary);
    background: transparent;
    border: 1px solid var(--card-border);
  }

  .mobile-back-action[hidden] {
    display: none !important;
  }

  .mobile-back-action .material-symbols-outlined {
    font-size: 1.05rem;
  }

  .mobile-primary-action {
    display: flex;
    gap: 0.25rem;
    min-width: 98px;
    padding: 0.55rem 0.65rem;
    color: #fff;
    background: var(--hotel-primary);
    border: 1px solid var(--hotel-primary);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .mobile-primary-action .material-symbols-outlined {
    font-size: 0.95rem;
  }

  .mobile-primary-action:disabled {
    color: var(--text-muted);
    background: rgba(17, 17, 17, 0.045);
    border-color: var(--card-border);
    cursor: not-allowed;
    opacity: 1;
  }

  body[data-booking-step="3"] .whatsapp-float,
  body[data-booking-step="4"] .whatsapp-float,
  body[data-booking-step="5"] .whatsapp-float {
    display: none !important;
  }
}

@media (max-width: 430px) {
  :root {
    --booking-page-gutter: 0.55rem;
    --booking-mobile-bar-h: 64px;
  }

  .hotel-header {
    height: 46px;
    min-height: 46px;
  }

  .header-logo-img {
    height: 25px;
  }

  .booking-portal {
    gap: 0.45rem !important;
    padding-top: 0.45rem !important;
  }

  .step-tracker {
    min-height: 46px;
    padding: 0.55rem 0.65rem !important;
  }

  .tracker-mobile-current {
    font-size: 0.61rem;
  }

  .tracker-mobile-label {
    font-size: 0.7rem;
  }

  .wizard-card {
    padding: 0.72rem 0.62rem !important;
    border-radius: 8px !important;
  }

  .wizard-header {
    margin-bottom: 0.52rem !important;
    padding-bottom: 0.42rem !important;
  }

  .wizard-title {
    font-size: 1rem !important;
    line-height: 1.1;
  }

  .wizard-title span {
    font-size: 1rem !important;
  }

  .wizard-subtitle {
    margin-top: 0.18rem !important;
    font-size: 0.68rem !important;
    line-height: 1.34;
  }

  .wizard-body,
  #wizard-step-4 .wizard-body,
  .rooms-grid {
    margin-bottom: 0.25rem;
  }

  .rooms-grid {
    gap: 0.48rem;
  }

  .room-card {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 92px !important;
  }

  .room-img-container {
    width: 88px !important;
    min-height: 92px;
  }

  .room-details {
    padding: 0.5rem 1.7rem 0.5rem 0.55rem;
  }

  .room-header {
    display: block;
  }

  .room-title {
    font-size: 0.84rem !important;
    line-height: 1.08;
  }

  .room-specs {
    gap: 0.18rem 0.4rem;
    margin-top: 0.2rem;
  }

  .room-spec-item {
    font-size: 0.58rem;
  }

  .room-spec-item span {
    font-size: 0.72rem;
  }

  .room-amenities-list {
    max-height: 19px;
    gap: 0.12rem;
    margin-top: 0.2rem;
    overflow: hidden;
  }

  .room-amenity-badge {
    padding: 0 0.2rem;
    font-size: 0.48rem;
  }

  .room-amenity-badge span {
    font-size: 0.6rem;
  }

  .room-price-info {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.1rem 0.3rem;
    width: 100%;
    margin-top: 0.28rem;
    text-align: left;
  }

  .room-price {
    font-size: 0.86rem;
  }

  .room-price-desc {
    font-size: 0.52rem;
  }

  .room-qty-selector {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 32px;
    margin-top: 0.28rem !important;
    padding: 0 0.3rem !important;
  }

  .room-qty-selector .qty-btn {
    min-width: 32px;
    min-height: 32px;
  }

  .room-select-badge {
    top: 0.55rem;
    right: 0.5rem;
    transform: none;
    width: 18px;
    height: 18px;
  }

  .room-card.unavailable::after {
    right: 0.5rem;
    bottom: 0.4rem;
    max-width: calc(100% - 105px);
    font-size: 0.48rem;
  }

  #wizard-step-4 .form-grid,
  #panel-basic-details {
    gap: 0.5rem !important;
  }

  #panel-basic-details > .input-group:first-child {
    margin-bottom: 0.05rem !important;
  }

  #panel-basic-details > .input-group:first-child > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.32rem !important;
    margin-top: 0.28rem !important;
  }

  #panel-basic-details .radio-label {
    min-height: 38px;
    padding: 0.42rem 0.55rem;
    gap: 0.42rem !important;
    background: rgba(17, 17, 17, 0.025);
    border: 1px solid var(--card-border);
    border-radius: 7px;
    font-size: 0.76rem !important;
    line-height: 1.2;
  }

  #panel-basic-details .radio-label input[type="radio"] {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px;
  }

  #cedula-search-container {
    padding: 0.65rem !important;
    margin-bottom: 0.05rem !important;
    border-radius: 8px !important;
  }

  #cedula-search-container > .input-label {
    display: block;
    margin-bottom: 0.25rem !important;
    font-size: 0.63rem !important;
  }

  .cedula-search-row {
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) 44px;
    gap: 0.35rem !important;
    max-width: none !important;
    margin-top: 0.2rem !important;
  }

  .cedula-search-row #c-cedula-prefix {
    width: 58px !important;
    min-width: 58px !important;
    padding: 0.35rem !important;
  }

  .cedula-search-row #c-cedula-search {
    min-width: 0;
  }

  .cedula-search-row #btn-search-cedula {
    width: 44px;
    min-width: 44px;
    height: 44px !important;
    min-height: 44px;
    padding: 0 !important;
    font-size: 0 !important;
  }

  .cedula-search-row #btn-search-cedula .material-symbols-outlined {
    font-size: 1.1rem !important;
  }

  .input-label {
    margin-bottom: 0.08rem !important;
    font-size: 0.64rem !important;
    line-height: 1.2;
  }

  .input-field,
  select.input-field,
  textarea.input-field,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="time"] {
    min-height: 44px;
    padding: 0.5rem 0.58rem !important;
    font-size: 16px !important;
  }

  .error-msg {
    margin-top: 0.1rem;
    font-size: 0.59rem;
  }

  .mobile-summary-toggle {
    grid-template-columns: auto minmax(50px, auto) auto minmax(96px, auto);
    gap: 0.32rem;
    min-height: var(--booking-mobile-bar-h);
    padding: 0.42rem 0.55rem calc(0.42rem + env(safe-area-inset-bottom, 0px));
  }

  .mobile-summary-label {
    font-size: 0.49rem;
  }

  .mobile-summary-cost {
    font-size: 0.82rem;
  }

  .mobile-view-details-btn {
    min-height: 42px !important;
    padding: 0.4rem 0.5rem;
    font-size: 0.56rem;
  }

  .mobile-view-details-btn .material-symbols-outlined {
    font-size: 0.95rem;
  }

  .mobile-primary-action {
    min-height: 42px;
    padding: 0.48rem 0.55rem;
    font-size: 0.62rem;
  }
}

@media (max-width: 359px) {
  .mobile-summary-toggle {
    grid-template-columns: auto minmax(46px, auto) 42px minmax(90px, auto);
    gap: 0.26rem;
    padding-right: 0.45rem;
    padding-left: 0.45rem;
  }

  .mobile-details-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .mobile-view-details-btn {
    width: 42px;
    min-width: 42px !important;
    padding: 0 !important;
  }

  .mobile-primary-action {
    min-width: 90px;
    padding-right: 0.4rem;
    padding-left: 0.4rem;
    letter-spacing: 0.025em;
  }
}

@media (max-width: 899px) and (max-height: 620px) {
  .mobile-summary-toggle {
    position: fixed !important;
    right: 0;
    bottom: 0;
    left: 0;
  }

  .booking-portal {
    padding-bottom: calc(var(--booking-mobile-bar-h) + 0.65rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  #wizard-step-4 .wizard-body,
  #wizard-step-5 .wizard-body {
    overflow-y: auto !important;
  }
}

@media (max-width: 430px) {
  #wizard-step-3 .room-card:not(.selected) .room-amenities-list {
    display: none !important;
  }

  #wizard-step-3 .room-card.selected {
    min-height: 128px !important;
  }

  #wizard-step-3 .room-card.selected .room-img-container {
    min-height: 128px !important;
  }

  #wizard-step-3 .room-card.selected .room-amenities-list {
    display: flex !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #wizard-step-3 .room-card.selected .room-amenity-badge {
    min-height: 15px;
    font-size: 0.47rem;
    line-height: 1.05;
    white-space: nowrap;
  }

  #panel-basic-details > .input-group.mobile-wide-field {
    grid-column: 1 / -1 !important;
  }

  #panel-basic-details > .input-group:first-child > div {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #panel-basic-details .radio-label {
    min-height: 34px !important;
    font-size: 0.67rem !important;
  }

  #panel-basic-details .input-label {
    font-size: 0.58rem !important;
  }

  #panel-basic-details .input-field {
    min-height: 40px !important;
    padding: 0.42rem 0.52rem !important;
    font-size: 16px !important;
  }

  #panel-basic-details .input-field::placeholder {
    font-size: 0.76rem;
  }
}

@media (max-width: 359px) {
  #wizard-step-3 .room-card {
    grid-template-columns: 76px minmax(0, 1fr) !important;
  }

  #wizard-step-3 .room-img-container {
    width: 76px !important;
  }

  #panel-basic-details .radio-label {
    font-size: 0.61rem !important;
  }

  #panel-basic-details .input-field::placeholder {
    font-size: 0.7rem;
  }
}

@media (max-width: 899px) {
  .mobile-back-action[hidden] {
    display: flex !important;
    visibility: hidden;
    pointer-events: none;
  }

  #foreign-country-container[hidden] {
    display: none !important;
  }
}

@media (max-width: 430px) {
  #panel-basic-details > .input-group:not(:first-child) > .input-label {
    display: flex;
    align-items: flex-end;
    min-height: 1.35rem;
  }

  #foreign-country-container {
    grid-column: 1 / -1 !important;
  }
}
