/* SBP Bank Selection Component */

.sbp-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1A1A2E;
}

/* Back button — pinned at top */
.sbp-back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 12px 4px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex: 0 0 auto;
}

.sbp-back:active {
    opacity: 0.6;
}

.sbp-back svg {
    flex-shrink: 0;
}

/* Header — pinned at top */
.sbp-header {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    padding: 4px 0 14px;
    flex: 0 0 auto;
}

/* Search — pinned at top */
.sbp-search {
    position: relative;
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.sbp-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9CA3AF;
}

.sbp-search input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    color: #1A1A2E;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.sbp-search input:focus {
    border-color: #22C55E;
}

.sbp-search input::placeholder {
    color: #9CA3AF;
}

/* Bank list */
.sbp-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px 12px;
}

.sbp-bank {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 8px;
    border: none;
    background: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s;
}

.sbp-bank:active {
    background-color: rgba(0, 0, 0, 0.05);
}

@media (hover: hover) {
    .sbp-bank:hover {
        background-color: rgba(0, 0, 0, 0.03);
    }
}

.sbp-bank img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
    background: #F3F4F6;
}

.sbp-bank span {
    font-size: 15px;
    font-weight: 500;
    color: #1A1A2E;
    line-height: 1.3;
}

/* Loading spinner */
.sbp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
}

.sbp-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #E5E7EB;
    border-top-color: #22C55E;
    border-radius: 50%;
    animation: sbp-spin 0.8s linear infinite;
}

@keyframes sbp-spin {
    to { transform: rotate(360deg); }
}

.sbp-loading-text {
    margin-top: 14px;
    font-size: 14px;
    color: #6B7280;
}

/* Error state */
.sbp-error {
    text-align: center;
    padding: 48px 16px;
    font-size: 15px;
    color: #EF4444;
    font-weight: 600;
}

/* Empty search state */
.sbp-empty {
    text-align: center;
    padding: 40px 16px;
    font-size: 15px;
    color: #9CA3AF;
}

/* Post-redirect waiting state */
.sbp-waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    padding: 48px 16px;
    text-align: center;
}

.sbp-waiting-title {
    font-size: 16px;
    font-weight: 700;
    color: #1A1A2E;
    margin-top: 16px;
}

.sbp-waiting-sub {
    font-size: 14px;
    color: #6B7280;
    margin-top: 6px;
}
