.scd-donation-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Responsive variant class (scd-responsive) available for custom styling */

.scd-title {
    font-size: 1.8rem;
    color: #ea168c;
    margin-bottom: 1.5rem;
    text-align: left;
}

.scd-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.scd-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: flex-start;
}

.scd-field,
.scd-field-checkbox {
    display: flex;
    flex-direction: column;
}

.scd-field-full {
    grid-column: 1 / -1;
}

.scd-field label,
.scd-field-checkbox label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: #2d2d2d;
}

.scd-field input[type="text"],
.scd-field input[type="email"],
.scd-field input[type="tel"],
.scd-field select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fafafa;
    box-sizing: border-box;
}

.scd-field input.scd-email-input {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><text x="2" y="16" font-family="Arial, sans-serif" font-size="16" font-weight="700" fill="%23ea168c">@</text></svg>');
    background-repeat: no-repeat;
    background-position: 0.85rem center;
    background-size: 20px 20px;
    padding-left: 2.5rem;
}

.scd-field input:focus,
.scd-field select:focus {
    outline: none;
    border-color: #ea168c;
    box-shadow: 0 0 0 3px rgba(234, 22, 140, 0.1);
    background-color: #fff;
}

.scd-field input.scd-email-input:focus {
    background-color: #fff;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><text x="2" y="16" font-family="Arial, sans-serif" font-size="16" font-weight="700" fill="%23ea168c">@</text></svg>');
}

.scd-custom-amount-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.scd-custom-amount-wrapper .scd-currency-symbol {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #ea168c;
    font-weight: 700;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 1;
}

.scd-custom-amount-wrapper input[type="number"] {
    padding-left: 2.5rem !important;
    width: 100% !important;
    padding-right: 1rem !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    background-color: #fafafa !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

.scd-custom-amount-wrapper input[type="number"]:focus {
    outline: none !important;
    border-color: #ea168c !important;
    box-shadow: 0 0 0 3px rgba(234, 22, 140, 0.1) !important;
    background-color: #fff !important;
}

/* Remove number input spinners */
.scd-custom-amount-wrapper input[type="number"]::-webkit-outer-spin-button,
.scd-custom-amount-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.scd-custom-amount-wrapper input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

#scd-custom-amount-row {
    animation: scd-slide-down 0.3s ease;
}

@keyframes scd-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scd-field-checkbox {
    grid-column: 1 / -1;
}

.scd-field-checkbox label {
    font-weight: 700;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    cursor: pointer;
}

.scd-field-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.25rem;
}

.scd-privacy-checkbox span {
    font-weight: 600;
}

.scd-privacy-checkbox a {
    color: #2d2d2d;
    text-decoration: none;
    font-weight: 700;
}

.scd-privacy-checkbox a:hover {
    color: #ea168c;
    text-decoration: underline;
}

.scd-privacy-checkbox span {
    font-weight: 600;
}

.scd-security-badges {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.scd-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    text-align: center;
    width: 100%;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.scd-badge-secure {
    background: linear-gradient(135deg, #ffdc73, #ffb347);
    color: #4b3200;
}

.scd-badge-ssl {
    background: linear-gradient(135deg, #e6f4ff, #cde9ff);
    color: #215a7c;
}

.scd-card-element {
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    background-color: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.scd-card-element.StripeElement--focus {
    border-color: #ea168c;
    box-shadow: 0 0 0 3px rgba(234, 22, 140, 0.1);
    background-color: #fff;
}

.scd-form-messages {
    min-height: 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.scd-form-messages.scd-success {
    color: #0f9d58;
}

.scd-form-messages.scd-error {
    color: #d93025;
}

.scd-form-messages.scd-warning {
    color: #f9ab00;
}

.scd-submit-button {
    align-self: flex-start;
    background: linear-gradient(135deg, #ea168c, #ff4db7);
    border: none;
    color: #fff;
    padding: 0.9rem 2.75rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.scd-submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(234, 22, 140, 0.25);
}

.scd-submit-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.scd-submit-button.scd-loading::after {
    content: '…';
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .scd-donation-container {
        padding: 1.5rem;
    }

    .scd-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .scd-security-badges {
        width: 100%;
    }

    .scd-badge {
        width: 100%;
    }
}

/* Modal Styles */
.scd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scd-modal-fade-in 0.3s ease;
}

@keyframes scd-modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.scd-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.scd-modal-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: scd-modal-slide-up 0.4s ease;
    z-index: 1;
}

@keyframes scd-modal-slide-up {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.scd-modal-icon {
    margin: 0 auto 1.5rem;
    width: 64px;
    height: 64px;
    animation: scd-modal-icon-scale 0.5s ease 0.2s backwards;
}

@keyframes scd-modal-icon-scale {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.scd-modal-title {
    font-size: 1.8rem;
    color: #2d2d2d;
    margin-bottom: 1rem;
    font-weight: 700;
}

.scd-modal-message {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.scd-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    align-items: center;
}

.scd-receipt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #fff;
    border: 2px solid #ea168c;
    color: #ea168c;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    width: 100%;
    max-width: 250px;
}

.scd-receipt-btn:hover {
    background: #ea168c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(234, 22, 140, 0.2);
}

.scd-receipt-btn svg {
    flex-shrink: 0;
}

.scd-modal-close-btn {
    background: linear-gradient(135deg, #ea168c, #ff4db7);
    border: none;
    color: #fff;
    padding: 0.9rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
    max-width: 250px;
}

.scd-modal-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(234, 22, 140, 0.25);
}

.scd-modal-close-btn:active {
    transform: translateY(0);
}

@media (max-width: 576px) {
    .scd-modal-content {
        padding: 2rem 1.5rem;
    }

    .scd-modal-title {
        font-size: 1.5rem;
    }

    .scd-modal-message {
        font-size: 1rem;
    }
}
