/* GITEX Modal Styles */

/* =============================================
   Apple-style popup: scales from/to the trigger
   button position using transform-origin set by JS
   ============================================= */
.gitex-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Backdrop fades independently */
    background: rgba(15, 23, 42, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition:
        background   0.35s ease,
        backdrop-filter 0.35s ease,
        -webkit-backdrop-filter 0.35s ease;
    pointer-events: none; /* off by default; JS enables when open */
}

.gitex-modal-overlay.gitex-open {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
}

/* Hidden utility (used before first open) */
.gitex-modal-overlay.hidden {
    display: none;
}

/* ---- The card itself ---- */
.gitex-modal-card {
    position: relative;
    width: 100%;
    max-width: 48rem;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    margin: auto;
    background: white;
    border-radius: 1rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.06),
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;

    /* Collapsed state — tiny dot at transform-origin (set by JS) */
    transform: scale(0.01);
    opacity: 0;

    /* Apple spring easing on open */
    transition:
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        opacity   0.25s ease;

    /* transform-origin is overridden inline by JS per button position */
    transform-origin: bottom right;
    will-change: transform, opacity;
}

/* Expanded / open state */
.gitex-modal-overlay.gitex-open .gitex-modal-card {
    transform: scale(1);
    opacity: 1;
}

/* Closing: snappier collapse back to origin */
.gitex-modal-overlay.gitex-closing .gitex-modal-card {
    transform: scale(0.01);
    opacity: 0;
    transition:
        transform 0.7s cubic-bezier(0.4, 0, 1, 1),
        opacity   0.5s ease;
}

/* Header Section */
.gitex-modal-header {
    position: relative;
    width: 100%;
    height: 9rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.95), rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.9));
}

.gitex-header-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #f8fafc, rgba(248, 250, 252, 0.7), rgba(241, 245, 249, 0.9));
    pointer-events: none;
}

.gitex-city-skyline {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    opacity: 0.75;
    transform: translateY(-15px);
}

.gitex-logo-container {
    position: relative;
    z-index: 10;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-42px);
}

.gitex-logo-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.gitex-logo {
    height: 2.75rem;
    width: auto;
    object-fit: contain;
}

.gitex-logo-img {
    height: 3rem;
}

.gitex-logo-divider {
    height: 2rem;
    width: 1px;
    background: rgba(226, 232, 240, 0.8);
}

.gitex-close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.6);
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gitex-close-btn:hover {
    background: white;
    color: #1e293b;
}

.gitex-close-btn .material-symbols-outlined {
    font-size: 18px;
}

/* Modal Content */
.gitex-modal-content {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gitex-content-inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.gitex-header-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 26rem;
}

.gitex-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(107, 165, 28, 0.1);
    border: 1px solid rgba(107, 165, 28, 0.25);
    width: fit-content;
}

.gitex-badge-dot {
    position: relative;
    display: flex;
    height: 0.5rem;
    width: 0.5rem;
}

.gitex-badge-dot::before {
    content: '';
    position: absolute;
    display: flex;
    height: 100%;
    width: 100%;
    border-radius: 9999px;
    background: #6ba51c;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.gitex-badge-dot::after {
    content: '';
    position: relative;
    display: inline-flex;
    border-radius: 9999px;
    height: 0.5rem;
    width: 0.5rem;
    background: #6ba51c;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Ping animation for location icon */
.gitex-location-badge .material-symbols-outlined {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gitex-location-badge .material-symbols-outlined::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(107, 165, 28, 0.3);
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
}

.gitex-badge-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6ba51c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.gitex-badge-location-icon {
    font-size: 14px;
    vertical-align: middle;
    margin: 0 0.125rem;
    color: #6ba51c;
}

.gitex-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin: 0;
}

.gitex-brand-highlight {
    color: #6ba51c;
}

.gitex-description {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.gitex-location-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
    height: fit-content;
}

.gitex-location-info-mobile {
    display: none;
}

.gitex-location-info-desktop {
    display: flex;
}

.gitex-location-badge {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 500;
}

.gitex-location-badge .material-symbols-outlined {
    color: #6ba51c;
    font-size: 19px;
    flex-shrink: 0;
}

.gitex-venue-text {
    font-size: 0.75rem;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1.5;
    max-width: 241px;
    text-align: end;
}

.gitex-venue-text .material-symbols-outlined {
    font-size: 14px;
    color: #64748b;
    align-self: self-start;
    margin-top: 3px;    
}

/* Features Grid */
.gitex-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 0.25rem 0;
}

.gitex-feature-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.6);
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 500;
}

.gitex-feature-item .material-symbols-outlined {
    color: #6ba51c;
    font-size: 18px;
}

/* Actions */
.gitex-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.gitex-btn-secondary {
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.gitex-btn-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
}

.gitex-btn-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background: #6ba51c;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.gitex-btn-primary:hover {
    background: #598c14;
    color: white;
}

.gitex-btn-primary .material-symbols-outlined {
    font-size: 17px;
}

