/* ========================================
   RESERVAS DE ESPACIOS - ESTILOS FRONTEND
   ======================================== */

/* ===== CONTENEDOR PRINCIPAL ===== */
.re-reserva-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.re-reserva-container h2 {
    text-align: center;
    color: #1a2332;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.re-reserva-container h3 {
    color: #1a2332;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.re-reserva-container h4 {
    color: #1a2332;
    font-size: 16px;
    font-weight: 600;
    margin: 15px 0 10px;
}

/* ===== PROGRESS BAR ===== */
.re-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 0 15px;
    position: relative;
}

.re-progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #e8ecf1;
    transform: translateY(-50%);
    z-index: 0;
}

.re-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    gap: 6px;
    cursor: default;
}

.re-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8ecf1;
    color: #7f8c8d;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.re-step-label {
    font-size: 11px;
    color: #95a5a6;
    font-weight: 500;
    transition: color 0.3s ease;
}

.re-step.active .re-step-number {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
    box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.15);
}

.re-step.active .re-step-label {
    color: #2c3e50;
    font-weight: 600;
}

.re-step.completed .re-step-number {
    background: #2ecc71;
    color: #fff;
    border-color: #27ae60;
}

.re-step.completed .re-step-label {
    color: #27ae60;
}

/* ===== SEDES ===== */
.re-sedes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.re-sede-item {
    padding: 25px 20px;
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.re-sede-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.re-sede-item.seleccionada {
    border-color: #3498db;
    background: #f0f7fe;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.12);
}

.re-sede-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.re-sede-nombre {
    font-weight: 600;
    font-size: 17px;
    color: #1a2332;
}

.re-sede-direccion {
    font-size: 13px;
    color: #7f8c8d;
    margin: 5px 0 8px;
}

.re-sede-horario {
    font-size: 12px;
    color: #95a5a6;
    background: #f0f2f5;
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-block;
}

/* ===== ESPACIOS ===== */
.re-espacios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.re-espacio-grupo {
    margin-bottom: 25px;
}

.re-espacio-grupo-titulo {
    font-weight: 700;
    font-size: 14px;
    color: #1a2332;
    padding: 8px 14px;
    background: #f0f4f8;
    border-radius: 6px;
    margin-bottom: 12px;
    display: inline-block;
    border-left: 4px solid #3498db;
}

.re-espacio-item {
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.re-espacio-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.re-espacio-item.seleccionado {
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.12);
}

.re-espacio-imagen {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f0f2f5;
}

.re-espacio-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.re-espacio-nombre {
    font-weight: 600;
    font-size: 16px;
    color: #1a2332;
    padding: 12px 15px 5px;
}

.re-espacio-descripcion {
    font-size: 13px;
    color: #7f8c8d;
    padding: 0 15px 10px;
    min-height: 36px;
}

.re-espacio-detalles {
    padding: 10px 15px;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #34495e;
    border-top: 1px solid #e8ecf1;
    flex-wrap: wrap;
    gap: 4px;
}

.re-espacio-detalles span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.re-espacio-detalles .re-badge-garantia {
    background: #fff3e0;
    color: #e67e22;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* ===== TIPOS DE RESERVA ===== */
.re-tipos-reserva {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0 20px;
}

.re-tipo-item {
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.re-tipo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.re-tipo-item.seleccionado {
    border-color: #3498db;
    background: #f0f7fe;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.10);
}

.re-tipo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.re-tipo-icon {
    font-size: 28px;
}

.re-tipo-nombre {
    font-weight: 600;
    font-size: 17px;
    color: #1a2332;
}

.re-tipo-detalles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.re-tipo-detalles ul li {
    padding: 4px 0;
    font-size: 13px;
    color: #34495e;
}

/* ===== CORTESÍAS ===== */
.re-cortesias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 12px 0 18px;
}

.re-cortesia-item {
    padding: 14px 16px;
    border: 2px solid #e8ecf1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: #fff;
}

.re-cortesia-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.re-cortesia-item.seleccionado {
    border-color: #2ecc71;
    background: #f0faf5;
}

.re-cortesia-nombre {
    font-weight: 600;
    font-size: 14px;
    color: #1a2332;
}

.re-cortesia-descripcion {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 4px;
}

/* ===== RESUMEN ===== */
.re-resumen {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
    border: 1px solid #e8ecf1;
}

.re-resumen-item {
    font-size: 14px;
    padding: 4px 0;
}

.re-resumen-label {
    font-weight: 600;
    color: #34495e;
}

/* ===== CAMPOS ===== */
.re-campo {
    margin-bottom: 18px;
}

.re-campo label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 5px;
    font-size: 14px;
}

.re-campo input,
.re-campo select,
.re-campo textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #dcdfe6;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.re-campo input:focus,
.re-campo select:focus,
.re-campo textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.08);
}

.re-campo input.error,
.re-campo select.error {
    border-color: #e74c3c;
}

/* ===== HORAS ===== */
.re-horas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    min-height: 100px;
    border: 2px solid #e8ecf1;
}

.re-hora-item {
    padding: 10px 6px;
    text-align: center;
    border: 2px solid #dcdfe6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    background: #fff;
    font-weight: 500;
}

.re-hora-item:hover:not(.ocupada) {
    border-color: #3498db;
    background: #f0f7fe;
}

.re-hora-item.seleccionada {
    border-color: #2ecc71;
    background: #f0faf5;
    color: #1a2332;
    font-weight: 700;
}

.re-hora-item.ocupada {
    background: #fdf2f2;
    border-color: #f5c6cb;
    color: #a94442;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===== MENSAJES ===== */
.re-mensaje {
    grid-column: 1 / -1;
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

.re-helper {
    color: #7f8c8d;
    font-size: 13px;
    display: block;
    margin-top: 4px;
}

/* ===== BOTONES ===== */
.re-navegacion {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.re-btn {
    padding: 12px 35px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.re-btn-principal {
    background: #3498db;
    color: #fff;
}

.re-btn-principal:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.30);
}

.re-btn-secundario {
    background: #95a5a6;
    color: #fff;
}

.re-btn-secundario:hover:not(:disabled) {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.re-btn-exito {
    background: #2ecc71;
    color: #fff;
}

.re-btn-exito:hover:not(:disabled) {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.30);
}

.re-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== MENSAJE RESULTADO ===== */
#re-mensaje-resultado {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 10px;
    text-align: center;
    display: none;
}

#re-mensaje-resultado.re-exito {
    display: block;
    background: #f0faf5;
    color: #1a7a3a;
    border: 2px solid #82e0aa;
}

#re-mensaje-resultado.re-error {
    display: block;
    background: #fdf2f2;
    color: #a94442;
    border: 2px solid #f5c6cb;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .re-reserva-container {
        padding: 16px;
        margin: 10px;
    }
    
    .re-progress-bar {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    .re-progress-bar::before {
        display: none;
    }
    
    .re-step {
        flex-direction: row;
        gap: 6px;
    }
    
    .re-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .re-sedes-grid,
    .re-espacios-grid {
        grid-template-columns: 1fr;
    }
    
    .re-tipos-reserva {
        grid-template-columns: 1fr;
    }
    
    .re-resumen {
        grid-template-columns: 1fr;
    }
    
    .re-horas-grid {
        grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    }
    
    .re-btn {
        width: 100%;
        min-width: unset;
    }
    
    .re-navegacion {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .re-espacio-detalles {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}