/* ============================================
   BOOKING MODAL - 3 STEP WIZARD
   ============================================ */

/* Modal Overlay */
.booking-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.booking-modal-overlay.active {
    display: flex;
}

/* Modal Container -- 90% del viewport en pantallas grandes, para
   aprovechar el espacio (antes tenía un max-width fijo de 800px que dejaba
   mucho margen vacío a los lados en monitores anchos). */
.booking-modal {
    background: white;
    border-radius: 12px;
    width: 90vw;
    max-width: 90vw;
    height: 90vh;
    max-height: 90vh;
    overflow: hidden; /* El scroll va solo en el body */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header - fija, no scrollea */
.booking-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.booking-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.booking-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.booking-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Progress Steps - fija, no scrollea */
.booking-steps {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: #f8f9fa;
    flex-shrink: 0;
    border-bottom: 1px solid #e0e0e0;
}

.booking-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.booking-step::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.booking-step:last-child::after {
    display: none;
}

.booking-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ddd;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.booking-step.active .booking-step-number {
    background: #3b6e40;
    color: white;
}

.booking-step.completed .booking-step-number {
    background: #28a745;
    color: white;
}

.booking-step-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.booking-step.active .booking-step-label {
    color: #3b6e40;
    font-weight: 600;
}

/* Modal Body - único elemento con scroll */
.booking-modal-body {
    padding: 30px;
    flex: 1 1 0;
    overflow-y: auto;
    min-height: 0; /* necesario para que flex+overflow funcione */
}

/* Step Content */
.booking-step-content {
    display: none;
}

.booking-step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Form Groups */
.booking-form-group {
    margin-bottom: 20px;
}

.booking-form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.booking-form-input,
.booking-form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.booking-form-input:focus,
.booking-form-select:focus {
    outline: none;
    border-color: #3b6e40;
}

.booking-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.booking-form-row--three {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* Pax counter row: label+description left, buttons right */
.booking-pax-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e8f0e8;
}
.booking-pax-row:last-of-type {
    border-bottom: none;
}
.booking-pax-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.booking-pax-info .booking-form-label {
    margin: 0;
}

/* Pax description (Kids / Infants) */
.booking-pax-description {
    font-size: 0.75rem;
    color: #6b7c6b;
    margin: 2px 0 6px;
    line-height: 1.3;
}

/* Number Input Group */
.booking-number-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.booking-number-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #3b6e40;
    background: white;
    color: #3b6e40;
    border-radius: 8px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-number-btn:hover:not(:disabled) {
    background: #3b6e40;
    color: white;
}

.booking-number-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.booking-number-display {
    flex: 1;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Price Summary Box */
.booking-price-summary {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.booking-price-summary-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b6e40;
}

.booking-price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
}

.booking-price-label {
    color: #666;
}

.booking-price-value {
    font-weight: 600;
    color: #2c3e50;
}

.booking-price-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
}

.booking-price-total-label {
    color: #2c3e50;
}

.booking-price-total-value {
    color: #3b6e40;
    font-size: 1.4rem;
}

.booking-price-note {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    margin-top: 10px;
}

/* Terms checkbox row */
.booking-terms-row {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f0f5f0;
    border: 1px solid #c8dfc8;
    border-radius: 8px;
}
.booking-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e2c;
    font-weight: 500;
    line-height: 1.4;
}
.booking-terms-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: #3b6e40;
    cursor: pointer;
}
.booking-terms-link {
    color: #3b6e40;
    font-weight: 700;
    text-decoration: underline;
}
.booking-terms-link:hover {
    color: #2c5230;
}

/* Disabled state for action buttons */
.booking-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Terms inner modal */
.booking-terms-modal {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 20;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}
.booking-terms-modal.active {
    display: flex;
}
.booking-terms-modal-box {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 580px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    overflow: hidden;
}
.booking-terms-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f8f8;
}
.booking-terms-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #2c3e2c;
}
.booking-terms-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0 4px;
}
.booking-terms-modal-close:hover { color: #333; }
.booking-terms-modal-body {
    padding: 20px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: #444;
    line-height: 1.6;
}
.booking-terms-modal-body h2 {
    font-size: 1rem;
    color: #2c3e2c;
    margin: 0 0 12px;
}
.booking-terms-modal-body h3 {
    font-size: 0.9rem;
    color: #3b6e40;
    margin: 18px 0 6px;
}
.booking-terms-modal-body ul {
    padding-left: 18px;
    margin: 6px 0;
}
.booking-terms-modal-body a {
    color: #3b6e40;
}

/* Summary Sections */
.booking-summary-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.booking-summary-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #495057;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
}