/* ── Thank-you state (shown when ?booked in URL) ── */
.gitex-thankyou-content {
    display: none;
    padding: 2rem 2rem 2.5rem;
}

.gitex-modal-card.gitex-booked #gitex-modal-body {
    display: none;
}

.gitex-modal-card.gitex-booked .gitex-thankyou-content {
    display: block;
}

.gitex-thankyou-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.gitex-thankyou-icon {
    font-size: 3.5rem;
    color: #6ba51c;
    animation: gitexPopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gitexPopIn {
    from {
        transform: scale(0.3);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.gitex-thankyou-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0;
}

.gitex-thankyou-desc {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* Reopen Button */
.gitex-reopen-btn {
    position: fixed;
    bottom: 10rem;
    right: 1rem;
    z-index: 99999;
    padding: 0.625rem 1rem;
    border-radius: 9999px;
    background: #6ba51c;
    border: none;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, background 0.2s ease;
    opacity: 1;
    transform: scale(1);
    transform-origin: center right;
}

.gitex-reopen-btn:hover {
    transform: scale(1.05);
    background: #598c14;
}

.gitex-reopen-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.6);
}

.gitex-reopen-btn .material-symbols-outlined {
    font-size: 18px;
}

/* Responsive Styles for 1440px - 1092px screens */
@media (max-width: 1440px) and (min-width: 1092px) {
    .gitex-modal-header {
        height: 6.5rem;
        padding: 0.75rem 1.25rem;
    }

    .gitex-modal-content {
        padding: 0.75rem 1.25rem;
        gap: 0.75rem;
    }

    .gitex-content-inner {
        gap: 0.75rem;
    }

    .gitex-header-section {
        gap: 0.25rem;
    }

    .gitex-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .gitex-description {
        font-size: 0.8125rem;
        line-height: 1.4;
    }

    .gitex-badge {
        padding: 0.125rem 0.5rem;
    }

    .gitex-badge-text {
        font-size: 0.625rem;
    }

    .gitex-location-info {
        gap: 0.25rem;
    }

    .gitex-location-badge {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .gitex-venue-text {
        font-size: 0.625rem;
    }

    .gitex-features-grid {
        gap: 0.375rem;
    }

    .gitex-feature-item {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        gap: 0.375rem;
    }

    .gitex-actions {
        gap: 0.375rem;
        padding-top: 0.25rem;
    }

    .gitex-btn-secondary,
    .gitex-btn-primary {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }

    .gitex-logo-wrapper {
        padding: 0.375rem 0.75rem;
        gap: 0.75rem;
    }

    .gitex-logo {
        height: 2rem;
    }

    .gitex-logo-img {
        height: 2.25rem;
    }

    .gitex-logo-divider {
        height: 1.5rem;
    }
}

/* Responsive Styles */
@media (min-width: 640px) {
    .gitex-modal-header {
        height: 10rem;
        padding: 1.5rem 2rem;
    }

    .gitex-logo {
        height: 3rem;
    }

    .gitex-logo-img {
        height: 3rem;
    }

    .gitex-title {
        font-size: 1.75rem;
    }

    .gitex-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gitex-actions {
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 767px) {
    .gitex-modal-overlay {
        padding: 0.75rem;
    }

    .gitex-modal-card {
        max-height: calc(100dvh - 1.5rem);
    }

    .gitex-modal-header {
        height: 7.5rem;
        padding: 0.875rem 1rem;
        flex-shrink: 0;
    }

    .gitex-logo-container {
        transform: translateY(-25px);
    }

    .gitex-logo-wrapper {
        padding: 0.4rem 0.875rem;
        gap: 0.75rem;
    }

    .gitex-logo {
        height: 2.25rem;
    }

    .gitex-logo-img {
        height: 2.35rem;
    }

    .gitex-modal-content {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .gitex-title {
        font-size: 1.35rem;
    }

    .gitex-description {
        font-size: 0.85rem;
    }

    .gitex-features-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .gitex-content-inner {
        flex-direction: column;
    }

    .gitex-location-info-desktop {
        display: none !important;
    }

    .gitex-location-info-mobile {
        display: flex !important;
        align-items: flex-start;
        margin: 0.25rem 0 0.5rem 0;
        gap: 0.35rem;
    }

    .gitex-location-info-mobile .gitex-location-badge {
        padding: 0.375rem 0.625rem;
        font-size: 0.8125rem;
    }

    .gitex-location-info-mobile .gitex-venue-text {
        display: block;
        font-size: 0.75rem;
        padding-left: 0.25rem;
    }

    .gitex-actions {
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 0.25rem;
    }

    .gitex-btn-secondary,
    .gitex-btn-primary {
        width: 100%;
        padding: 0.625rem 1rem;
    }

    .gitex-thankyou-content {
        padding: 1.5rem 1.25rem 2rem;
    }

    .gitex-thankyou-title {
        font-size: 1.25rem;
    }

    .gitex-thankyou-desc {
        font-size: 0.875rem;
    }
}
