/* ==========================================================================
   CGERA Reservas - Diseño Integrado con Identidad Institucional CGERA
   ========================================================================== */

/* 1. ESTRUCTURA Y ENCABEZADO INSTITUCIONAL (LIMPIO, NÍTIDO Y SIN IMAGEN) */
.cgera-reservas-page-wrap {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0F172A;
}

.cgera-reservas-header-clean {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #E2E8F0;
    padding: 45px 20px 40px 20px;
    box-sizing: border-box;
}

.cgera-header-clean-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cgera-clean-tag {
    background: #EFF6FF;
    color: #1E66D6;
    border: 1px solid #BFDBFE;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
    display: inline-block;
}

.cgera-clean-title {
    font-size: 36px;
    font-weight: 800;
    color: #044355 !important;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.cgera-clean-desc {
    font-size: 16px;
    color: #475569 !important;
    margin: 0 0 24px 0;
    line-height: 1.6;
    max-width: 720px;
}

/* Barra Institucional de Equipamiento */
.cgera-clean-equipment {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 40px;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(4, 67, 85, 0.04);
    max-width: 100%;
}

.cgera-eq-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: #044355;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cgera-eq-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1E66D6;
    box-shadow: 0 0 6px rgba(30, 102, 214, 0.5);
    flex-shrink: 0;
}

.cgera-eq-chips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cgera-chip {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    color: #044355;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.cgera-chip svg {
    color: #1E66D6;
    fill: currentColor;
    flex-shrink: 0;
}

.cgera-chip:hover {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1E66D6;
}

@media (min-width: 992px) {
    .cgera-eq-chips {
        flex-wrap: nowrap;
    }
}

@media (min-width: 1080px) {
    .cgera-clean-equipment {
        flex-wrap: nowrap;
    }
}


/* 2. SECCIÓN PRINCIPAL DEL SISTEMA (FONDO CÁLIDO #F9F7F7) */
.cgera-reservas-main-section {
    background: #F9F7F7;
    width: 100%;
    padding: 40px 20px 80px 20px;
    box-sizing: border-box;
}

.cgera-reservas-app {
    max-width: 1080px;
    margin: 0 auto;
}

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

.cgera-step-content {
    animation: cgeraStepFade 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 3. BARRA DE PASOS */
.cgera-steps-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 16px 28px;
    border-radius: 14px;
    margin-bottom: 32px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(4, 67, 85, 0.04);
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.45;
    transition: all 0.25s ease;
}

.step-indicator.active {
    opacity: 1;
}

.step-indicator.completed {
    opacity: 0.85;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F9F7F7;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13.5px;
    transition: all 0.25s ease;
    border: 1px solid #e2e8f0;
}

.step-indicator.active .step-num {
    background: #044355;
    color: #ffffff;
    border-color: #044355;
    box-shadow: 0 0 0 4px rgba(30, 102, 214, 0.25);
}

.step-indicator.completed .step-num {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    color: #044355;
}

.step-divider {
    flex-grow: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 16px;
}

/* 4. HEADERS DE CADA PASO */
.cgera-step-header {
    text-align: center;
    margin-bottom: 26px;
    position: relative;
}

.cgera-step-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #044355;
    margin: 0 0 6px 0;
}

.cgera-step-header p {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

.cgera-back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #044355;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.cgera-back-btn:hover {
    background: #ebf3fd;
    border-color: #1E66D6;
    color: #1E66D6;
}

.cgera-highlight-sala {
    color: #044355;
    background: #ebf3fd;
    padding: 3px 12px;
    border-radius: 6px;
    border: 1px solid rgba(30, 102, 214, 0.3);
}

/* 5. PASO 1: TARJETAS DE SALAS */
.cgera-rooms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cgera-room-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(4, 67, 85, 0.05);
}

.cgera-room-card:hover {
    border-color: #1E66D6;
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(4, 67, 85, 0.12);
}

.room-card-image {
    height: 195px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #044355;
}

