.tch-popup-open,
.tch-popup-open body {
    overflow: hidden;
}

.tch-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    padding: 20px;
    opacity: 1;
    transition: opacity 180ms ease;
}

.tch-overlay.tch-position-center {
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.58);
}

.tch-overlay:not(.tch-position-center) {
    pointer-events: none;
    background: transparent;
}

.tch-position-top-left {
    align-items: flex-start;
    justify-content: flex-start;
}

.tch-position-top-center {
    align-items: flex-start;
    justify-content: center;
}

.tch-position-top-right {
    align-items: flex-start;
    justify-content: flex-end;
}

.tch-position-bottom-center {
    align-items: flex-end;
    justify-content: center;
}

.tch-position-bottom-left {
    align-items: flex-end;
    justify-content: flex-start;
}

.tch-position-bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
}

.tch-overlay.tch-is-closing {
    opacity: 0;
}

.tch-dialog {
    width: min(100%, 560px);
    padding: 28px;
    border-radius: 14px;
    background: #ffffff;
    color: #1f2933;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
    font-family: inherit;
    pointer-events: auto;
}

.tch-dialog h2 {
    margin: 0 0 12px;
    color: inherit;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.25;
}

.tch-dialog p {
    margin: 0 0 18px;
    font-size: 1rem;
    line-height: 1.6;
}

.tch-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0 0 20px;
}

.tch-links a {
    color: #355d32;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 22px;
    border: 0;
    border-radius: 8px;
    background: #355d32;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.tch-button:hover,
.tch-button:focus-visible {
    background: #294a27;
}

.tch-button:focus-visible {
    outline: 3px solid #d6a84b;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .tch-overlay {
        padding: 12px;
    }

    .tch-position-top-left,
    .tch-position-top-right,
    .tch-position-top-center {
        align-items: flex-start;
        justify-content: center;
    }

    .tch-position-bottom-left,
    .tch-position-bottom-right,
    .tch-position-bottom-center {
        align-items: flex-end;
        justify-content: center;
    }

    .tch-dialog {
        padding: 22px;
        border-radius: 14px 14px 8px 8px;
    }

    .tch-position-top-left .tch-dialog,
    .tch-position-top-center .tch-dialog,
    .tch-position-top-right .tch-dialog {
        border-radius: 8px 8px 14px 14px;
    }

    .tch-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tch-overlay {
        transition: none;
    }
}
