/* ============================================================
 * Evol'Up Platform — Booking Modal Styles
 * ============================================================ */

.evolup-booking-section .evolup-row-booked { opacity: 0.6; }

/* ============================================================
 * MODAL Z-INDEX — Divi stacking context override
 *
 * When modal opens, body gets .evolup-modal-body-lock.
 * This forces ALL Divi elements with high z-index DOWN to 1,
 * so our modal (at max z-index) sits above everything.
 * ============================================================ */

body.evolup-modal-body-lock { overflow: hidden !important; }

body.evolup-modal-body-lock .et_pb_section_1_tb_header,
body.evolup-modal-body-lock .et_pb_section--with-menu,
body.evolup-modal-body-lock .et_pb_sticky,
body.evolup-modal-body-lock .et_pb_sticky--top,
body.evolup-modal-body-lock [class*="et_pb_section"][class*="tb_header"] { z-index: 1 !important; }

body.evolup-modal-body-lock .dsm-advanced-tabs-wrapper,
body.evolup-modal-body-lock .dsm-advanced-tabs-container { z-index: 1 !important; position: relative !important; }

body.evolup-modal-body-lock .et_builder_inner_content { z-index: 1 !important; }

body.evolup-modal-body-lock .et_pb_section_1_tb_header[style*="z-index"] { z-index: 1 !important; }

body.evolup-modal-body-lock #wpadminbar { z-index: 1 !important; }

/* Catch inline z-index on Divi header */
body.evolup-modal-body-lock [style*="position: fixed"][style*="z-index: 10010"],
body.evolup-modal-body-lock [style*="position: fixed"][style*="z-index:10010"] { z-index: 1 !important; }

/* ---- Modal ---- */
#evolup-booking-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2147483647; display: none;
    align-items: center; justify-content: center;
}
#evolup-booking-modal.evolup-modal-open { display: flex !important; }

.evolup-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,.6); z-index: 1;
}
.evolup-modal-content {
    position: relative; z-index: 2; background: #fff;
    border-radius: 10px; padding: 30px 35px;
    max-width: 480px; width: 90%; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
    animation: evolup-modal-in .25s ease-out;
}
@keyframes evolup-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.evolup-modal-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; font-size: 26px;
    cursor: pointer; color: #999; line-height: 1; padding: 4px 8px; z-index: 3;
}
.evolup-modal-close:hover { color: #333; }
.evolup-modal-content h3 { margin: 0 0 8px; font-size: 20px; color: #1a3c5e; }
.evolup-modal-info { margin: 0 0 20px; color: #666; font-size: 14px; }

.evolup-field { margin-bottom: 16px; }
.evolup-field label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; color: #333; }
.evolup-field input {
    width: 100%; padding: 10px 12px; border: 1px solid #d0d5dd;
    border-radius: 6px; font-size: 15px; box-sizing: border-box; transition: border-color .2s;
}
.evolup-field input:focus { outline: none; border-color: #1a3c5e; box-shadow: 0 0 0 3px rgba(26,60,94,.1); }

.evolup-modal-actions { margin-top: 20px; }
.evolup-modal-actions .date-cta { width: 100%; text-align: center; display: block; box-sizing: border-box; }

#evolup-book-message { font-size: 14px; text-align: center; }
#evolup-book-message.evolup-msg-success { color: #27ae60; font-weight: 600; }
#evolup-book-message.evolup-msg-error { color: #e74c3c; font-weight: 600; }

@media (max-width: 768px) {
    .evolup-modal-content { padding: 24px 20px; width: 95%; max-height: 85vh; }
}
