/**
 * Estilos para el formulario de reservas público
 * Mobile-first responsive design
 */

/* ==========================================================================
   Contenedor principal
   ========================================================================== */

.ipb-public-booking-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ipb-public-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.ipb-public-booking-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ==========================================================================
   Pasos del formulario
   ========================================================================== */

.ipb-booking-step {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.ipb-booking-step:last-child {
    border-bottom: none;
}

.ipb-step-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 22px;
    margin: 0 0 15px 0;
    color: #333;
}

.ipb-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.ipb-step-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ==========================================================================
   Calendario público
   ========================================================================== */

.ipb-public-calendar {
    margin: 20px 0;
}

/* ==========================================================================
   Resumen de selección
   ========================================================================== */

.ipb-selection-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #e7f5e7;
    border: 2px solid #5cb85c;
    border-radius: 8px;
    margin-top: 20px;
}

.ipb-summary-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.ipb-summary-text {
    flex: 1;
}

.ipb-summary-text strong {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.ipb-summary-date,
.ipb-summary-time {
    display: block;
    font-size: 16px;
    color: #155724;
    line-height: 1.4;
}

.ipb-summary-date {
    text-transform: capitalize;
    font-weight: 600;
}

.ipb-clear-btn {
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #5cb85c;
    border-radius: 4px;
    color: #5cb85c;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ipb-clear-btn:hover {
    background: #5cb85c;
    color: #fff;
}

/* ==========================================================================
   Formulario
   ========================================================================== */

.ipb-public-form {
    max-width: 600px;
}

.ipb-form-field {
    margin-bottom: 20px;
}

.ipb-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 15px;
}

.ipb-required {
    color: #d63638;
    font-weight: bold;
}

.ipb-optional {
    color: #999;
    font-weight: normal;
    font-size: 13px;
}

.ipb-form-field input[type="text"],
.ipb-form-field input[type="tel"],
.ipb-form-field input[type="email"],
.ipb-form-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.ipb-form-field input:focus,
.ipb-form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.ipb-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* Placeholders */
.ipb-form-field input::placeholder,
.ipb-form-field textarea::placeholder {
    color: #999;
}
.ipb-spaces-info {
    color: #000;
} 

/* ==========================================================================
   Protección de datos
   ========================================================================== */

.ipb-privacy-section {
    margin: 30px 0 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.ipb-privacy-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 700;
    color: #0073aa;
    text-transform: uppercase;
}

.ipb-privacy-text {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
    white-space: pre-line;
}

.ipb-privacy-checkbox {
    margin-top: 15px;
}

.ipb-privacy-checkbox label {
    font-size: 14px;
    font-weight: normal;
    cursor: pointer;
    color: #555;
}

.ipb-privacy-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: auto;
    flex-shrink: 0;
}

.ipb-privacy-checkbox a {
    color: #0073aa;
    text-decoration: underline;
}

.ipb-privacy-checkbox a:hover {
    text-decoration: none;
}

/* ==========================================================================
   Mensajes
   ========================================================================== */

.ipb-form-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
}

.ipb-message-success {
    background: #e7f5e7;
    border: 2px solid #5cb85c;
    color: #155724;
}

.ipb-message-error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

/* ==========================================================================
   Botón submit
   ========================================================================== */

.ipb-form-actions {
    margin-top: 30px;
}

.ipb-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ipb-submit-btn:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.ipb-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ipb-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.ipb-form-note {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 12px;
    font-style: italic;
}

/* ==========================================================================
   Responsive - Tablet
   ========================================================================== */

@media (min-width: 768px) {
    
    .ipb-public-booking-wrap {
        padding: 40px 20px;
    }
    
    .ipb-public-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .ipb-booking-step {
        padding: 40px;
    }
    
    .ipb-step-title {
        font-size: 24px;
    }
    
    .ipb-step-number {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
}

/* ==========================================================================
   Responsive - Desktop
   ========================================================================== */

@media (min-width: 1024px) {
    
    /* CAMBIO: Layout vertical en todas las resoluciones
       El formulario siempre debajo del calendario */
    
    .ipb-public-booking-container {
        /* Grid eliminado - layout vertical siempre */
        display: block;
    }
    
    .ipb-booking-step {
        border-bottom: 1px solid #e5e5e5;
    }
    
    .ipb-booking-step:last-child {
        border-bottom: none;
    }
    
    .ipb-submit-btn {
        width: auto;
        min-width: 300px;
    }
    
}

/* ==========================================================================
   Dark mode (opcional - respeta preferencias del sistema)
   ========================================================================== */

/* DESACTIVADO - No usar dark mode automático
@media (prefers-color-scheme: dark) {
    
    .ipb-public-booking-wrap {
        color: #e0e0e0;
    }
    
    .ipb-public-booking-container {
        background: #2a2a2a;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .ipb-public-title,
    .ipb-step-title {
        color: #e0e0e0;
    }
    
    .ipb-step-description {
        color: #b0b0b0;
    }
    
    .ipb-form-field label {
        color: #e0e0e0;
    }
    
    .ipb-form-field input,
    .ipb-form-field textarea {
        background: #1a1a1a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .ipb-form-field input::placeholder,
    .ipb-form-field textarea::placeholder {
        color: #666;
    }
    
    .ipb-booking-step {
        border-color: #444;
    }
    
}
*/

/* ==========================================================================
   Override para día actual en calendario
   ========================================================================== */

.ipb-calendar .ipb-day-today {
    background: #0073aa !important;
    color: #fff !important;
}

.ipb-calendar .ipb-day-today .ipb-day-number {
    color: #fff !important;
}

/* ==========================================================================
   Slots de días pasados (deshabilitados)
   ========================================================================== */

.ipb-slot-past {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.ipb-slot-past .ipb-slot-time,
.ipb-slot-past .ipb-status-label {
    color: #999 !important;
}

/* Asegurar que los slots pasados NO son seleccionables */
.ipb-slot-past.ipb-slot-selectable {
    cursor: not-allowed !important;
    pointer-events: none;
}

.ipb-slot-past:hover {
    background: inherit !important;
}