.room-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(4, 67, 85, 0.90);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.room-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.room-title {
    font-size: 21px;
    font-weight: 700;
    color: #044355;
    margin: 0 0 8px 0;
}

.room-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 18px 0;
    flex-grow: 1;
    line-height: 1.55;
}

.room-features {
    list-style: none;
    padding: 0;
    margin: 0 0 22px 0;
    font-size: 13.5px;
    color: #475569;
}

.room-features li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cgera-btn-select-room {
    width: 100%;
    padding: 13px;
    background: #044355;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(4, 67, 85, 0.2);
}

.cgera-btn-select-room:hover {
    background: #1E66D6;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(30, 102, 214, 0.35);
}

/* 6. PASO 2: CALENDARIO Y HORARIOS */
.cgera-schedule-container {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    background: #ffffff;
    padding: 26px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(4, 67, 85, 0.04);
}

.cgera-calendar-wrapper {
    border-right: 1px solid #e2e8f0;
    padding-right: 26px;
}

.cgera-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cgera-calendar-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #044355;
    text-transform: capitalize;
}

.cal-nav-btn {
    background: #F9F7F7;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #044355;
    transition: all 0.2s ease;
}

.cal-nav-btn:hover {
    background: #ebf3fd;
    border-color: #1E66D6;
    color: #1E66D6;
}

.cgera-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.cal-day-header {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    padding: 6px 0;
}

.cal-day-header.dom {
    color: #dc2626;
}

.cal-days-container {
    display: contents;
}

.cal-day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    user-select: none;
}

.cal-day-cell:hover:not(.disabled) {
    background: #ebf3fd;
    color: #1E66D6;
}

.cal-day-cell.selected {
    background: #044355 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(4, 67, 85, 0.3);
}

.cal-day-cell.today {
    border-color: #1E66D6;
    font-weight: 700;
}

.cal-day-cell.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #F9F7F7;
    color: #94a3b8;
}

.cgera-cal-note {
    font-size: 12px;
    color: #64748b;
    margin-top: 16px;
    padding: 10px 12px;
    background: #F9F7F7;
    border-radius: 8px;
    line-height: 1.45;
    border: 1px solid #e9ecef;
}

/* Slots de Horas */
.cgera-slots-wrapper {
    display: flex;
    flex-direction: column;
}

.slots-header h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: #044355;
}

.slots-instruction {
    margin: 0 0 16px 0;
    font-size: 13.5px;
    color: #64748b;
}

.slots-notice {
    padding: 36px 20px;
    text-align: center;
    background: #F9F7F7;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 14px;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.slot-pill {
    padding: 11px 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    color: #044355;
}

.slot-pill:hover:not(.occupied) {
    border-color: #1E66D6;
    background: #ebf3fd;
    color: #1E66D6;
}

.slot-pill.selected {
    background: #044355 !important;
    border-color: #044355 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(4, 67, 85, 0.25);
}

.slot-pill.in-range {
    background: #ebf3fd;
    border-color: #1E66D6;
    color: #1E66D6;
}

.slot-pill.occupied {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.65;
}

.slots-summary {
    background: #F9F7F7;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    margin-top: auto;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.sum-title {
    color: #64748b;
}

.sum-val {
    font-weight: 700;
    color: #044355;
}

.sum-hours {
    color: #16a34a;
}

#btn-confirm-datetime {
    width: 100%;
    margin-top: 14px;
}

/* 7. PASO 3: FICHA DE CARGA */
.cgera-booking-form-wrap {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 30px;
    box-shadow: 0 4px 18px rgba(4, 67, 85, 0.04);
}

.cgera-booking-recap {
    display: flex;
    justify-content: space-around;
    background: #F9F7F7;
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    border-left: 4px solid #1E66D6;
}

.recap-item {
    font-size: 14px;
}

.recap-lbl {
    color: #64748b;
    margin-right: 6px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #044355;
    margin: 22px 0 4px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.form-section-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px 0;
}

.form-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row.col-2 {
    grid-template-columns: 1fr 1fr;
}

.form-row.col-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 13.5px;
    font-weight: 600;
    color: #044355;
    margin-bottom: 6px;
}

