/* All selectors are scoped to this popup; no existing theme styles are replaced. */
#azte-direct-banner-popup[hidden] {
    display: none !important;
}

#azte-direct-banner-popup {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    font: 400 16px/1.5 "Segoe UI", Tahoma, Arial, sans-serif;
    letter-spacing: normal;
    text-align: center;
    text-transform: none;
    color: #fff;
    isolation: isolate;
}

#azte-direct-banner-popup,
#azte-direct-banner-popup *,
#azte-direct-banner-popup *::before,
#azte-direct-banner-popup *::after {
    box-sizing: border-box;
}

#azte-direct-banner-popup .azte-popup__dialog {
    position: relative;
    display: block;
    width: 90%;
    max-width: 400px;
    min-width: 0;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(251, 230, 174, 0.35);
    border-radius: 15px;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
}

#azte-direct-banner-popup .azte-popup__content {
    display: block;
    max-height: calc(100vh - 34px);
    max-height: calc(100dvh - 34px);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #b67a2a #000;
}

#azte-direct-banner-popup .azte-popup__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    object-fit: contain;
}

#azte-direct-banner-popup .azte-popup__buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
    padding: 25px;
}

#azte-direct-banner-popup .azte-popup__button {
    position: relative;
    isolation: isolate;
    display: block;
    overflow: hidden;
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 16px;
    border: 0;
    border-radius: 50px;
    background: linear-gradient(108deg, #807855 2%, #b67a2a 98%);
    box-shadow: 0 0 10px rgba(245, 223, 130, 0.45);
    color: #640600;
    font: 700 16px/1.5 "Segoe UI", Tahoma, Arial, sans-serif;
    letter-spacing: normal;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    overflow-wrap: anywhere;
    cursor: pointer;
    animation: aztePopupButtonGlow 2.2s ease-in-out infinite;
    transition: background-color 0.3s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

#azte-direct-banner-popup .azte-popup__button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    z-index: -1;
    width: 45%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.15) 35%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.15) 65%, transparent 100%);
    transform: skewX(-22deg);
    animation: aztePopupButtonShine 2.4s ease-in-out infinite;
    pointer-events: none;
}

#azte-direct-banner-popup .azte-popup__button::after,
#azte-direct-banner-popup .azte-popup__close::before,
#azte-direct-banner-popup .azte-popup__close::after {
    content: none;
}

#azte-direct-banner-popup .azte-popup__button:visited {
    color: #640600;
}

#azte-direct-banner-popup .azte-popup__button:hover {
    background: linear-gradient(108deg, #fbe6ae 2%, #f5df82 98%);
    box-shadow: 0 0 22px rgba(251, 230, 174, 0.95);
    color: #640600;
    transform: translateY(-2px);
    animation: none;
}

#azte-direct-banner-popup .azte-popup__button:hover::before {
    animation-duration: 1.1s;
}

#azte-direct-banner-popup .azte-popup__footer {
    display: block;
    margin: 0;
    padding: 0 25px 25px;
    color: #898b90;
    font: 400 13px/1.6 "Segoe UI", Tahoma, Arial, sans-serif;
    letter-spacing: normal;
    overflow-wrap: anywhere;
}

#azte-direct-banner-popup .azte-popup__tagline {
    display: block;
    color: #898b90;
}

#azte-direct-banner-popup .azte-popup__copyright {
    display: block;
    color: #f5df82;
    font-weight: 600;
}

#azte-direct-banner-popup .azte-popup__close {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 7px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    color: #fff;
    font: 400 24px/1 Arial, sans-serif;
    letter-spacing: normal;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

#azte-direct-banner-popup .azte-popup__close span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    line-height: 1;
    transition: background-color 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

#azte-direct-banner-popup .azte-popup__close:hover span {
    background: rgba(0, 66, 37, 0.8);
    transform: rotate(90deg);
}

#azte-direct-banner-popup .azte-popup__close:focus-visible,
#azte-direct-banner-popup .azte-popup__button:focus-visible {
    outline: 2px solid #f5df82;
    outline-offset: 3px;
}

@keyframes aztePopupButtonShine {
    0% { left: -80%; }
    55%, 100% { left: 140%; }
}

@keyframes aztePopupButtonGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(245, 223, 130, 0.35); }
    50% { box-shadow: 0 0 16px rgba(251, 230, 174, 0.9), 0 0 28px rgba(182, 122, 42, 0.55); }
}

@media (prefers-reduced-motion: reduce) {
    #azte-direct-banner-popup .azte-popup__button,
    #azte-direct-banner-popup .azte-popup__button::before,
    #azte-direct-banner-popup .azte-popup__close span {
        animation: none;
        transition: none;
    }
}

@media print {
    #azte-direct-banner-popup {
        display: none !important;
    }
}
