.site-header,
body.modal-open .site-header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.rsa-buy-modal,
.modal {
    z-index: 1070 !important;
}

.rsa-buy-modal .modal-dialog {
    max-width: 400px;
    margin: 1.25rem auto;
}

.rsa-buy-content {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.rsa-buy-header {
    background: var(--teal);
    color: var(--white);
    padding: 12px 16px 16px;
}

.rsa-buy-header-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px;
    width: 100%;
}

.rsa-buy-step-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.rsa-buy-progress {
    width: 42px;
    height: 8px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--white) 45%, transparent);
    overflow: hidden;
    display: block;
    margin-left: auto;
}

.rsa-buy-progress span {
    display: block;
    width: 55%;
    height: 100%;
    background: var(--gold);
    border-radius: 8px;
}

.rsa-buy-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rsa-buy-back {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--white);
    font-size: 20px;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rsa-buy-back:hover {
    opacity: 0.85;
}

.rsa-buy-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    background: var(--white);
    border-radius: 50%;
    padding: 3px;
}

.rsa-buy-brand-title {
    font-family: 'Effra Trial', 'Effra', 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
    margin: 0;
    letter-spacing: 0.4px;
}

.rsa-buy-form {
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.rsa-buy-body {
    padding: 18px 18px 8px;
    max-height: 58vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rsa-buy-plan-chip {
    margin: 0 0 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--teal);
}

.rsa-buy-note {
    margin: -4px 2px 0;
    min-height: 16px;
    font-size: 12px;
    line-height: 1.35;
}

.rsa-buy-note.ok {
    color: #0f7a4a;
}

.rsa-buy-note.bad {
    color: var(--coral);
}

.rsa-buy-field {
    position: relative;
}

.rsa-buy-field-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.rsa-buy-field-regn {
    flex: 1 1 auto;
    min-width: 0;
}

.rsa-buy-field-year {
    flex: 0 0 108px;
}

.rsa-buy-ph {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    pointer-events: none;
    white-space: nowrap;
}

.rsa-buy-req {
    color: var(--coral);
    font-weight: 700;
}

.rsa-buy-input:focus+.rsa-buy-ph,
.rsa-buy-input:not(:placeholder-shown)+.rsa-buy-ph,
.rsa-buy-select.is-filled+.rsa-buy-ph,
.rsa-buy-select:valid+.rsa-buy-ph {
    display: none;
}

.rsa-buy-input {
    width: 100%;
    height: 46px;
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--text);
    background: var(--white);
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.rsa-buy-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.rsa-buy-input::placeholder {
    color: transparent;
}

.rsa-buy-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent);
}

.rsa-buy-input.is-invalid {
    border-color: var(--coral);
}

.rsa-buy-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px 8px;
}

.rsa-buy-amount {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    white-space: nowrap;
}

.rsa-buy-pay-btn {
    background: var(--teal);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition);
}

.rsa-buy-pay-btn:hover {
    background: var(--coral);
    transform: translateY(-1px);
}

.rsa-buy-pay-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.rsa-buy-error {
    color: var(--coral);
    font-size: 12px;
    font-weight: 600;
    margin: 0 18px 8px;
    text-align: left;
}

.rsa-buy-secured {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    padding: 0 16px 14px;
}

@media (max-width: 575.98px) {
    .rsa-buy-modal .modal-dialog {
        max-width: 92%;
        margin: 0.75rem auto;
    }

    .rsa-buy-body {
        max-height: 46vh;
        padding: 16px 14px 8px;
    }

    .rsa-buy-footer {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 14px 8px;
    }

    .rsa-buy-pay-btn {
        width: 100%;
    }

    .rsa-buy-brand-title {
        font-size: 18px;
    }
}

.rsa-buy-success {
    display: none;
    padding: 28px 20px 12px;
    text-align: center;
    color: var(--teal);
    font-weight: 700;
}

.rsa-buy-success.is-visible {
    display: block;
}

.modal-backdrop.show {
    opacity: 0.55;
}

.rsa-pay-flash-wrap {
    padding: 16px 0 0;
}

.rsa-pay-flash {
    background: #fff4f2;
    color: var(--coral);
    border: 1px solid color-mix(in srgb, var(--coral) 35%, transparent);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
}

.rsa-pay-result-section {
    padding: 72px 0 96px;
}

.rsa-pay-result-card {
    max-width: 560px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 40px 28px 32px;
    text-align: center;
}

.rsa-pay-result-icon {
    font-size: 46px;
    color: var(--teal);
    margin-bottom: 12px;
}

.rsa-pay-result-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--teal);
    margin: 0 0 8px;
}

.rsa-pay-result-sub {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0 0 24px;
}

.rsa-pay-result-meta {
    display: grid;
    gap: 12px;
    text-align: left;
    margin-bottom: 28px;
}

.rsa-pay-result-meta div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
}

.rsa-pay-result-meta span {
    color: var(--text-muted);
    font-size: 13px;
}

.rsa-pay-result-meta strong {
    color: var(--text-dark);
    font-size: 14px;
    text-align: right;
}

.rsa-pay-result-btn {
    display: inline-flex;
}

.rsa-pay-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}