/* ==========================================================================
   HOTELERA NUEVO AMANECER - ESTILOS GLOBALES DE MODALES (MODAL.CSS)
   ========================================================================== */

/* ======================================================
   1. MODAL DIALOG - PANEL DE ADMINISTRACIÓN (ADMIN MODALS)
   ====================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 13, 30, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #ffffff;
    border-radius: var(--radius-xl, 16px);
    width: 100%;
    max-width: 740px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04));
    transform: scale(0.95) translateY(-10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    border: 1px solid var(--border-light, #e2e8f0);
}

.modal-container form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.35rem 2rem;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
    background: #ffffff;
    flex-shrink: 0;
}

.modal-header .brand-modal {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.modal-header .brand-icon-modal {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #ffffff;
    border-radius: var(--radius-md, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-900, #0f172a);
    margin: 0;
}

.modal-header p {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    margin: 0.15rem 0 0 0;
}

.modal-close {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-muted, #64748b);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: var(--transition-smooth, all 0.2s ease);
}

.modal-close:hover {
    background: #fee2e2;
    color: var(--accent-rose, #f43f5e);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.6rem 2rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border-light, #e2e8f0);
    background: #f8fafc;
    flex-shrink: 0;
}

/* ======================================================
   2. MODAL DE RESERVA PÚBLICA (PUBLIC BOOKING MODAL)
   ====================================================== */
.booking-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
}

.booking-modal-overlay.active {
    display: flex;
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.booking-modal-card {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.booking-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #0284c7 100%);
    padding: 1.5rem 2rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.booking-modal-header-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.booking-modal-header-text p {
    font-size: 0.85rem;
    color: #93c5fd;
    margin-top: 0.2rem;
    margin-bottom: 0;
}

.booking-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.booking-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.booking-modal-body {
    padding: 1.75rem 2rem;
    overflow-y: auto;
    flex: 1;
}

.booking-summary-pill {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.booking-summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #0369a1;
    font-weight: 600;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.modal-form-group.full-width {
    grid-column: 1 / -1;
}

.modal-form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.modal-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.88rem;
    color: #0f172a;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
}

.modal-form-control:focus {
    background-color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.booking-modal-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-modal-cancel {
    padding: 0.75rem 1.25rem;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
    background: #f1f5f9;
}

.btn-modal-confirm {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transition: all 0.2s ease;
}

.btn-modal-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

@media (max-width: 640px) {
    .modal-form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-container, .booking-modal-card {
        padding: 0;
        max-height: 95vh;
    }
    
    .modal-header, .modal-body, .modal-footer,
    .booking-modal-header, .booking-modal-body, .booking-modal-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
