.tpPopupOverlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10,22,45,.58);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .16s ease, visibility .16s ease;
    box-sizing: border-box;
}

.tpPopupOverlay.visible {
    opacity: 1;
    visibility: visible;
}

.tpPopup {
    position: relative;
    width: min(440px,100%);
    padding: 32px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(5,20,45,.30);
    color: #102043;
    font-family: 'Inter',Arial,sans-serif;
    box-sizing: border-box;
    transform: translateY(8px) scale(.985);
    transition: transform .16s ease;
}

.tpPopupOverlay.visible .tpPopup {
    transform: translateY(0) scale(1);
}

.tpPopupClose {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f2f5f8;
    color: #53627a;
    cursor: pointer;
}

.tpPopupClose.hidden {
    display: none;
}

.tpPopupClose:hover {
    background: #e7edf3;
    color: #102043;
}

.tpPopupClose svg {
    width: 18px;
    height: 18px;
}

.tpPopupTitle {
    margin: 0 0 10px 0;
    padding-right: 36px;
    color: #102043;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
    text-align: left;
}

.tpPopup.notClosable .tpPopupTitle {
    padding-right: 0;
}

.tpPopupBody {
    margin: 0;
    color: #65738a;
    font-size: 14px;
    line-height: 1.65;
    font-weight: 500;
    white-space: pre-line;
}

.tpPopupBody a {
    color: #168fd0;
    font-weight: 700;
    text-decoration: none;
}

.tpPopupBody a:hover {
    text-decoration: underline;
}

.tpPopupBody img {
    display: block;
    max-width: 100%;
    height: auto;
}

.tpPopupBody p:first-child {
    margin-top: 0;
}

.tpPopupBody p:last-child {
    margin-bottom: 0;
}

.tpPopupActions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.tpPopupAction {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 11px;
    background: #168fd0;
    color: #fff;
    font-family: 'Inter',Arial,sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
    transition: background .15s ease;
}

.tpPopupAction:hover {
    background: #168fd0;
}

.tpPopupCancel {
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid #dce3eb;
    border-radius: 11px;
    background: #fff;
    color: #53627a;
    font-family: 'Inter',Arial,sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
}

.tpPopupCancel:hover {
    background: #f5f7fa;
}

body.tpPopupOpen {
    overflow: hidden;
}

@media (max-width:480px) {
    .tpPopup {
        padding: 28px 22px 22px;
    }

    .tpPopupActions {
        flex-direction: column;
    }

    .tpPopupAction,
    .tpPopupCancel {
        width: 100%;
    }
}
