/**
 * TT Popup Styles
 *
 * @package TT_Flux_Addon
 * @since 1.1.8
 */

/* Popup Wrapper */
.tt-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.tt-popup.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Overlay */
.tt-popup__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

/* Container */
.tt-popup__container {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    width: 600px;
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Close Button */
.tt-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.tt-popup__close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.tt-popup__close svg {
    width: 18px;
    height: 18px;
    fill: #333;
}

/* Content */
.tt-popup__content {
    padding: 0;
}

/* ============================================
   SITE VERIFY (gate)
   ============================================ */

/* Above regular popups; it is rendered open, so there is no fade-in to wait for. */
.tt-popup--verify {
    z-index: 100000;
}

/* Full screen layout: the popup content fills the screen instead of a 600px box.
   The container is transparent so the overlay color (and the Elementor content's own
   background) is what the visitor sees; use an opaque overlay color for a solid page. */
.tt-popup--fullscreen .tt-popup__container {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.tt-popup--fullscreen .tt-popup__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

/* Returning visitors are marked in the <head> before the page paints, so the gate never flashes. */
html.tt-flux-verified .tt-popup--verify {
    display: none !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade In */
.tt-popup__animation--fade {
    opacity: 0;
    transform: scale(0.95);
}

.tt-popup.is-active .tt-popup__animation--fade {
    opacity: 1;
    transform: scale(1);
}

/* Slide Up */
.tt-popup__animation--slide-up {
    opacity: 0;
    transform: translateY(60px);
}

.tt-popup.is-active .tt-popup__animation--slide-up {
    opacity: 1;
    transform: translateY(0);
}

/* Zoom In */
.tt-popup__animation--zoom-in {
    opacity: 0;
    transform: scale(0.5);
}

.tt-popup.is-active .tt-popup__animation--zoom-in {
    opacity: 1;
    transform: scale(1);
}

/* Slide Left */
.tt-popup__animation--slide-left {
    opacity: 0;
    transform: translateX(60px);
}

.tt-popup.is-active .tt-popup__animation--slide-left {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .tt-popup__container {
        width: 92vw;
        max-height: 85vh;
        border-radius: 8px;
    }

    .tt-popup--fullscreen .tt-popup__container {
        width: 100%;
        max-height: none;
        border-radius: 0;
    }

    .tt-popup__close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }
}