.booking-summary-item-label {
    color: #666;
    font-weight: 500;
}

.booking-summary-item-value {
    color: #2c3e50;
    font-weight: 600;
    text-align: right;
}

/* ============================================
   OPTIONAL ACTIVITIES - STEP 3
   ============================================ */
.booking-addons-header {
    margin-bottom: 20px;
}

.booking-addons-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #3b6e40;
    margin: 0 0 5px 0;
}

.booking-addons-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.booking-activities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 20px;
}

.booking-activity-card {
    position: relative;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-color: #2d6a4f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid transparent;
}

.booking-activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.booking-activity-card.selected {
    border-color: #3b6e40;
    box-shadow: 0 0 0 3px rgba(59, 110, 64, 0.4);
}

.booking-activity-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 1rem;
    transition: background 0.3s ease;
}

.booking-activity-card:hover .booking-activity-card-overlay {
    background: linear-gradient(to top, rgba(59,110,64,0.9) 0%, rgba(59,110,64,0.5) 55%, transparent 100%);
}

.booking-activity-card.selected .booking-activity-card-overlay {
    background: linear-gradient(to top, rgba(59,110,64,0.95) 0%, rgba(59,110,64,0.6) 55%, rgba(59,110,64,0.1) 100%);
}

.booking-activity-card-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.booking-activity-card-check svg {
    width: 14px;
    height: 14px;
    stroke: white;
    opacity: 0;
    transition: opacity 0.3s;
}

.booking-activity-card.selected .booking-activity-card-check {
    background: #3b6e40;
    border-color: #3b6e40;
}

.booking-activity-card.selected .booking-activity-card-check svg {
    opacity: 1;
}

.booking-activity-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.booking-activity-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: #a8e6a3;
}

.booking-activity-card-price span {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    margin-left: 2px;
}

.booking-activity-card-duration {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.8);
    margin-top: 2px;
}

.booking-no-addons {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
    font-size: 1rem;
}

/* ============================================
   STICKY ACTION BUTTONS (visible from step 3+)
   ============================================ */
.booking-sticky-actions {
    flex-shrink: 0;
    background: #fff;
    border-top: 2px solid #3b6e40;
    padding: 15px 30px;
    display: flex;
    gap: 12px;
    z-index: 10;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.12);
}

.booking-sticky-actions .booking-action-btn {
    flex: 1;
}

/* Action Buttons Group (kept for compatibility) */
.booking-actions-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.booking-action-btn {
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: white;
}

.booking-action-btn-icon {
    font-size: 1.5rem;
}

.booking-action-btn-text {
    font-size: 0.9rem;
}

.booking-action-btn-soon {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.8;
    font-style: italic;
}

.booking-btn-izipay {
    background: #6c9f3f;
}

.booking-btn-izipay:hover:not(:disabled) {
    background: #5a8835;
    transform: translateY(-2px);
}

.booking-btn-izipay:disabled {
    background: #b0b0b0;
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

.booking-btn-whatsapp {
    background: #25D366;
    position: relative;
}

.booking-btn-whatsapp:hover {
    background: #20BA5A;
    transform: translateY(-2px);
}

.booking-whatsapp-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ee7326;
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.booking-btn-email {
    background: #6c9f3f;
}

.booking-btn-email:hover {
    background: #5a8835;
    transform: translateY(-2px);
}

/* Modal Footer - fija al fondo */
.booking-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-shrink: 0;
    background: #fff;
}

.booking-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.booking-btn-secondary {
    background: #6c757d;
    color: white;
}

.booking-btn-secondary:hover {
    background: #5a6268;
}

.booking-btn-primary {
    background: #3b6e40;
    color: white;
}

.booking-btn-primary:hover {
    background: #2d5531;
}

.booking-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Validation Message */
.booking-validation-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* Responsive -- celular y tablet ocupan el 95% de la pantalla (ancho y
   alto), para que se vea lo más grande posible sin quedar pegado a los
   bordes. */
