/* ==========================================================================
   1. Variables Globales y Paleta de Colores
   ========================================================================== */
   :root {
    /* Paleta de Colores */
    --primary-color: #3b82f6;            /* Color principal */
    --primary-hover: #2563eb;            /* Hover del color principal */
    --border-color: #e5e7eb;             /* Color de los bordes */
    --text-color: #374151;               /* Texto principal */
    --text-muted: #6b7280;               /* Texto secundario o deshabilitado */
    --bg-color: #ffffff;                /* Fondo principal */
    --bg-muted: #f9fafb;                /* Fondos secundarios */
    --bg-hover: #f3f4f6;                 /* Fondo al pasar el cursor */
    --bg-selected: #eff6ff;              /* Fondo de elementos seleccionados */
    --bg-partially-booked: #fef9c3;       /* Fondo para parcialmente reservados */
    --warning-color: #f59e0b;            /* Color de advertencia */
    --error-color: #ef4444;              /* Color de error/requerido */
  
    /* Propiedades del Sistema */
    --radius: 0.25rem;                   /* Radio de borde */
    --transition: all 0.2s ease;         /* Transiciones para animaciones */
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);      /* Sombra suave */
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.05);     /* Sombra más intensa */
  }
  
  
  /* ==========================================================================
     2. Contenedor Principal de la Reserva
     ========================================================================== */
  .reserva-container {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  
  
  /* ==========================================================================
     3. Sección del Calendario
     ========================================================================== */
  .calendario-seccion {
    flex: 1;
    padding: 16px;
    border-right: 1px solid var(--border-color);
  }
  
  /* Encabezado del Calendario */
  .calendario-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }
  .mes-actual {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
  }
  
  /* Navegación de Meses */
  .navegacion-meses {
    display: flex;
    gap: 8px;
  }
  .btn-mes {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius);
    background-color: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
  }
  .btn-mes:hover {
    background-color: var(--bg-hover);
  }
  .btn-mes svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--text-color);
    stroke-width: 2;
  }
  
  /* Estructura del Calendario en Grid */
  .calendario-grid {
    width: 100%;
  }
  .calendario-dias-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
  }
  .dia-header {
    text-align: center;
    padding: 4px 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  /* Grid de Días del Mes */
  .calendario-dias-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }
  .dia-celda {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
  }
  .dia-celda span {
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }
  
  /* Hover en celdas activas */
  .dia-celda:hover:not(.inactive) {
    background-color: var(--bg-hover);
  }
  
  /* Celdas inactivas */
  .dia-celda.inactive {
    color: var(--text-muted);
    opacity: 0.5;
    cursor: default;
  }
  
  /* Resaltado del día actual */
  .dia-celda.dia-hoy {
    position: relative;
  }
  .dia-celda.dia-hoy::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    box-shadow: inset 0 0 0 1px var(--primary-color);
    border-radius: var(--radius);
    pointer-events: none;
  }
  
  /* Fecha seleccionada */
  .dia-celda.dia-seleccionado {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
  }
  
  /* Celda Disponible */
  .dia-celda.dia-disponible {
    background-color: var(--bg-selected);
    color: var(--primary-color);
  }
  
  /* Celda No Disponible */
  .dia-celda.dia-no-disponible {
    color: var(--text-muted);
    opacity: 0.5;
    cursor: default;
  }
  
  /* Celda Parcialmente Reservada */
  .dia-celda.partially-booked {
    background-color: var(--bg-partially-booked);
    position: relative;
  }
  .dia-celda.partially-booked::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--warning-color);
    z-index: 2;
  }
  
  
  /* ==========================================================================
     4. Sección de Detalles / Formulario de Reserva
     ========================================================================== */
  .detalles-seccion {
    flex: 1;
    padding: 16px;
  }
  .detalles-titulo {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
  }
  .campo-grupo {
    margin-bottom: 16px;
  }
  .campo-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
  }
  
  /* Input para Fecha Seleccionada */
  .fecha-seleccionada-input {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
  }
  .fecha-seleccionada-input:hover {
    border-color: var(--text-muted);
  }
  .fecha-seleccionada-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
  }
  .fecha-seleccionada-input svg {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    stroke: var(--primary-color);
  }
  
  
  /* ==========================================================================
     5. Opciones de Tipo de Pago
     ========================================================================== */
  .payment-type-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
  }
  .payment-type-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 13px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
  }
  .payment-type-option:hover {
    background-color: var(--bg-hover);
  }
  .payment-type-option.active {
    background-color: var(--bg-selected);
    color: var(--primary-color);
    border-color: var(--primary-color);
  }
  .payment-icon {
    margin-right: 6px;
    display: flex;
    align-items: center;
  }
  .payment-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
  }
  .payment-type-option.active .payment-icon svg {
    fill: var(--primary-color);
  }
  .payment-label {
    font-weight: 500;
    color: var(--text-color);
  }
  .payment-type-option.active .payment-label {
    color: var(--primary-color);
  }
  
  
  /* ==========================================================================
     6. Contador de Personas
     ========================================================================== */
  .person-types-section {
    margin-bottom: 16px;
  }
  .person-types-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
  }
  .price-info {
    font-size: 11px;
    color: var(--primary-color);
    font-weight: normal;
    margin-left: 5px;
  }
  .contador-grupo {
    margin-bottom: 12px;
  }
  .contador-controles {
    display: flex;
    align-items: center;
    height: 32px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
  }
  .contador-btn {
    width: 32px;
    height: 32px;
    background-color: var(--bg-muted);
    border: none;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }
  .contador-btn:hover {
    background-color: var(--bg-hover);
  }
  .contador-btn:disabled {
    color: var(--text-muted);
    opacity: 0.5;
    cursor: default;
  }
  .contador-valor {
    flex: 1;
    padding: 4px;
    font-size: 13px;
    text-align: center;
    background-color: var(--bg-color);
  }
  
  
  /* ==========================================================================
     7. Resumen de la Reserva y Botón de Confirmación
     ========================================================================== */
  .resumen {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
  }
  .resumen-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-color);
  }
  .resumen-total {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
  }
  
  /* Botón de Reserva */
  .btn-reservar {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow);
  }
  .btn-reservar:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
  }
  
  
  /* ==========================================================================
     8. Estilos para Campos Requeridos y Resaltados
     ========================================================================== */
  .campo-grupo.required-field {
    position: relative;
  }
  .campo-label.required {
    color: var(--text-color);
    font-weight: 600;
  }
  .required-mark {
    color: var(--error-color);
    margin-left: 3px;
  }
  
  
  /* ==========================================================================
     9. Optimización y Responsividad
     ========================================================================== */
  @media (max-width: 768px) {
    .reserva-container {
      max-width: 100%;
      margin: 0;
      border-radius: 0;
      border-left: none;
      border-right: none;
    }
    .calendario-seccion,
    .detalles-seccion {
      padding: 12px;
    }
  }
  
  @media (max-width: 500px) {
    .reserva-container {
      flex-direction: column;
    }
    .calendario-seccion {
      border-right: none;
      border-bottom: 1px solid var(--border-color);
    }
    .dia-celda {
      font-size: 12px;
    }
  }  