/* ============================================================
   GEK MODAL — Right drawer style
   Replace this file in BOTH:
     gek-courses/assets/css/gek-modal.css
     gek-hotels/assets/css/gek-modal.css
   ============================================================ */

/* Overlay */
.gek-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    z-index: 99999;
    align-items: stretch;
    justify-content: flex-end;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.gek-modal-overlay.is-open {
    display: flex;
    animation: gekFadeIn 220ms ease forwards;
}

@keyframes gekFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Drawer panel */
.gek-modal {
    background: #ffffff;
    border-radius: 24px 0 0 24px;
    width: 100%;
    max-width: 720px;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    padding: 36px 28px 40px;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.2);
    animation: gekSlideInRight 280ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
    flex-shrink: 0;
}

.gek-modal::-webkit-scrollbar       { width: 4px; }
.gek-modal::-webkit-scrollbar-track { background: transparent; }
.gek-modal::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

@keyframes gekSlideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

/* Close button */
.gek-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #7AC143;
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 160ms ease, transform 160ms ease;
    padding: 0;
}

.gek-modal-close:hover {
    background: #6aaa38;
    transform: scale(1.1);
}

/* Loading spinner */
.gek-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.gek-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e8f5e0;
    border-top-color: #7AC143;
    border-radius: 50%;
    animation: gekSpin 700ms linear infinite;
}

@keyframes gekSpin {
    to { transform: rotate(360deg); }
}

/* Book Now button — shared */
.gek-book-btn {
    display: inline-block;
    background: #7AC143;
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    padding: 13px 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    margin-top: 24px;
    transition: background 180ms ease, transform 150ms ease;
    font-family: 'DM Sans', sans-serif;
}

.gek-book-btn:hover {
    background: #6aaa38;
    transform: scale(1.03);
}

/* TablePress overrides inside modal */
.gek-modal .tablepress {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0 !important;
}

.gek-modal .tablepress thead th {
    background: #7AC143;
    color: #ffffff;
    padding: 10px 12px;
    text-align: left !important;
    font-weight: 600;
    font-size: 14px;
}

.gek-modal .tablepress tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #323232;
    font-size: 14px;
}

.gek-modal .tablepress tbody tr:last-child td {
    border-bottom: none;
}

.gek-modal .tablepress tbody tr:nth-child(even) td {
    background: #fafafa;
}

/* Mobile — full width, radius top only */
@media (max-width: 520px) {
    .gek-modal {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        height: 92vh;
        margin-top: auto;
        padding: 28px 18px 32px;
        animation: gekSlideInBottom 280ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
    }

    .gek-modal-overlay {
        align-items: flex-end;
        justify-content: stretch;
    }

    @keyframes gekSlideInBottom {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }
}