.tbank-modal { --modal-backdrop-blur: 25px; }
.tbank-modal .modal-backdrop { background: rgb(29 32 35 / .4); }
.payment-sheet.tbank-sheet {
  --sheet-fallback-height: initial;
  max-height: calc(100dvh - 16px);
}

.payment-sheet.tbank-sheet .sheet-header { height: 60px; }

.tbank-body {
  min-height: 618px;
  background: #1e1e1e;
  color: #eaeaea;
  font: 14px/20px Arial, sans-serif;
}

.tbank-body[data-phase="before"] { min-height: 488px; }
.tbank-body:not([data-phase="code"]) { display: grid; place-items: center; }
.tbank-loading { position: relative; display: grid; place-items: center; width: 44px; height: 44px; }
.tbank-status-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tbank-spinner {
  display: block;
  width: 36px;
  height: 36px;
  background: conic-gradient(from 15deg, transparent 3%, currentColor);
  mask: url('../assets/tbank-spinner-color.svg') center / contain no-repeat;
  animation: tbank-spin 2s linear infinite;
}
@keyframes tbank-spin { to { transform: rotate(1turn); } }

.tbank-verification { display: grid; gap: 12px; padding: 28px 19px 14px; }
.tbank-brands { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.tbank-brands img { display: block; flex: none; }
.tbank-card { margin: 0; padding: 20px 24px; border-radius: 24px; background: #2d2d2d; }
.tbank-amount { display: flex; align-items: center; gap: 9px; min-height: 62px; font-size: 18px; font-weight: 700; }
.tbank-amount span { width: 8px; height: 8px; margin-top: -4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tbank-card h2 { margin: 0; font-size: 18px; line-height: 23px; font-weight: 700; }
.tbank-confirmation h2 { margin-bottom: 16px; }
.tbank-code-field { position: relative; display: block; height: 56px; border: 1px solid transparent; border-radius: 12px; background: #424242; }
.tbank-code-field > .tbank-code-label { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: #d2d2d2; pointer-events: none; }
.tbank-code-input {
  display: block;
  width: 100%;
  height: 100%;
  padding: 20px 15px 4px;
  border: 0;
  border-radius: inherit;
  outline: 0;
  background: transparent;
  color: #eaeaea;
  caret-color: #eaeaea;
  font: 16px/22px Arial, sans-serif;
}

.tbank-code-input:focus-visible { outline: 0; }
.tbank-code-field:focus-within { border-color: #b0b0b0; background: #2d2d2d; }
.tbank-code-field:focus-within > .tbank-code-label, .tbank-code-field:has(input:not(:placeholder-shown)) > .tbank-code-label {
  top: 7px;
  transform: none;
  font-size: 11px;
  line-height: 14px;
}

.tbank-code-help { display: grid; gap: 11px; margin-top: 9px; }
.tbank-code-help, .tbank-certificates span { color: #689cff; }
.tbank-certificates { padding-bottom: 24px; }
.tbank-certificates p { margin: 17px 0 13px; line-height: 23px; }
.tbank-certificate-help { text-decoration: underline; text-underline-offset: 3px; }

.tbank-body:not([data-bank="tbank"]) {
  min-height: 598px;
  background: var(--surface);
  color: #0b0b0b;
}
.tbank-body:not([data-bank="tbank"])[data-phase="before"] { min-height: 488px; }
.tbank-body:not([data-bank="tbank"])[data-phase="after"] { min-height: 581px; }
.pay-button[aria-busy="true"] { justify-content: center; }
.pay-button[aria-busy="true"] > :not(.bank-button-loading) { display: none; }
.bank-button-loading { display: grid; place-items: center; }
.bank-button-loading .tbank-spinner {
  width: 24px;
  height: 24px;
  mask-image: url('../assets/payment-button-spinner.svg');
}

.bank-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}
.bank-code :is(h2, p, dl, dd) { margin: 0; }
.bank-code-brands { display: flex; align-items: center; }
.bank-code-brands img { display: block; max-width: 51%; height: auto; }
.bank-code-input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 15px;
  border: 2px solid transparent;
  border-radius: 8px;
  outline: none;
  color: inherit;
  font-size: 16px;
}
.bank-code-input:focus-visible { outline: none; }
.bank-code-link {
  display: block;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #0069ff;
  font-size: 14px;
  line-height: 20px;
}
.bank-code-link:not(:disabled):hover { text-decoration: underline; }
.bank-code-link:focus-visible { outline-offset: 1px; }

.bank-code--mts { padding: 24px 16px 40px; }
.bank-code--mts .bank-code-brands { justify-content: space-between; gap: 12px; width: 100%; }
.bank-code--mts h2 { margin: 10px 0 14px; font-size: 23px; line-height: 28px; }
.bank-code--mts .bank-code-input { width: min(100%, 210px); border-color: #aeb7c0; background: #fff; }
.bank-code--mts .bank-code-input:focus { border-color: #858f9a; }
.bank-code--mts [data-resend-code] { margin-top: 8px; }
.bank-code--mts .bank-code-amount { margin-top: 10px; font-size: 16px; }
.bank-code-details {
  display: grid;
  grid-template-columns: max-content max-content;
  justify-content: center;
  gap: 0 15px;
  padding-top: 17px;
  line-height: 19px;
}
.bank-code-details dt { color: #626c77; text-align: right; }
.bank-code-details dd { text-align: left; }
.bank-code--mts .bank-code-cancel { margin-top: 42px; }
.bank-code--mts .bank-code-license { margin-top: 8px; color: #747e8b; font-size: 12px; line-height: 16px; }

.bank-code--alfa { padding: 12px clamp(20px, 8vw, 31px) 40px; color: #1c2b3b; }
.alfa-code-logo { align-self: flex-end; margin-inline-end: -15px; object-fit: contain; }
.bank-code--alfa .bank-code-amount { margin-top: 32px; font-size: 34px; font-weight: 700; line-height: 40px; }
.bank-code--alfa .bank-code-merchant { margin-top: 5px; color: #767676; font-size: 18px; line-height: 24px; }
.bank-code--alfa .bank-code-hint { margin-top: 26px; color: #767676; font-size: 16px; line-height: 21px; }
.bank-code--alfa .bank-code-input { margin-top: 18px; background: #e5e7e8; text-align: center; }
.bank-code--alfa .bank-code-input:focus { border-color: #858585; background: #fff; }
.bank-code--alfa .bank-code-link { color: #767676; font-size: 16px; }
.bank-code--alfa [data-resend-code] { margin-top: 41px; }
.bank-code--alfa .bank-code-cancel { margin-top: 27px; text-decoration: underline; text-underline-offset: 4px; }

.tbank-body[data-bank="mts"][data-phase="code"] { min-height: 581px; }

@media (min-width: 600px) {
  .payment-sheet.tbank-sheet { max-height: calc(100dvh - 48px); }
  .tbank-body:is([data-bank="mts"], [data-bank="alfa"])[data-phase="code"] { min-height: 618px; }
}

@media (prefers-reduced-motion: reduce) {
  .tbank-spinner { animation: none; }
}
