:root {
  --navbar-h: 60px;
  --footer-h: 72px;
}

/* ── Contenedor principal ── */
body {
  background: var(--contrast-background);
}

#content {
  padding: 0;
  height: calc(100vh - var(--navbar-h));
}

#content > .flex-grow-1 {
  overflow-y: auto;
  min-height: 0;
}

#client-data-step {
  display: flex;
  justify-content: center;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

#wrapper-client-data {
  width: 100%;
  max-width: 600px;
}

/* ── Tarjeta base ── */
.loc-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  padding: 32px 32px 28px;
}

.loc-hidden {
  display: none !important;
}

/* ── Encabezado de tarjeta ── */
.loc-card-header {
  text-align: center;
  margin-bottom: 16px;
}

.loc-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f0faf3;
  margin-bottom: 1rem;
}

.loc-icon-wrap i {
  font-size: 22px;
  color: var(--my-green-dark);
}

.loc-icon-blue {
  background: #eff6ff;
}

.loc-icon-blue i {
  color: #3b82f6;
}

.loc-icon-green {
  background: #f0faf3;
  box-shadow: 0 0 0 6px #d1fae5;
}

.loc-icon-green i {
  color: var(--my-green-dark);
}

.loc-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.4rem;
}

.loc-card-sub {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 0;
}

.loc-email-highlight {
  color: #111;
  word-break: break-all;
}

/* ── Campo de formulario ── */


.loc-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.loc-input-wrap {
  position: relative;
}

.loc-input-icon {
  position: absolute;
  top: 50%;
  left: 0.875rem;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.875rem;
  pointer-events: none;
}

.loc-input-wrap .form-control,
.loc-input-wrap input.loc-input {
  padding-left: 2.5rem;
  border-radius: 10px;
  border: 1.5px solid #d1d5db;
  font-size: 0.9375rem;
  height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.loc-input-wrap .form-control:focus,
.loc-input-wrap input.loc-input:focus {
  border-color: var(--my-green-dark);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.12);
  outline: none;
}

/* Selects de fecha y sexo */
.form-select {
  border-radius: 10px;
  border: 1.5px solid #d1d5db;
  font-size: 0.9375rem;
  height: 44px;
  color: #707981;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-select:focus {
  border-color: var(--my-green-dark);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.12);
}

.form-select:valid {
  color: #111;
}

/* ── Alertas de campo ── */
.loc-alert {
  font-size: 0.8rem;
  color: #dc3545;
  margin-top: 0.3rem;
  min-height: 1rem;
}

.loc-alert-center {
  text-align: center;
}

/* ── Alerta general (errores de servidor, horario, servicio, etc.) ── */
.loc-general-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fff5f5;
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: #b91c1c;
  line-height: 1.4;
}

.loc-general-alert-icon {
  flex-shrink: 0;
  font-size: 1rem;
  color: #ef4444;
  margin-top: 0.125rem;
}

/* Variante de espera, en ambar. Misma estructura que el alert rojo, pero esto no
   es un fallo: el cliente solo tiene que esperar para pedir otro codigo. Va
   despues del bloque base porque comparten especificidad y gana el orden. */
.loc-general-alert-wait {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.loc-general-alert-wait .loc-general-alert-icon {
  color: #d97706;
}

/* El mensaje y su accion se apilan: el alert es flex en fila, asi que sin este
   contenedor el boton quedaria al lado del texto en vez de debajo. */
.loc-general-alert-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
}

/* Solo aparece cuando el fallo no se puede reintentar y hay que salir de aqui.
   Va en los tonos del alert y no en el verde de accion, para no competir con el
   boton principal del paso. */
.loc-general-alert-action {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1.5px solid #b91c1c;
  border-radius: 8px;
  color: #b91c1c;
  font-weight: 600;
  text-decoration: none;
}

.loc-general-alert-action:hover {
  background: #b91c1c;
  color: #fff;
}

/* ── Botón primario ── */
.loc-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--my-green-dark);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  margin-bottom: 1.25rem;
}

.loc-btn-primary:hover {
  opacity: 0.88;
  color: #fff;
}

.loc-btn-primary:active {
  transform: scale(0.98);
}

.loc-btn-primary:disabled {
  background: var(--my-gray-dark);
  cursor: not-allowed;
}

/* ── Separador ── */
.loc-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #9ca3af;
  font-size: 0.8125rem;
}

.loc-divider::before,
.loc-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid #e5e7eb;
}

/* Espaciado entre botón secundario y el siguiente elemento */
.loc-btn-secondary.loc-mb {
  margin-bottom: 1.25rem;
}

