/* LOCAL · Pulido específico para móviles ~360 px */

@media (max-width: 390px) {
  .hero {
    padding: 18px 0 16px;
  }

  .hero > div,
  .layout,
  .app-footer {
    width: min(100% - 16px, 980px);
  }

  .hero-title-row {
    align-items: flex-start;
    gap: 8px;
  }

  .hero-title-row h1 {
    font-size: 18px;
    line-height: 1.05;
    letter-spacing: -0.03em;
  }

  .hero p:not(.eyebrow) {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.25;
  }

  .hero-theme-switch {
    padding: 3px;
    gap: 3px;
  }

  .hero-theme-switch .theme-switch-button {
    min-height: 28px;
    padding: 0 10px;
    font-size: 10px;
  }

  .layout {
    padding-top: 10px;
    gap: 10px;
  }

  .app-calendar-card {
    padding: 14px 14px 16px;
    border-radius: 24px;
  }

  .app-screen-title {
    gap: 6px;
    margin-bottom: 6px;
  }

  .app-screen-title strong {
    font-size: 17px;
    line-height: 1.15;
  }

  .visual-calendar::before {
    margin: 2px 0 8px;
    font-size: 12px;
  }

  .calendar-grid.compact-date-grid {
    gap: 6px;
  }

  .compact-date-button {
    min-height: 54px;
    padding: 6px 2px 5px;
    border-radius: 18px;
  }

  .compact-date-weekday {
    font-size: 10px;
    line-height: 1;
  }

  .compact-date-day {
    font-size: 21px;
    line-height: 1;
  }

  .availability-head {
    margin-top: 10px;
    margin-bottom: 6px;
  }

  .availability-head h2 {
    font-size: 18px;
    line-height: 1.1;
  }

  .slots-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 11px;
  }

  .slots-legend > * {
    min-height: 30px;
  }

  .slot {
    min-height: 96px;
    padding: 14px 14px;
    border-radius: 22px;
    gap: 10px;
  }

  .slot-info {
    min-width: 0;
  }

  .slot-time {
    font-size: 18px;
    line-height: 1.05;
  }

  .slot-status {
    margin-top: 6px;
    padding: 4px 10px;
    font-size: 11px;
  }

  .slot-home {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.25;
  }

  .slot-cancel {
    min-width: 132px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 800;
  }

  .booking-card .form {
    gap: 12px;
  }

  .booking-card .selected-turno {
    margin-top: 4px;
    margin-bottom: 10px;
  }

  .pin-help {
    font-size: 12px;
    line-height: 1.3;
  }

  .pin-action {
    font-size: 13px;
  }
}
/* =========================================================
   SALCHI BOOKING FULLSCREEN V2
   Pantalla completa móvil + contenido centrado y adaptable
   ========================================================= */

@media (max-width: 760px) {

  #bookingConfirmModal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    padding: 0 !important;
    overflow: hidden;
    background: var(--card);
  }

  #bookingConfirmModal .booking-modal-overlay {
    display: none;
  }

  #bookingConfirmModal .booking-modal-card {
    position: relative;
    inset: auto;
    top: auto;

    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;

    margin: 0;
    border: 0;
    border-radius: 0;

    padding:
      max(14px, env(safe-area-inset-top))
      clamp(16px, 5vw, 24px)
      max(14px, env(safe-area-inset-bottom));

    overflow-x: hidden;
    overflow-y: auto;

    display: grid;
    grid-template-columns: minmax(0, 430px);
    justify-content: center;
    align-content: center;
  }

  #bookingConfirmModal .booking-modal-card > * {
    width: 100%;
    min-width: 0;
  }

  #bookingConfirmTitle {
    margin: 0 0 12px !important;
  }

  #bookingConfirmModal .booking-confirm-visual-card {
    min-height: clamp(190px, 29dvh, 245px);
    margin: 0 0 12px;
    padding: clamp(16px, 2.3dvh, 22px) 18px;
  }

  #bookingConfirmModal .booking-message-main {
    margin: 0 0 12px !important;
  }

  #bookingConfirmModal #modalBookingStep .form {
    gap: clamp(7px, 1.3dvh, 12px);
  }

  #bookingConfirmModal #modalBookingStep select {
    min-height: clamp(52px, 7dvh, 60px);
    margin-bottom: 0;
  }

  #bookingConfirmModal .pin-help {
    margin: 2px 0 4px !important;
    text-align: center;
  }

  #bookingConfirmModal #modalBookingStep button[type="submit"] {
    min-height: clamp(52px, 7dvh, 60px);
  }

  #bookingConfirmModal .booking-modal-actions {
    margin-top: 10px !important;
  }

  #bookingConfirmModal #modalBackButton {
    min-height: clamp(48px, 6.5dvh, 56px);
  }
}


/* Pantallas bajas: compactar antes de recurrir al scroll */
@media (max-width: 760px) and (max-height: 720px) {

  #bookingConfirmModal .booking-modal-card {
    align-content: start;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  #bookingConfirmTitle {
    margin-bottom: 7px !important;
    font-size: 1.2rem;
  }

  #bookingConfirmModal .booking-confirm-visual-card {
    min-height: 165px;
    padding: 12px 16px;
    margin-bottom: 8px;
  }

  #bookingConfirmModal .booking-confirm-visual-card .booking-fecha {
    font-size: 1.5rem;
  }

  #bookingConfirmModal .booking-confirm-visual-card .booking-hora {
    margin-top: 8px;
    font-size: 1.35rem;
  }

  #bookingConfirmModal .booking-message-main {
    margin-bottom: 7px !important;
  }

  #bookingConfirmModal #modalBookingStep .form {
    gap: 6px;
  }

  #bookingConfirmModal #modalBookingStep select {
    min-height: 48px;
  }

  #bookingConfirmModal #modalBookingStep button[type="submit"] {
    min-height: 50px;
  }

  #bookingConfirmModal .booking-modal-actions {
    margin-top: 7px !important;
  }

  #bookingConfirmModal #modalBackButton {
    min-height: 46px;
  }
}
