.tbank-payment {
    margin: 0;
    max-width: none;
    text-align: left;
    padding: 0;
}

.tbank-payment__intro {
    margin: 0 0 1em;
    font-size: 0.92em;
    opacity: 0.9;
    text-align: center;
}

/* ——— Modal ——— */
.tbank-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    margin: 0;
}

.tbank-modal[hidden] {
    display: none !important;
}

html.tbank-modal-open,
body.tbank-modal-open {
    overflow: hidden;
}

.tbank-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(69 69 69 / 71%);
}

.tbank-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 550px;
    max-height: 92vh;
    color: #4b4b4b;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 12px 40px #173e4d;
    overflow: hidden;
    margin: 30px auto;
}

.tbank-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 0.85rem 1rem 0.85rem 1.8rem;
    border-bottom: 1px solid #a3a3a3;
    background: #efcc45;
    background-image: linear-gradient(358deg, #d39421, #efcc45);
    flex-shrink: 0;
}

.tbank-modal__title {
    margin: 0;
    padding: 0.5em 1em 0.3em 0.0em;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.3;
    flex: 1 1 auto;
    text-align: left;
    color: #243237;
}

.tbank-modal__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #2f393d;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    margin: 0;
}

.tbank-modal__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.tbank-modal__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    background: #f7f7f7;
    -webkit-overflow-scrolling: touch;
}

.tbank-modal__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.95rem 1rem;
    background-color: #2f393d;
    background-image: linear-gradient(358deg, #222d31, #363f42);
    border-top: 1px solid #2f393d;
    flex-shrink: 0;
    margin: 0;
}

.tbank-modal__footer[hidden] {
    display: none !important;
}

.tbank-modal__footer .tbank-payment__btn {
    margin: 0;
}

.tbank-modal__footer  button:hover, 
.tbank-modal__footer input[type="button"]:hover {
    background-color: #ebd637;
    color: #2f393d;
}

.tbank-payment__panel {
    margin: 0;
}

.tbank-payment__label {
    display: block;
    margin: 0.75em 0 0.35em;
    font-size: 0.95em;
}

.tbank-payment__label[for="tbank-hours"] {
    font-size: calc(0.95em * 1.5);
    font-weight: 600;
}

.tbank-payment__hours-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.tbank-payment__hours-row .tbank-payment__input {
    flex: 1;
    min-width: 0;
}

.tbank-payment__hours-steppers {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 2px;
    user-select: none;
    -webkit-user-select: none;
}

.tbank-payment__hours-step {
    margin: 0;
    flex: 1 1 auto;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #c5c5c5;
    border-radius: 6px;
    background: #f3f3f3;
    color: #333333;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tbank-payment__hours-step:hover:not(.tbank-payment__hours-step--disabled) {
    background-color: #edac00;
    border-color: #d9a000;
    color: #243237;
}

.tbank-payment__hours-step--disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.tbank-payment__hours-step-icon {
    font-size: 0.75em;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
}

#tbank-hours.tbank-payment__input {
    font-size: 1.5em;
    padding: 0.5em 0.75em;
    -moz-appearance: textfield;
    appearance: textfield;
}

#tbank-hours.tbank-payment__input::-webkit-outer-spin-button,
#tbank-hours.tbank-payment__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tbank-payment__input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.55em 0.75em;
    font-size: 1em;
    border: 1px solid #c5c5c5;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tbank-payment__input:hover {
    border-color: #a8a8a8;
}

.tbank-payment__input:focus {
    outline: none;
    border-color: #0776a1;
    box-shadow: 0 0 0 3px rgba(7, 118, 161, 0.18);
}

.tbank-payment__input::placeholder {
    color: #999999;
    opacity: 1;
}

.tbank-payment__contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
    align-items: start;
}

.tbank-payment__contact-field {
    min-width: 0;
}

@media (max-width: 499px) {
    .tbank-payment__contacts {
        grid-template-columns: 1fr;
    }
}

.tbank-payment__selected-label {
    margin: 0;
    padding-top: 0;
    font-size: 0.9em;
    color: #4f4f4f;
}