/* ── Botón secundario (outline) ── */
.loc-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--my-green-dark);
  border: 1.5px solid var(--my-green-dark);
  border-radius: 10px;
  padding: 0.65rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 0;
}

.loc-btn-secondary:hover {
  background: #f0faf3;
  color: var(--my-green-dark);
}

/* ── Botón ghost (texto discreto) ── */
.loc-btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #6b7280;
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.15s;
}

.loc-btn-ghost:hover {
  color: #374151;
}

/* ── Botón terciario (gris outline, visible pero sin competir con los verdes) ── */
.loc-btn-tertiary {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #374151;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  padding: 0.65rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.loc-btn-tertiary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* ── Botón link ── */
.loc-btn-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--my-green-dark);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.loc-btn-link:hover {
  opacity: 0.75;
}

/* ── Fila de reenvío ── */
.loc-resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

/* ── Inputs de código de verificación ── */
.loc-code-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.25rem 0 0.5rem;
}

.loc-code-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  border: 2px solid #d1d5db;
  border-radius: 10px;
  background: #f9fafb;
  transition: border-color 0.15s, box-shadow 0.15s;
  caret-color: var(--my-green-dark);
}

.loc-code-digit:focus {
  border-color: var(--my-green-dark);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.14);
  background: #fff;
  outline: none;
}

.loc-code-digit.loc-code-filled {
  border-color: var(--my-green-dark);
  background: #f0faf3;
}

/* ── Email confirmado (solo lectura) ── */
.loc-email-confirmed-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #f0faf3;
  border: 1.5px solid #bbf0cc;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  margin-bottom: 16px;
}

.loc-email-confirmed-icon {
  color: var(--my-green-dark);
  font-size: 1rem;
  flex-shrink: 0;
}

.loc-email-confirmed-text {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a5e2c;
  word-break: break-all;
}

/* ── Código de reservación destacado ── */
.loc-confirm-code-box {
  background: var(--my-green-dark);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.25);
  margin-bottom: 16px;
}

.loc-confirm-code-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.35rem;
}

.loc-confirm-code-value {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #fff;
  margin: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ── Nota informativa (card de enlace enviado) ── */
.loc-sent-note {
  font-size: 0.8125rem;
  color: #6b7280;
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ── Hint del campo de código ── */
.loc-code-hint {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* ── Detalles de confirmación de reservación ── */
.loc-confirm-details {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}

.loc-confirm-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: #374151;
}

.loc-confirm-icon {
  width: 16px;
  text-align: center;
  color: var(--my-green-dark);
  flex-shrink: 0;
}

#summary-mobile-drawer{
  display: flex;
  justify-content: center;
}

.summary-bar-mobile-expandible {
  font-size: 13px;
  color: #aaa;
}

/* ── Overlay de carga (envío de reservación) ── */
@keyframes loc-spin {
  to { transform: rotate(360deg); }
}

#sub-step-info,
#sub-step-email {
  position: relative;
}

.loc-loading-overlay {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
}

.loc-loading-spinner {
  display: block;
  width: 40px;
  height: 40px;
  border: 3px solid #d1fae5;
  border-top-color: var(--my-green-dark);
  border-radius: 50%;
  animation: loc-spin 0.7s linear infinite;
}

.loc-loading-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a5e2c;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 767px) {
  /*
   * En mobile el #sidebar (barra de resumen) se apila ENCIMA de #content,
   * por lo que #content no puede tener altura fija — quedaría fuera del
   * viewport. Solución: altura automática + página scrollea de forma natural.
   * Los botones de navegación usan position:fixed para quedar siempre al fondo.
   */
  #content {
    height: auto;
  }

  #content > .flex-grow-1 {
    overflow-y: visible;
  }

  /* Fijo al fondo del viewport sin importar la altura del contenido */
  #navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--footer-h);
    background: #fff;
    border-top: 1px solid #e2e0d8;
  }

  #client-data-step {
    padding-top: 1rem;
    padding-bottom: calc(var(--footer-h) + 1.5rem);
  }

  .loc-card {
    padding: 16px;
    border-radius: 12px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }

  .loc-loading-overlay {
    border-radius: 12px;
  }

  .loc-code-digit {
    width: 40px;
    height: 48px;
    font-size: 1.25rem;
  }

  .loc-code-row {
    gap: 0.35rem;
  }

  .loc-card-header {
    margin-bottom: 5px;
  }

  .loc-email-confirmed-row {
    margin-bottom: 10px;
  }

  .loc-confirm-code-value {
    font-size: 1.5rem;
  }
}
