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

.sbp-sheet {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sbp-sheet[hidden],
.sbp-sum[hidden],
.sbp-qr[hidden],
.sbp-search-wrap[hidden],
.sbp-status[hidden],
.sbp-banks[hidden] {
    display: none !important;
}

.sbp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
}

.sbp-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 28rem;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
    padding: 1.5rem 1.15rem 1.15rem;
    background: var(--white, #fff);
    color: var(--text, #1a1a1a);
    border: 1px solid var(--gray-200, #e5e0d8);
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow-lg, 0 8px 40px rgba(0, 0, 0, 0.12));
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
}

.sbp-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--gray-100, #f5f0eb);
    color: var(--text-light, #666);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.sbp-close:hover {
    background: var(--gray-200, #e5e0d8);
    color: var(--text, #1a1a1a);
}

.sbp-title {
    margin: 0 2.25rem 0.35rem 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 650;
    line-height: 1.3;
}

.sbp-sum {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--primary, #2d5a3d);
}

.sbp-lead {
    margin: 0 0 0.9rem;
    color: var(--text-light, #666);
    font-size: 0.95rem;
    line-height: 1.45;
}

.sbp-qr {
    display: flex;
    flex: 0 1 280px;
    align-items: center;
    justify-content: center;
    min-height: 0;
    margin-bottom: 0.85rem;
}

.sbp-qr svg {
    width: auto;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    background: #fff;
}

.sbp-search-wrap {
    display: block;
    margin-bottom: 0.65rem;
}

.sbp-search {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--gray-200, #e5e0d8);
    border-radius: 10px;
    background: var(--bg, #faf9f7);
    color: inherit;
    font: inherit;
    font-size: 1rem;
}

.sbp-search:focus {
    outline: 2px solid var(--accent, #c9a96e);
    outline-offset: 1px;
}

.sbp-status {
    margin: 0 0 0.65rem;
    color: var(--text-light, #666);
    font-size: 0.95rem;
}

.sbp-banks {
    flex: 1 1 auto;
    overflow: auto;
    overscroll-behavior: contain;
    min-height: 0;
    margin: 0 -0.35rem;
    padding: 0 0.35rem;
}

.sbp-bank {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.35rem;
    border-bottom: 1px solid var(--gray-200, #e5e0d8);
    color: inherit;
    text-decoration: none;
}

.sbp-bank:hover,
.sbp-bank:focus-visible {
    background: var(--primary-50, #f2fcf5);
}

.sbp-logo {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.sbp-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sbp-bank-name {
    flex: 1 1 auto;
    font-size: 1.02rem;
    line-height: 1.3;
}

.sbp-bank::after {
    content: "";
    flex: 0 0 auto;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.35rem;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    opacity: 0.45;
    transform: rotate(45deg);
}

.sbp-switch {
    flex: 0 0 auto;
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--gray-200, #e5e0d8);
    border-radius: 10px;
    background: var(--bg, #faf9f7);
    color: var(--primary-dark, #1e3d2a);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.sbp-switch:hover {
    background: var(--gray-100, #f5f0eb);
}

.sbp-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