.tbank-payment__selected {
    margin: 0 0 0.75em;
    font-size: 0.95em;
    opacity: 0.9;
    border: dashed 2px #d3d3d3;
    border-radius: 18px;
    padding: 1em 1.4em;
    color: #333333;
    font-weight: bold;
}

.tbank-payment__amounts {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    margin: 0.85em 0 1em;
    padding: 0.85em 1em;
    border: 2px dashed #d3d3d3;
    border-radius: 10px;
}

.tbank-payment__amounts-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4em 1rem;
    align-items: baseline;
}

.tbank-payment__amounts-label {
    font-size: 0.9em;
    color: #555555;
    font-weight: 600;
}

.tbank-payment__amounts-value {
    font-size: 1em;
    font-weight: 600;
    text-align: right;
    color: #333333;
    white-space: nowrap;
}

.tbank-payment__amounts-value--total {
    font-size: 1.2em;
    color: #0776a1;
}

.tbank-payment__step-title {
    margin: 0 0 0.35em;
    font-weight: bold;
}

.tbank-payment__step-note {
    margin: 0 0 1em;
    font-size: 0.88em;
    opacity: 0.85;
    line-height: 1.45;
}

.tbank-payment__methods {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    margin-bottom: 1em;
    justify-content: center;
}

.tbank-method-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    min-height: 44px;
    margin: 0 auto;
    padding: 0.5em 1.25em;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.15s, transform 0.1s;
}

.tbank-method-btn:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
}

.tbank-method-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

.tbank-method-btn--qr {
    background: #1d1346;
    color: #fff;
    flex-direction: row;
    align-items: center;
    text-align: left;
}

.tbank-method-btn--hosted {
    background: #243237;
    color: #ffffff;
    border: 0;
    flex-direction: row;
    align-items: center;
    text-align: left;
}

.tbank-method-btn--hosted:hover:not(:disabled) {
    background-color: #edac00;
    color: #243237;
    opacity: 1;
    transform: none;
}

.tbank-method-btn__glyph {
    font-size: 1.25em;
    line-height: 1;
}

.tbank-method-btn__label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15em;
}

.tbank-method-btn__title {
    font-weight: 600;
    line-height: 1.2;
}

.tbank-method-btn__sub {
    font-size: 0.78em;
    font-weight: 400;
    opacity: 0.85;
}

.tbank-method-btn img {
    flex-shrink: 0;
}

.tbank-payment__btn {
    display: inline-block;
    margin-top: 0.75em;
    margin-right: 0.5em;
    padding: 0.8em 1.5em;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.tbank-payment__btn--primary {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
}

.tbank-payment__btn--primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tbank-payment__btn--ghost {
    background: transparent;
}

.tbank-payment__btn--close {
    background: #243237;
    color: #ffffff;
    border: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tbank-payment__btn--close:hover {
    background-color: #edac00;
    color: #243237;
}

.tbank-payment__btn[data-open-app][hidden] {
    display: none !important;
}

@media (min-width: 1000px) {
    .tbank-payment__btn[data-open-app] {
        display: none !important;
    }
}

@media (max-width: 999px) {
    .tbank-payment__btn[data-open-app]:not([hidden]) {
        display: inline-block !important;
    }
}

.tbank-payment__qr-wrap {
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 8px;
    line-height: 0;
    text-align: center;
    position: relative;
    max-width: 380px;
}

.tbank-payment__qr-wrap:before {
    content: '';
    display: block;
    padding-top: 100%;
}

.tbank-payment__qr-wrap:not([hidden]) {
    display: block;
    margin: 15px auto;
    padding: 0;
}

.tbank-payment__qr-wrap[hidden] {
    display: none !important;
}

.tbank-payment__qr-wrap svg {
    width: 100%;
    height: 100%;
    display: block;
    left: 0;
    top: 0;
    position: absolute;
}

.tbank-payment__qr-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    left: 0;
    top: 0;
    position: absolute;
}

.tbank-payment__banks {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 370px;
}

.tbank-payment__banks:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0.5em auto 0;
}

.tbank-payment__banks[hidden] {
    display: none !important;
}

.tbank-sbp-bank {
    display: block;
    width: 100%;
    margin: 0 auto;
    padding: 0.8em 0.75em;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, filter 0.2s ease;
}