.form-group .req {
    color: #dc2626;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea {
    padding: 11px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #0F172A;
    transition: all 0.2s ease;
    background: #F9F7F7;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1E66D6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 102, 214, 0.25);
}

/* Radio Refrigerio */
.cgera-radio-group {
    display: flex;
    gap: 16px;
}

.cgera-radio-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: #F9F7F7;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    user-select: none;
    transition: all 0.2s ease;
    color: #044355;
}

.cgera-radio-pill input {
    display: none;
}

.cgera-radio-pill .pill-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cgera-radio-pill input:checked + .pill-circle {
    border-color: #1E66D6;
    background: #1E66D6;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.cgera-radio-pill:has(input:checked) {
    background: #ebf3fd;
    border-color: #1E66D6;
    color: #044355;
}

/* Requerimientos con Redondel para Elegir */
.cgera-reqs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 6px;
}

.cgera-req-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #F9F7F7;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    color: #044355;
}

.cgera-req-item input {
    display: none;
}

.req-round-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #94a3b8;
    background: #ffffff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cgera-req-item input:checked + .req-round-btn {
    border-color: #1E66D6;
    background: #1E66D6;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.cgera-req-item:has(input:checked) {
    background: #ebf3fd;
    border-color: #1E66D6;
    color: #044355;
}

.req-label {
    font-size: 13px;
    font-weight: 600;
}

.hint-text {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 8px 0;
}

/* 8. BOTONES PRINCIPALES */
.cgera-btn-primary {
    background: #044355;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(4, 67, 85, 0.2);
}

.cgera-btn-primary:hover {
    background: #1E66D6;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(30, 102, 214, 0.35);
}

.btn-large {
    width: 100%;
    padding: 15px 24px;
    font-size: 16px;
    border-radius: 10px;
}

.cgera-btn-secondary {
    background: #ffffff;
    color: #044355;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cgera-btn-secondary:hover {
    background: #ebf3fd;
    border-color: #1E66D6;
    color: #1E66D6;
}

/* 9. PASO 4: ÉXITO */
.cgera-success-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(4, 67, 85, 0.05);
}

.success-icon-wrap {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #ebf3fd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.cgera-success-card h2 {
    font-size: 26px;
    font-weight: 700;
    color: #044355;
    margin: 0 0 10px 0;
}

.success-subtitle {
    font-size: 16px;
    color: #475569;
    margin: 0 0 24px 0;
}

.cgera-code-badge {
    background: #ebf3fd;
    color: #1E66D6;
    padding: 4px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 16px;
    border: 1px solid rgba(30, 102, 214, 0.4);
}

.success-notice-box {
    max-width: 600px;
    margin: 0 auto 24px;
    background: #ebf3fd;
    border-left: 4px solid #1E66D6;
    padding: 16px 20px;
    border-radius: 6px;
    text-align: left;
}

.success-notice-box h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
    color: #044355;
}

.success-notice-box p {
    margin: 0;
    font-size: 14px;
    color: #044355;
    line-height: 1.5;
}

.success-details-box {
    max-width: 600px;
    margin: 0 auto 30px;
    background: #F9F7F7;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    font-size: 14px;
}

.success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Alertas */
.cgera-alert-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* 10. RESPONSIVE */
@media (max-width: 768px) {
    .cgera-clean-title {
        font-size: 26px;
    }
    .cgera-clean-equipment {
        border-radius: 16px;
        flex-direction: column;
        gap: 10px;
    }
    .cgera-rooms-grid {
        grid-template-columns: 1fr;
    }
    .cgera-schedule-container {
        grid-template-columns: 1fr;
    }
    .cgera-calendar-wrapper {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-right: 0;
        padding-bottom: 24px;
    }
    .form-row.col-2, .form-row.col-3 {
        grid-template-columns: 1fr;
    }
    .cgera-reqs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cgera-steps-bar {
        padding: 12px;
    }
    .step-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .cgera-reqs-grid {
        grid-template-columns: 1fr;
    }
}
