/* Church Giving — [church_donate] Shortcode
 * Design system tokens from DESIGN.md
 * Palette: Forest teal (#3f6b6c) + warm neutrals (#f8f6f3)
 */

@import url('../fonts/fonts.css');

.church-donate {
    width: 100%;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #464646;
    -webkit-font-smoothing: antialiased;
}

/* Org header */
.church-donate__org-header { text-align: center; margin-bottom: 16px; }
.church-donate__org-logo   { max-height: 56px; }

/* Headings */
.church-donate__title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 32px;
    font-weight: 400;
    color: #1d3131;
    margin: 0 0 8px;
}
.church-donate__description { color: #888; font-size: 15px; margin: 0 0 24px; }

/* Campaign progress */
.church-donate__campaign {
    background: #f1ede8;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.church-donate__campaign-name { font-weight: 600; color: #1d3131; margin-bottom: 8px; }
.church-donate__campaign-bar-wrap {
    height: 8px;
    background: #e0dbd5;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 8px;
}
.church-donate__campaign-bar {
    height: 100%;
    background: #3f6b6c;
    border-radius: 9999px;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.church-donate__campaign-amounts {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    color: #888;
}

/* Steps */
.church-donate__step-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 16px;
}

/* Preset amount buttons */
.church-donate__amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.church-donate__amount-btn {
    padding: 12px 20px;
    border: 2px solid #3f6b6c;
    color: #3f6b6c;
    background: transparent;
    border-radius: 8px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s;
    min-height: 44px;
}
.church-donate__amount-btn:hover,
.church-donate__amount-btn.is-active {
    background: #3f6b6c;
    color: #fff;
}
.church-donate__amount-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(63, 107, 108, 0.15);
}

/* Custom amount */
.church-donate__custom-amount {
    position: relative;
    margin-bottom: 16px;
}
.church-donate__currency-symbol {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 15px;
    pointer-events: none;
}
.church-donate__amount-input {
    width: 100%;
    padding: 12px 16px 12px 28px;
    border: 1px solid #e0dbd5;
    border-radius: 8px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 15px;
    color: #464646;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.church-donate__amount-input:focus {
    outline: none;
    border-color: #3f6b6c;
    box-shadow: 0 0 0 3px rgba(63, 107, 108, 0.15);
}

/* Fund row */
.church-donate__fund-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #464646;
}
.church-donate__fund-select {
    padding: 8px 12px;
    border: 1px solid #e0dbd5;
    border-radius: 8px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    color: #464646;
    flex: 1;
    background: #fff;
}
.church-donate__fund-select:focus {
    outline: none;
    border-color: #3f6b6c;
    box-shadow: 0 0 0 3px rgba(63, 107, 108, 0.15);
}

/* Toggle rows (recurring, fee, tribute) */
.church-donate__recurring-row,
.church-donate__fee-row,
.church-donate__tribute-toggle { margin-bottom: 16px; }
.church-donate__toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    color: #464646;
}
.church-donate__fee-amount { color: #888; }

/* Tribute */
.church-donate__tribute-btn {
    background: none;
    border: none;
    color: #3f6b6c;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}
.church-donate__tribute-btn:hover { text-decoration: underline; }
.church-donate__tribute-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(63, 107, 108, 0.15);
    border-radius: 4px;
}
.church-donate__tribute-fields {
    background: #f1ede8;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.church-donate__field-row { display: flex; gap: 24px; margin-bottom: 12px; }

/* Continue button */
.church-donate__next-btn { width: 100%; margin-top: 8px; }

/* Step 2 — Back button */
.church-donate__back-btn {
    background: none;
    border: none;
    color: #888;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    display: inline-block;
    transition: color 0.15s;
}
.church-donate__back-btn:hover { color: #1d3131; }

/* Summary box */
.church-donate__summary {
    background: #e8f0f0;
    border-left: 4px solid #3f6b6c;
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 24px;
}
.church-donate__summary-amount {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 28px;
    font-weight: 500;
    color: #3f6b6c;
}
.church-donate__summary-fund,
.church-donate__summary-recurring,
.church-donate__summary-fee { font-size: 13px; color: #888; margin-top: 4px; }

/* Fields */
.church-donate__field { margin-bottom: 16px; }
.church-donate__field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1d3131;
    margin-bottom: 6px;
}
.church-donate__field input,
.church-donate__field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0dbd5;
    border-radius: 8px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    color: #464646;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.church-donate__field input:focus,
.church-donate__field textarea:focus {
    outline: none;
    border-color: #3f6b6c;
    box-shadow: 0 0 0 3px rgba(63, 107, 108, 0.15);
}

/* Card element */
.church-donate__card-element {
    padding: 12px 16px;
    border: 1px solid #e0dbd5;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.church-donate__card-element.StripeElement--focus {
    border-color: #3f6b6c;
    box-shadow: 0 0 0 3px rgba(63, 107, 108, 0.15);
}

/* Primary button */
.church-donate__btn--primary {
    display: inline-block;
    width: 100%;
    padding: 14px;
    background: #3f6b6c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    min-height: 44px;
    transition: background 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.church-donate__btn--primary:hover:not(:disabled) { background: #345a5b; }
.church-donate__btn--primary:disabled { opacity: 0.7; cursor: not-allowed; }
.church-donate__btn--primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(63, 107, 108, 0.3);
}

/* Submit loading state */
.church-donate__submit { position: relative; }
.church-donate__submit.is-loading .church-donate__submit-label { visibility: hidden; }
.church-donate__submit.is-loading::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border: 3px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: church-spin .7s linear infinite;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
@keyframes church-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* Secure note */
.church-donate__secure-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #888;
    margin-top: 12px;
    justify-content: center;
}
.church-donate__secure-note svg { width: 14px; height: 14px; fill: #3f6b6c; flex-shrink: 0; }

/* Messages */
.church-donate__msg { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-top: 16px; }
.church-donate__msg--error   { background: #fdecea; border: 1px solid #f0c4be; color: #721c24; }
.church-donate__msg--success { background: #e8f5e4; border: 1px solid #c3ddbf; color: #2d5a27; }
.church-donate__error { color: #721c24; font-size: 14px; }

/* Success screen */
.church-donate__success {
    text-align: center;
    padding: 48px 24px;
}
.church-donate__success svg {
    width: 56px; height: 56px;
    fill: #2d5a27;
    margin-bottom: 16px;
}
.church-donate__success p {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    color: #2d5a27;
    margin: 0;
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