.tbank-sbp-bank:hover {
    filter: brightness(0.94);
}

.tbank-sbp-bank--tbank {
    background-color: #ffdd2d;
    color: #1a1a1a;
}

.tbank-sbp-bank--tbank:hover {
    background-color: #f5cf00;
    filter: none;
}

.tbank-sbp-bank--sber {
    background-color: #21a038;
    color: #ffffff;
}

.tbank-sbp-bank--sber:hover {
    background-color: #1b8830;
    filter: none;
}

.tbank-sbp-bank--vtb {
    background-color: #002d72;
    color: #ffffff;
}

.tbank-sbp-bank--vtb:hover {
    background-color: #00245c;
    filter: none;
}

.tbank-sbp-bank--alfa {
    background-color: #ef3124;
    color: #ffffff;
}

.tbank-sbp-bank--alfa:hover {
    background-color: #d42b1f;
    filter: none;
}

.tbank-sbp-bank--rshb {
    background-color: #007a3d;
    color: #ffffff;
}

.tbank-sbp-bank--rshb:hover {
    background-color: #006633;
    filter: none;
}

.tbank-payment__hint {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.85;
    line-height: 1.45;
}

.tbank-payment__hint:not([hidden]) {
    display: block;
    max-width: 360px;
    margin: 0.65em auto 0.35em;
}

.tbank-payment__status {
    margin: 0 0 0.5em;
    font-weight: 600;
}

.tbank-payment__result {
    margin: 0 0 0.4em;
    font-size: 120%;
}

.tbank-payment__expiry {
    margin: 0.35em 0 0.5em;
    font-size: 0.85em;
    opacity: 0.75;
}

.tbank-payment__status--loading {
    opacity: 0.85;
}

.tbank-payment__error {
    color: #e55353;
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9em;
    line-height: 1.45;
}

.tbank-payment__error:not([hidden]) {
    margin-top: 0.5em;
    padding: 0.65em 0.85em;
    background: rgba(229, 83, 83, 0.08);
    border-radius: 8px;
}

.tbank-payment__error[hidden] {
    display: none !important;
}

.services-flex .services-flex-item--selectable {
    position: relative;
    background-color: #ffffff;
    cursor: pointer;
    overflow: hidden;
    border-color: rgba(30, 130, 169, 0);
    transition:
        transform 0.35s ease,
        background-color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.services-flex .services-flex-item--selectable::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image: linear-gradient(165deg, #e6f7ff 65%, #c7eeff);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}

.services-flex .services-flex-item--selectable > .proj_link {
    position: relative;
    z-index: 1;
}

.services-flex .services-flex-item--selectable:hover::before {
    opacity: 1;
}

.services-flex .services-flex-item--selectable:hover {
    transform: scale(1.015);
    z-index: 2;
    background-color: #e5f7ff;
    border-color: #1e82a9;
}

.services-flex .services-flex-item--selectable:active {
    transform: scale(1.005);
    transition-duration: 0.15s;
}

.services-flex-item--selected {
    outline: 2px solid #0776a1;
    outline-offset: 2px;
}

.services-flex .services-flex-item--selected {
    background-color: #eef6fa;
    transition:
        transform 0.35s ease,
        background-color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.services-flex .services-flex-item--selected:hover {
    background-color: #d4eaf3;
    box-shadow: 0 4px 18px rgba(7, 118, 161, 0.22);
}

.services-flex .services-flex-item--selected::before,
.services-flex .services-flex-item--selected:hover::before {
    opacity: 0;
}

.services-flex-item--unavailable.services-flex-item--selectable {
    cursor: not-allowed;
    opacity: 0.55;
}

.services-flex-item--unavailable.services-flex-item--selectable:hover {
    transform: none;
    background-color: #ffffff;
    box-shadow: none;
}

.tbank-payment__step--pay,
.tbank-payment__step--methods,
.tbank-payment__step--result {
    text-align: center;
}

.tbank-payment__result--ok {
    color: #357b41;
    font-size: 140%;
}

@media (max-width: 480px) {
    .tbank-payment__methods {
        flex-direction: column;
    }

    .tbank-method-btn {
        width: 100%;
    }
}
