/**
 * Sharing Joy Donations — Form Styles
 * Scoped with .sj- prefix to avoid theme conflicts
 */

.sj-donation-container {
    max-width: 520px;
    margin: 0 auto;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #333;
}

.sj-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 2.5rem 2rem;
}

.sj-card-result {
    text-align: center;
    padding: 3rem 2rem;
}

/* ---- Header ---- */
.sj-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sj-header-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: block;
}

.sj-header h1,
.sj-card-result h1 {
    color: #00537a;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.sj-header p,
.sj-card-result p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.sj-result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

/* ---- Form groups ---- */
.sj-form-group {
    margin-bottom: 1.25rem;
}

.sj-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: #333;
}

.sj-required {
    color: #c0392b;
    margin-left: 2px;
}

.sj-form-group input[type="text"],
.sj-form-group input[type="email"],
.sj-form-group input[type="tel"],
.sj-form-group input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #dfe3da;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafbf9;
    box-sizing: border-box;
}

.sj-form-group input:focus {
    outline: none;
    border-color: #00537a;
    box-shadow: 0 0 0 3px rgba(0, 83, 122, 0.12);
    background: #fff;
}

.sj-form-group input.sj-error {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.sj-error-msg {
    color: #c0392b;
    font-size: 0.82rem;
    margin-top: 0.25rem;
    display: none;
}

.sj-error-msg.sj-visible {
    display: block;
}

/* ---- Amount selector ---- */
.sj-amount-label {
    margin-bottom: 0.5rem;
}

.sj-amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.sj-amount-option {
    position: relative;
}

.sj-amount-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sj-amount-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    border: 2px solid #dfe3da;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafbf9;
    text-align: center;
}

.sj-amount-option input:checked + .sj-amount-btn {
    border-color: #00537a;
    background: #e1eef5;
    color: #00537a;
    box-shadow: 0 0 0 3px rgba(0, 83, 122, 0.12);
}

.sj-amount-btn:hover {
    border-color: #00537a;
    background: #ecf3f8;
}

.sj-amount-other-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sj-amount-other-row .sj-amount-option {
    flex-shrink: 0;
}

.sj-amount-other-row .sj-amount-btn {
    padding: 0.75rem 1rem;
    min-width: 90px;
}

.sj-custom-amount-wrapper {
    flex: 1;
    display: none;
    align-items: center;
    position: relative;
}

.sj-custom-amount-wrapper.sj-visible {
    display: flex;
}

.sj-currency-symbol {
    position: absolute;
    left: 1rem;
    font-weight: 600;
    color: #666;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.sj-custom-amount-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2rem !important;
    border: 1.5px solid #dfe3da;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #fafbf9;
    transition: all 0.2s;
}

.sj-custom-amount-wrapper input:focus {
    outline: none;
    border-color: #00537a;
    box-shadow: 0 0 0 3px rgba(0, 83, 122, 0.12);
    background: #fff;
}

/* ---- Submit ---- */
.sj-btn-submit {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: #00537a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.5rem;
    font-family: inherit;
    letter-spacing: 0.02em;
}

.sj-btn-submit:hover {
    background: #fdb941;
    color: #333;
}

.sj-btn-submit:active {
    transform: scale(0.98);
}

.sj-btn-submit:disabled {
    background: #6699b3;
    cursor: not-allowed;
    transform: none;
}

/* ---- Footer ---- */
.sj-footer-note {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
    font-size: 0.82rem;
}

.sj-secure-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sj-secure-icons span {
    background: #e1eef5;
    color: #00537a;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .sj-card {
        padding: 1.75rem 1.25rem;
    }

    .sj-amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sj-header h1 {
        font-size: 1.5rem;
    }
}
