.tt-popup[hidden] {
    display: none !important;
}

.tt-popup {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.tt-popup--open {
    opacity: 1;
    visibility: visible;
}

.tt-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(2px);
}

.tt-popup__placement {
    position: absolute;
    inset: 0;
    display: flex;
    padding: 24px;
    pointer-events: none;
}

.tt-popup__placement--center {
    align-items: center;
    justify-content: center;
}

.tt-popup__placement--bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
}

.tt-popup__placement--bottom-left {
    align-items: flex-end;
    justify-content: flex-start;
}

.tt-popup__dialog {
    position: relative;
    width: min(var(--tt-popup-width, 640px), 100%);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow: auto;
    border-radius: 3px;
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
    pointer-events: auto;
    transform: translateY(12px) scale(.985);
    transition: transform .2s ease;
    overscroll-behavior: contain;
}

.tt-popup--open .tt-popup__dialog {
    transform: translateY(0) scale(1);
}

.tt-popup__dialog:focus {
    outline: none;
}

.tt-popup__close {
    position: absolute;
    z-index: 2;
    top: 6px;
    right: 6px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(10, 10, 10, .82);
    color: #fff;
    font: 300 27px/1 Arial, sans-serif;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

.tt-popup__close:hover,
.tt-popup__close:focus-visible {
    background: #f26722;
    transform: scale(1.06);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.tt-popup__content {
    padding: clamp(24px, 4vw, 38px);
    font-size: 16px;
    line-height: 1.65;
}

/* Tailwind preflight resets heading sizes and content spacing globally. */
.tt-popup__content h1,
.tt-popup__content h2,
.tt-popup__content h3,
.tt-popup__content h4,
.tt-popup__content h5,
.tt-popup__content h6 {
    margin: 1.1em 0 .5em;
    color: inherit;
    font-weight: 600 !important;
}

.tt-popup__content h1 {
    font-size: clamp(2rem, 5vw, 2.5rem) !important;
    line-height: 1.15 !important;
}

.tt-popup__content h2 {
    font-size: clamp(1.65rem, 4vw, 2rem) !important;
    line-height: 1.2 !important;
}

.tt-popup__content h3 {
    font-size: clamp(1.35rem, 3vw, 1.55rem) !important;
    line-height: 1.3 !important;
}

.tt-popup__content h4 {
    font-size: 1.2rem !important;
    line-height: 1.35 !important;
}

.tt-popup__content h5 {
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
}

.tt-popup__content h6 {
    font-size: .95rem !important;
    line-height: 1.45 !important;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tt-popup__content p,
.tt-popup__content ul,
.tt-popup__content ol,
.tt-popup__content blockquote,
.tt-popup__content figure,
.tt-popup__content table {
    margin: 0 0 1em;
}

.tt-popup__content ul,
.tt-popup__content ol {
    padding-left: 1.6em;
}

.tt-popup__content ul {
    list-style: disc outside;
}

.tt-popup__content ol {
    list-style: decimal outside;
}

.tt-popup__content a:not(.wp-block-button__link) {
    color: #d95413;
    text-decoration: underline;
    text-underline-offset: .15em;
}

.tt-popup__content blockquote {
    padding-left: 1em;
    border-left: 4px solid #f26722;
}

.tt-popup__content > :first-child {
    margin-top: 0;
}

.tt-popup__content > :last-child {
    margin-bottom: 0;
}

.tt-popup__content img {
    max-width: 100%;
    height: auto;
}

.tt-popup-lock {
    overflow: hidden !important;
}

@media (max-width: 600px) {
    .tt-popup__placement {
        padding: 8px;
    }

    .tt-popup__dialog {
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
    }

    .tt-popup__content {
        padding: 22px 16px 18px;
    }

    .tt-popup__close {
        top: 4px;
        right: 4px;
        width: 30px;
        height: 30px;
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tt-popup,
    .tt-popup__dialog {
        transition: none;
    }
}