@media (max-width: 1024px) {
    .booking-modal-overlay {
        padding: 8px;
    }

    .booking-modal {
        width: 95vw;
        max-width: 95vw;
        height: 95vh;
        max-height: 95dvh; /* evita el salto por la barra de direcciones en móviles */
        margin: 0;
        border-radius: 12px;
    }

    .booking-modal-header,
    .booking-modal-footer {
        padding: 15px 20px;
    }

    .booking-modal-body {
        padding: 20px;
    }

    .booking-modal-title {
        font-size: 1.4rem;
    }

    .booking-form-row {
        grid-template-columns: 1fr;
    }

    .booking-actions-group {
        grid-template-columns: 1fr;
    }
}

/* NOTA: este bloque @media (max-width:768px) traía todas estas reglas sin
   su llave de apertura (se perdió en una edición anterior), lo que las
   dejaba aplicándose SIEMPRE (ej. .booking-btn{width:100%} en escritorio
   también) -- restaurado. */
@media (max-width: 768px) {
    .booking-activities-grid {
        grid-template-columns: 1fr;
    }

    .booking-sticky-actions {
        padding: 12px 20px;
        flex-direction: column;
    }

    .booking-steps {
        padding: 12px 20px;
    }

    .booking-step-label {
        font-size: 0.72rem;
    }

    .booking-modal-footer {
        flex-direction: column;
    }

    .booking-btn {
        width: 100%;
    }
}

/* ============================================
   AÑADIDO -- wizard SIS-2026 (Ecolucerna): opciones de
   habitación seleccionables dentro del propio paso 1.
   ============================================ */
.rbl-opcion {
    margin-bottom: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rbl-opcion:not(.rbl-opcion-disabled):hover {
    border-color: #a8cf9f !important;
    box-shadow: 0 2px 10px rgba(59, 110, 64, 0.15);
}
.rbl-opcion.selected {
    background: #f0f5f0;
}
@media (max-width: 480px) {
    .booking-pax-row { flex-wrap: wrap; }
}

/* Fila de resumen "plana" (label a la izquierda, valor a la derecha) --
   mismo estilo que .booking-summary-item de arriba, pero con nombre propio
   para no chocar con el .booking-summary-item "con ícono" de más abajo
   (tarjeta Your Selection), que es un diseño visual distinto. */
.rbl-resumen-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
}

/* Título de paso destacado (ej. "Choose your room") -- antes era una
   .booking-form-label chiquita y a la izquierda, fácil de pasar por alto;
   ahora es grande, centrada y con ícono para que quede claro qué sigue. */
.rbl-paso-titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c5230;
    margin: 24px 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

/* Cajas de acciones finales del paso 3: separadas visualmente para que
   quede claro que son dos caminos distintos -- pagar en línea (aún no
   disponible) vs. coordinar por WhatsApp/correo. */
.rbl-acciones-caja {
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.rbl-acciones-caption {
    font-size: 0.85rem;
    margin: 0 0 12px;
    text-align: center;
    font-weight: 500;
    line-height: 1.4;
}
.rbl-acciones-caja--pago {
    background: #eef4fb;
    border: 1px solid #bcd4ec;
}
.rbl-acciones-caja--pago .rbl-acciones-caption { color: #2b5a86; }
.rbl-acciones-caja--contacto {
    background: #eef6ee;
    border: 1px solid #bcd9bc;
}
.rbl-acciones-caja--contacto .rbl-acciones-caption { color: #2c5230; }

@media (max-width: 480px) {
    .rbl-acciones-caja--contacto .booking-actions-group {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   BOOKING SUMMARY PREFILLED (Your Selection)
   ============================================ */
.booking-summary-prefilled {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f5f0 100%);
    border: 2px solid #3b6e40;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.booking-summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-summary-title i {
    color: #3b6e40;
    font-size: 1.3rem;
}

.booking-summary-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.booking-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.booking-summary-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #3b6e40;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.booking-summary-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f5f0;
    border-radius: 6px;
    color: #3b6e40;
    font-size: 1.2rem;
}

.booking-summary-details {
    flex: 1;
}

.booking-summary-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7c6b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.booking-summary-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Responsive: En pantallas pequeñas, los items se apilan */
@media (max-width: 768px) {
    .booking-summary-row {
        grid-template-columns: 1fr;
    }
}
