@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1e3a5f;
    --primary-light: #2a4d7a;
    --accent-color: #c6a43f;
    --accent-hover: #d4b554;
    --bg-color: #f3f4f6;
    --surface: #ffffff;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border-light: #e5e7eb;
    --shadow-soft: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --radius-lg: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Contenedor Principal (Layout Dividido) */
.booking-wrapper {
    display: flex;
    background: var(--surface);
    width: 100%;
    max-width: 1000px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Panel Izquierdo (Info Institucional) */
.info-panel {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    width: 40%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-panel .logo-area h1 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.info-panel .logo-area p {
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 300;
}

.info-panel .features { margin-top: 3rem; }
.info-panel .features div {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #e2e8f0;
}
.info-panel .features i {
    color: var(--accent-color);
    font-size: 1.3rem;
}

/* Panel Derecho (Formulario) */
.form-panel {
    width: 60%;
    padding: 3rem;
    background: var(--surface);
}

.form-panel h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Inputs Animados (Material Design / Floating Labels) */
.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Corrección de íconos: Se posicionan absolutamente sin molestar al texto */
.input-group i {
    position: absolute;
    left: 0;
    bottom: 12px;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.input-group input {
    width: 100%;
    padding: 10px 10px 10px 35px; /* Espacio exacto para el ícono */
    font-size: 1rem;
    color: var(--text-dark);
    border: none;
    border-bottom: 2px solid var(--border-light);
    background: transparent;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-group label {
    position: absolute;
    left: 35px; /* Alineado con el inicio del texto */
    top: 12px;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* La magia del label flotante */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -12px;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
}

.input-group input:focus { border-bottom-color: var(--primary-color); }
.input-group input:focus ~ i { color: var(--primary-color); }

/* Calendario nativo estilizado */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* Grilla de Horarios (Estilo Calendly) */
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 1rem;
}

.time-slot {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
    background-color: var(--surface);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-slot:hover {
    background-color: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.time-slot.selected {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

/* Botón Principal */
.btn-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(198, 164, 63, 0.3);
}

.btn-submit:disabled { background-color: #d1d5db; cursor: not-allowed; opacity: 0.7; }

/* Responsive para Celulares */
@media (max-width: 800px) {
    .booking-wrapper { flex-direction: column; }
    .info-panel { width: 100%; padding: 2rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .form-panel { width: 100%; padding: 2rem; }
    .form-row { flex-direction: column; gap: 0; }
}

/* Mensajes */
#mensaje-exito { display: none; text-align: center; }
#mensaje-exito i { font-size: 4rem; color: #10b981; margin-bottom: 1rem; }
#mensaje-exito h2 { color: var(--text-dark); margin-bottom: 1rem; }
.ticket-info { background: #f8fafc; padding: 1.5rem; border-radius: 12px; text-align: left; margin: 1.5rem 0; border: 1px dashed var(--border-light); }
#mensaje-error { display: none; color: #dc2626; font-size: 0.9rem; margin-bottom: 1rem; text-align: center; }
.spinner { display: none; margin: 20px auto; width: 30px; height: 30px; border: 3px solid #f3f3f3; border-top: 3px solid var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }