.sa-payments-core-form,
.sa-payments-core-form * {
    box-sizing: border-box;
}

.sa-payments-core-form {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.sa-payments-core-form [hidden] {
    display: none !important;
}

.sa-payments-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 28px;
}

.sa-payments-header h2 {
    margin: 0 0 14px;
    font-size: 34px;
    line-height: 1.15;
    color: #1f2937;
}

.sa-payments-header p {
    margin: 0 0 10px;
    color: #6b7280;
    line-height: 1.6;
}

.sa-payments-unavailable {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    text-align: center;
}

.sa-payments-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sa-payments-segmented {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    align-self: center;
    gap: 4px;
    padding: 4px;
    background: #f3f4f6;
    border-radius: 999px;
}

.sa-payments-segmented button,
.sa-payments-amounts button,
.sa-payments-provider-options button,
.sa-payments-submit {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.sa-payments-segmented button {
    min-height: 44px;
    padding: 8px 22px;
    border-radius: 999px;
    color: #4b5563;
    background: transparent;
}

.sa-payments-segmented button.is-active {
    color: #fff;
    background: #dc2626;
}

.sa-payments-segmented button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.sa-payments-amounts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.sa-payments-amounts button {
    min-height: 64px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #1f2937;
    font-weight: 700;
}

.sa-payments-amounts button.is-active,
.sa-payments-provider-options button.is-active {
    border-color: #dc2626;
    background: #fff5f5;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.16);
}

.sa-payments-custom-amount,
.sa-payments-donor label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #374151;
    font-weight: 700;
}

.sa-payments-custom-amount input,
.sa-payments-donor input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    color: #1f2937;
    background: #fff;
}

.sa-payments-causes h3,
.sa-payments-providers h3 {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.25;
}

.sa-payments-cause-grid,
.sa-payments-provider-options,
.sa-payments-donor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sa-payments-cause {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 10px;
    min-height: 92px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.sa-payments-cause input {
    margin-top: 3px;
}

.sa-payments-cause strong,
.sa-payments-provider-name {
    display: block;
    color: #1f2937;
}

.sa-payments-cause span {
    grid-column: 2;
    color: #6b7280;
    line-height: 1.45;
}

.sa-payments-provider-options button {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 128px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    text-align: left;
}

.sa-payments-provider-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    min-width: 0;
    gap: 10px 12px;
    align-items: start;
}

.sa-payments-provider-logo {
    display: inline-flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.sa-payments-provider-logo img {
    display: block;
    width: auto;
    max-width: 142px;
    max-height: 32px;
    object-fit: contain;
}

.sa-payments-provider-logo--paypal img {
    max-width: 132px;
    max-height: 32px;
}

.sa-payments-provider-logo--mercadopago img {
    max-width: 142px;
    max-height: 34px;
}

.sa-payments-provider-logo--transbank img,
.sa-payments-provider-logo--webpay img {
    max-width: 118px;
    max-height: 30px;
}

.sa-payments-provider-logo--kushki {
    background: #201239;
    border-color: #201239;
}

.sa-payments-provider-logo--kushki img {
    max-width: 112px;
    max-height: 28px;
}

.sa-payments-provider-logo--dlocal img {
    max-width: 112px;
    max-height: 28px;
}

.sa-payments-provider-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.sa-payments-provider-logo-word {
    display: inline-flex;
    align-items: baseline;
    max-width: 100%;
    color: #1f2937;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.sa-payments-provider-logo-word small {
    margin-left: 6px;
    color: #6b7280;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sa-payments-provider-logo--generic .sa-payments-provider-logo-mark {
    background: #4b5563;
}

.sa-payments-provider-copy {
    display: block;
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.sa-payments-provider-name {
    font-size: 15px;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.sa-payments-provider-description {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    line-height: 1.35;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.sa-payments-provider-currency {
    display: block;
    justify-self: end;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.sa-payments-provider-currency-note {
    grid-column: 1 / -1;
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    overflow-wrap: anywhere;
}

.sa-payments-provider-options button.is-active .sa-payments-provider-logo {
    border-color: rgba(220, 38, 38, 0.35);
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.12);
}

.sa-payments-terms {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
}

.sa-payments-message {
    min-height: 20px;
    color: #b91c1c;
    font-weight: 700;
}

.sa-payments-message.is-success {
    color: #047857;
}

.sa-payments-submit {
    width: 100%;
    min-height: 52px;
    border-radius: 8px;
    background: #dc2626;
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
}

.sa-payments-submit:disabled {
    cursor: not-allowed;
    background: #d1d5db;
    color: #6b7280;
}

@media (max-width: 760px) {
    .sa-payments-core-form {
        padding: 24px;
    }

    .sa-payments-header h2 {
        font-size: 28px;
    }

    .sa-payments-amounts,
    .sa-payments-cause-grid,
    .sa-payments-provider-options,
    .sa-payments-donor {
        grid-template-columns: 1fr;
    }
}
