[data-sbp-device] { display: grid; justify-items: center; gap: 12px; margin: 12px 0; }
[data-sbp-device] [hidden], [data-sbp-device][hidden] { display: none; }
[data-sbp-qr] { width: 248px; max-width: 100%; height: auto; aspect-ratio: 1; background: #fff; }
[data-sbp-hint] { margin: 0; text-align: center; }
[data-sbp-device] .button { max-width: 100%; white-space: normal; text-align: center; }
[data-sbp-options] { max-width: 100%; text-align: center; }
[data-sbp-toggle] { min-height: 44px; line-height: 44px; color: var(--blue); font-size: 14px; cursor: pointer; }
[data-sbp-options] canvas { display: block; margin-inline: auto; }
[data-sbp-banks] { width: 100%; min-width: 0; text-align: left; }
[data-sbp-banks] h2 { margin: 0 0 6px; color: var(--ink); font-size: 22px; line-height: 1.22; }
[data-sbp-banks] [data-sbp-bank-subtitle] { margin: 0 0 12px; padding: 0; color: var(--muted); font-size: 14px; line-height: 1.35; }
[data-sbp-banks]:not([hidden]) + [data-sbp-hint] { display: none; }
[data-sbp-search] { position: relative; margin-bottom: 8px; }
[data-sbp-search]::before, [data-sbp-search]::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
[data-sbp-search]::before {
  top: 16px; left: 15px;
  width: 10px; height: 10px;
  border: 2px solid var(--muted); border-radius: 50%;
}
[data-sbp-search]::after {
  top: 28px; left: 26px;
  width: 6px; height: 2px;
  background: var(--muted); transform: rotate(45deg);
}
[data-sbp-banks] input {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  padding: 0 12px 0 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
[data-sbp-banks] input::placeholder { color: var(--muted); opacity: 1; }
[data-sbp-banks] ul {
  list-style: none; margin: 0; padding: 0;
  max-height: 242px;
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
}
[data-sbp-banks] li + li { border-top: 1px solid var(--line); }
[data-sbp-banks] a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 14px;
  align-items: center; gap: 10px;
  min-height: 48px; padding: 4px 8px;
  color: var(--ink); font-size: 14px; font-weight: 600;
  text-decoration: none; overflow-wrap: anywhere;
}
[data-sbp-banks] a::after {
  content: "";
  justify-self: center;
  width: 6px; height: 6px;
  border: solid var(--muted); border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
[data-sbp-banks] a:hover, [data-sbp-banks] a:active { background: var(--surface); }
[data-sbp-banks] :focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
[data-sbp-bank-icon] {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px; background: var(--surface);
}
[data-sbp-bank-icon] img { display: block; object-fit: contain; }
[data-sbp-banks] p { margin: 0; padding: 6px 0; }
[data-sbp-receipt], [data-sbp-note], [data-sbp-toggle] svg { display: none; }

body[data-sbp-payment] {
  --sbp-background: #f4f5f8;
  background: var(--sbp-background);
}
body.checkout-page[data-sbp-payment] .checkout-header { height: 78px; padding-inline: 16px; }
[data-sbp-payment] .wordmark-name { font-size: 18px; font-weight: 800; }
[data-sbp-payment] .brand-logo { width: 48px; height: 48px; border-radius: 12px; }
[data-sbp-payment] .secure-label { max-width: 118px; font-size: 13px; font-weight: 650; line-height: 1.2; }
[data-sbp-payment] .secure-label img { flex: none; width: 19px; height: 19px; }
body.checkout-page[data-sbp-payment] .checkout-main { padding: 0; margin-block: 0; }
body.checkout-page[data-sbp-payment] .order-state { padding: 12px 16px 26px; border-radius: 0; background: transparent; }
[data-sbp-payment] .state-heading { margin: 0 0 18px; max-width: none; text-align: left; }
[data-sbp-payment] .state-heading h1 { font-size: 32px; line-height: 1.12; letter-spacing: 0; }
[data-sbp-payment] :is([data-state-mark],[data-order-reference],[data-state-description],[data-waiting-hint]) { display: none; }
[data-sbp-payment] .waiting-order { max-width: none; margin: 0; padding: 0; border: 0; }
[data-sbp-payment] .waiting-order > div { display: none; }
[data-sbp-payment] [data-sbp-device] { margin: 0; gap: 16px; justify-items: stretch; }
[data-sbp-payment] [data-sbp-receipt] {
  position: relative; isolation: isolate; overflow: hidden;
  box-sizing: border-box; min-height: 126px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .84fr); align-items: center; gap: 12px;
  padding: 15px 18px;
  border-radius: 14px;
  background: linear-gradient(125deg, #2c3034, #181a1c 54%, #242628);
  text-align: left; color: #fff;
}
[data-sbp-receipt]::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 85%; height: 140%; right: -20%; bottom: -57%;
  border: 1px solid #d2a645a6; border-radius: 50%;
  box-shadow: 0 0 12px #e7ad3633;
  transform: rotate(-38deg);
}
[data-sbp-amount], [data-sbp-tariff] { display: grid; gap: 4px; min-width: 0; }
[data-sbp-tariff] { justify-items: end; text-align: right; }
[data-sbp-amount-label], [data-sbp-reference] { color: #d2d5dc; line-height: 1.25; }
[data-sbp-amount-label] { font-size: 16px; }
[data-sbp-reference] { font-size: 13px; overflow-wrap: anywhere; }
[data-sbp-amount-value] { font-size: 38px; line-height: 1.04; font-weight: 800; white-space: nowrap; }
[data-sbp-tariff-name] { font-size: 19px; line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
[data-sbp-quota] { padding: 3px 8px; border: 1px solid #e6c05d; border-radius: 7px; color: #ffe09a; font-size: 16px; font-weight: 800; }
[data-sbp-payment] [data-sbp-banks] { margin-top: 3px; }
[data-sbp-payment] [data-sbp-search] { margin: 16px 0 12px; }
[data-sbp-payment] [data-sbp-banks] input { background: transparent; border-color: #d2d6df; }
[data-sbp-payment] [data-sbp-banks] ul { max-height: 257px; border-radius: 9px; background: #fff; }
[data-sbp-payment] [data-sbp-banks] ul:not(:empty) { border: 1px solid #d9dce4; }
[data-sbp-payment] [data-sbp-banks] a { min-height: 48px; padding-block: 0; padding-inline: 14px; font-size: 16px; font-weight: 750; }
[data-sbp-payment] [data-sbp-bank-icon] { background: #fff; border: 1px solid #e4e7ee; box-sizing: border-box; }
[data-sbp-payment] [data-sbp-toggle]:not([hidden]) {
  box-sizing: border-box; display: flex; justify-content: center; align-items: center; gap: 10px;
  min-height: 54px; padding: 0 10px; border: 1px solid #8a909c; border-radius: 10px;
  color: var(--ink); background: #fff; font-size: 16px; font-weight: 750; line-height: 1.25; list-style: none;
}
[data-sbp-payment] [data-sbp-toggle]::-webkit-details-marker { display: none; }
[data-sbp-payment] [data-sbp-toggle] svg { display: block; flex: none; }
[data-sbp-payment] [data-sbp-options][open]:has(> summary:not([hidden])) canvas { margin-top: 10px; }
[data-sbp-payment] [data-sbp-note] {
  display: flex; align-items: flex-start; gap: 9px; margin: 0; padding-inline: 12px;
  text-align: left; color: var(--muted); font-size: 14px; line-height: 1.35;
}
[data-sbp-note] svg { flex: none; width: 19px; height: 19px; }
[data-sbp-payment] [data-change-payment]:not([hidden]) {
  width: fit-content; min-height: 44px; padding: 0 7px; margin: 12px auto 0;
  border: 0; box-shadow: none; background: transparent; color: var(--muted);
  font-weight: 550; text-decoration: underline; text-underline-offset: 3px;
}
[data-sbp-payment] .support-line { margin-top: 14px; }
@media (max-width: 359px) {
  [data-sbp-payment] .state-heading h1 { font-size: 28px; }
  [data-sbp-amount-value] { font-size: 32px; }
  [data-sbp-tariff-name] { font-size: 16px; }
}
[data-sbp-qr-heading] { display: none; }
@media (min-width: 768px) {
  body.checkout-page[data-sbp-payment] :is(.checkout-header,.checkout-main) { max-width: 820px; }
  body.checkout-page[data-sbp-payment] .checkout-header { padding-inline: 24px; }
  body.checkout-page[data-sbp-payment] .order-state { padding: 26px 24px 32px; }
  [data-sbp-payment] .state-heading { margin-bottom: 22px; }
  [data-sbp-payment] .state-heading h1 { font-size: 36px; }
  [data-sbp-payment] [data-sbp-receipt] { min-height: 150px; padding: 20px 24px; }
  [data-sbp-payment] [data-sbp-options]:not([hidden]) {
    box-sizing: border-box; width: 100%; min-width: 0;
    padding: 16px; background: #fff; border: 1px solid #d9dce4; border-radius: 12px;
  }
  [data-sbp-payment="qr"] [data-sbp-qr-heading] { display: block; margin: 0 0 10px; font-size: 18px; }
  [data-sbp-payment="qr"] [data-sbp-device]:has([data-sbp-options]:not([hidden])) {
    grid-template-columns: minmax(0,1fr) minmax(0,320px);
    grid-template-areas: "receipt qr" "note qr" ". hint";
    grid-template-rows: auto 1fr auto;
    align-items: start; column-gap: 24px;
  }
  [data-sbp-payment="qr"] :has(> [data-sbp-options]:not([hidden])) > [data-sbp-receipt] { grid-area: receipt; }
  [data-sbp-payment="qr"] :has(> [data-sbp-options]:not([hidden])) > [data-sbp-options] { grid-area: qr; }
  [data-sbp-payment="qr"] :has(> [data-sbp-options]:not([hidden])) > [data-sbp-note] { grid-area: note; }
  [data-sbp-payment="qr"] :has(> [data-sbp-options]:not([hidden])) > [data-sbp-hint] { grid-area: hint; }
}
@media (min-width: 768px) and (max-width: 899px) {
  body.checkout-page[data-sbp-payment="bank"] :is(.checkout-header,.checkout-main) { max-width: 580px; }
}
@media (min-width: 900px) {
  [data-sbp-payment="bank"] [data-sbp-device]:has([data-sbp-banks]:not([hidden])):has([data-sbp-options]:not([hidden])) {
    grid-template-columns: minmax(0,1fr) minmax(0,320px);
    grid-template-areas: "receipt receipt" "banks qr" "note note";
    gap: 22px 24px; align-items: start;
  }
  [data-sbp-payment="bank"] [data-sbp-device]:has([data-sbp-banks]:not([hidden])):has([data-sbp-options]:not([hidden])) > [data-sbp-receipt] { grid-area: receipt; }
  [data-sbp-payment="bank"] [data-sbp-banks] { grid-area: banks; }
  [data-sbp-payment="bank"] [data-sbp-device]:has([data-sbp-banks]:not([hidden])):has([data-sbp-options]:not([hidden])) > [data-sbp-options] { grid-area: qr; }
  [data-sbp-payment="bank"] [data-sbp-device]:has([data-sbp-banks]:not([hidden])):has([data-sbp-options]:not([hidden])) > [data-sbp-note] { grid-area: note; }
}
