.rtk-thanks {
    display: none;
}

html.rtk-thanks-eligible .thanks-page {
    display: none;
}

html.rtk-thanks-eligible .rtk-thanks-original,
html.rtk-thanks-eligible footer {
    display: none;
}

html.rtk-thanks-eligible .rtk-thanks {
    display: flex;
}

.rtk-thanks {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    overflow-x: hidden;
    min-height: 100vh;
    padding: 32px 48px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
    color: #101828;
    font-family: 'RostelecomBasis', Arial, sans-serif;
}

.rtk-thanks *, .rtk-thanks *::before, .rtk-thanks *::after { box-sizing: border-box; }
.rtk-thanks [hidden] { display: none !important; }

.rtk-thanks__back,
.rtk-thanks__close {
    position: absolute;
    z-index: 1;
    top: 32px;
    text-decoration: none;
}

.rtk-thanks__back {
    left: 48px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #101828;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.rtk-thanks__back img { display: block; width: 20px; height: 20px; }
.rtk-thanks__close {
    right: 16px;
    top: 16px;
    display: flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(88, 93, 105, .1);
}
.rtk-thanks__close img { display: block; width: 24px; height: 24px; }

.rtk-thanks__content {
    width: min(100%, 522px);
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    text-align: center;
}

.rtk-thanks__image-frame {
    position: relative;
    width: 96px;
    height: 96px;
    overflow: hidden;
    align-self: center;
}
.rtk-thanks__image {
    position: absolute;
    top: -6.91%;
    left: -7.67%;
    display: block;
    width: 114.39%;
    height: 114.39%;
    max-width: none;
}

.rtk-thanks__intro { display: flex; flex-direction: column; gap: 8px; }
.rtk-thanks__intro h1,
.rtk-thanks__intro p,
.rtk-thanks__queue p,
.rtk-thanks__call p { margin: 0; }
.rtk-thanks__intro h1 { font-size: 20px; line-height: 28px; font-weight: 700; overflow-wrap: break-word; }
.rtk-thanks__intro p { font-size: 14px; line-height: 20px; font-weight: 400; color: rgba(16, 24, 40, .55); }
.rtk-thanks__house,
html[data-thanks-segment="private_house"] .rtk-thanks__apartment { display: none; }
html[data-thanks-segment="private_house"] .rtk-thanks__house { display: flex; }

.rtk-thanks__phones { display: flex; flex-direction: column; gap: 8px; }
.rtk-thanks__phone {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 16px 20px;
    align-items: center;
    min-height: 48px;
    margin: 0;
    padding: 4px 12px 6px;
    border: 0;
    border-bottom: 2px solid rgba(88, 93, 105, .15);
    text-align: left;
}
.rtk-thanks__phone label {
    grid-column: 1;
    grid-row: 1;
    color: rgba(16, 24, 40, .75);
    font-size: 12px;
    line-height: 16px;
}
.rtk-thanks__phone-display,
.rtk-thanks__phone input {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    font: inherit;
    font-size: 16px;
    line-height: 20px;
    color: #101828;
}
.rtk-thanks__phone input {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    outline: none;
}
.rtk-thanks__phone button {
    grid-column: 2;
    grid-row: 1 / 3;
    padding: 2px 0 2px 8px;
    border: 0;
    background: transparent;
    color: #ff4f12;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
}
.rtk-thanks__phone button:hover { color: #e74710; }
.rtk-thanks__phone.is-invalid { border-bottom-color: #e52b50; }
.rtk-thanks__phone-loading { grid-column: 2; grid-row: 1 / 3; width: 18px; height: 18px; border: 2px solid #ff4f12; border-right-color: transparent; border-radius: 50%; animation: rtk-thanks-spin .8s linear infinite; }
@keyframes rtk-thanks-spin { to { transform: rotate(360deg); } }

.rtk-thanks__queue { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 700; }
.rtk-thanks__queue p { font-weight: 700; }
.rtk-thanks__call { display: flex; flex-direction: column; gap: 16px; }
.rtk-thanks__call .PHONE {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ff4f12;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
}
.rtk-thanks__call .PHONE:hover { background: #e74710; color: #fff; }
.rtk-thanks__call p { color: rgba(16, 24, 40, .55); font-size: 12px; line-height: 16px; }

@media (min-width: 768px) and (max-width: 1023px) {
    .rtk-thanks__content { width: 100%; max-width: none; }
}

@media (max-width: 767px) {
    .rtk-thanks { min-height: 100vh; padding: 20px 16px 40px; justify-content: flex-start; }
    .rtk-thanks__back { top: 24px; left: 16px; }
    .rtk-thanks__content { width: 100%; margin-top: 96px; }
}
