.tps-popup-root {
    position: fixed;
    inset: 0;
    z-index: 100000;
    pointer-events: none;
}

.tps-popup-root.is-open {
    pointer-events: auto;
}

.tps-popup-overlay {
    position: absolute;
    inset: 0;
    background: #17243d;
}

.tps-popup-stage {
    position: absolute;
    inset: 0;
    display: flex;
    padding: 1.25rem;
}

.tps-popup-stage[data-position="center"] {
    align-items: center;
    justify-content: center;
}

.tps-popup-stage[data-position="top"] {
    align-items: flex-start;
    justify-content: center;
}

.tps-popup-stage[data-position="bottom"] {
    align-items: flex-end;
    justify-content: center;
}

.tps-popup-stage[data-position="bottom_right"] {
    align-items: flex-end;
    justify-content: flex-end;
}

.tps-popup-stage[data-position="bottom_left"] {
    align-items: flex-end;
    justify-content: flex-start;
}

.tps-popup-dialog {
    position: relative;
    width: min(100%, var(--tps-popup-width, 600px));
    max-height: calc(100vh - 2.5rem);
    overflow: auto;
    background: #fff;
    color: #252525;
    border: 1px solid rgba(23, 36, 61, 0.12);
    box-shadow: 0 18px 50px rgba(23, 36, 61, 0.28);
    font-family: Inter, "Segoe UI", sans-serif;
}

.tps-popup-dialog[data-width="small"] { --tps-popup-width: 400px; }
.tps-popup-dialog[data-width="medium"] { --tps-popup-width: 600px; }
.tps-popup-dialog[data-width="large"] { --tps-popup-width: 800px; }
.tps-popup-dialog[data-width="full"] { --tps-popup-width: 1100px; }

.tps-popup-close {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: #17243d;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.tps-popup-close:focus-visible {
    outline: 2px solid #b89b5e;
}

.tps-popup-media img {
    display: block;
    width: 100%;
    height: auto;
}

.tps-popup-body {
    padding: 1.25rem 1.35rem 1.45rem;
}

.tps-popup-title {
    margin: 0 0 0.7rem;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.7rem;
    color: #17243d;
}

.tps-popup-html h1,
.tps-popup-html h2,
.tps-popup-html h3 {
    font-family: "Cormorant Garamond", Georgia, serif;
    color: #17243d;
    margin: 0 0 0.6rem;
}

.tps-popup-html p {
    margin: 0 0 0.7rem;
    line-height: 1.55;
}

.tps-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.tps-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 1.1rem;
    border: 1px solid #b89b5e;
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
}

.tps-popup-btn--primary {
    background: #b89b5e;
    color: #17243d;
}

.tps-popup-btn--secondary {
    background: #7b1e2b;
    border-color: #7b1e2b;
    color: #fff;
}

.tps-popup-btn--outline,
.tps-popup-btn--custom {
    background: transparent;
    color: #17243d;
}

.tps-popup-dialog[data-layout="split"] .tps-popup-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.tps-popup-root .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 720px) {
    .tps-popup-stage {
        padding: 0.75rem;
    }

    .tps-popup-dialog {
        width: min(92vw, var(--tps-popup-width, 600px));
        max-height: 90vh;
    }

    .tps-popup-dialog[data-layout="split"] .tps-popup-inner {
        grid-template-columns: 1fr;
    }

    .tps-popup-actions {
        flex-direction: column;
    }

    .tps-popup-btn {
        width: 100%;
        min-height: 44px;
    }
}
