/* ============================================================
   SH Giving — CSS custom properties
   Change these per client — everything else inherits from them
   ============================================================ */
:root {
    --shg-accent:        #3d6b5e;   /* sage green — swap for navy, gold, etc. */
    --shg-accent-hover:  #2f5549;
    --shg-accent-light:  #eef4f2;
    --shg-bg:            #faf9f7;
    --shg-card-bg:       #ffffff;
    --shg-border:        #e8e4de;
    --shg-text:          #2c2c2c;
    --shg-text-mid:      #6b6b6b;
    --shg-text-light:    #9a9a9a;
    --shg-error:         #c0392b;
    --shg-radius:        10px;
    --shg-font:          'Lato', 'DM Sans', system-ui, sans-serif;
}

/* ============================================================
   Wrapper
   ============================================================ */
.shg-wrap {
    font-family:     var(--shg-font);
    max-width:       520px;
    margin:          0 auto;
    padding:         40px 32px;
    background:      var(--shg-card-bg);
    border:          1px solid var(--shg-border);
    border-radius:   var(--shg-radius);
    box-shadow:      0 4px 24px rgba(0,0,0,0.05);
}

/* ============================================================
   Frequency toggle
   ============================================================ */
.shg-toggle-row {
    display:         flex;
    background:      var(--shg-bg);
    border-radius:   8px;
    padding:         4px;
    margin-bottom:   28px;
    gap:             4px;
}

.shg-toggle {
    flex:            1;
    padding:         10px 0;
    border:          none;
    background:      transparent;
    border-radius:   6px;
    font-size:       14px;
    font-weight:     500;
    color:           var(--shg-text-mid);
    cursor:          pointer;
    transition:      all 0.2s;
    font-family:     var(--shg-font);
}

.shg-toggle.active {
    background:      var(--shg-card-bg);
    color:           var(--shg-accent);
    box-shadow:      0 1px 6px rgba(0,0,0,0.08);
}

.shg-toggle:hover:not(.active) {
    color:           var(--shg-text);
}

/* ============================================================
   Preset amounts
   ============================================================ */
.shg-amounts {
    display:         grid;
    grid-template-columns: repeat(5, 1fr);
    gap:             8px;
    margin-bottom:   20px;
}

.shg-amount {
    padding:         12px 4px;
    border:          1.5px solid var(--shg-border);
    border-radius:   8px;
    background:      var(--shg-card-bg);
    font-size:       15px;
    font-weight:     500;
    color:           var(--shg-text);
    cursor:          pointer;
    transition:      all 0.18s;
    font-family:     var(--shg-font);
    text-align:      center;
}

.shg-amount:hover {
    border-color:    var(--shg-accent);
    color:           var(--shg-accent);
    background:      var(--shg-accent-light);
}

.shg-amount.active {
    border-color:    var(--shg-accent);
    background:      var(--shg-accent);
    color:           #fff;
    box-shadow:      0 2px 10px rgba(61,107,94,0.25);
}

/* ============================================================
   Custom amount
   ============================================================ */
.shg-custom-row {
    margin-bottom:   20px;
}

.shg-custom-label {
    display:         block;
    font-size:       12px;
    color:           var(--shg-text-light);
    text-transform:  uppercase;
    letter-spacing:  0.06em;
    margin-bottom:   8px;
    font-weight:     500;
}

.shg-custom-input-wrap {
    display:         flex;
    align-items:     center;
    border:          1.5px solid var(--shg-border);
    border-radius:   8px;
    overflow:        hidden;
    transition:      border-color 0.2s;
}

.shg-custom-input-wrap:focus-within {
    border-color:    var(--shg-accent);
}

.shg-dollar {
    padding:         12px 14px;
    background:      var(--shg-bg);
    color:           var(--shg-text-mid);
    font-size:       15px;
    border-right:    1.5px solid var(--shg-border);
    font-weight:     500;
}

.shg-custom-input {
    flex:            1;
    padding:         12px 14px;
    border:          none;
    outline:         none;
    font-size:       15px;
    font-family:     var(--shg-font);
    color:           var(--shg-text);
    background:      transparent;
    -moz-appearance: textfield;
}

.shg-custom-input::-webkit-outer-spin-button,
.shg-custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* ============================================================
   Cover fee
   ============================================================ */
.shg-fee-row {
    margin-bottom:   20px;
}

.shg-fee-label {
    display:         flex;
    align-items:     flex-start;
    gap:             10px;
    font-size:       13.5px;
    color:           var(--shg-text-mid);
    cursor:          pointer;
    line-height:     1.5;
}

.shg-fee-check {
    margin-top:      2px;
    accent-color:    var(--shg-accent);
    width:           15px;
    height:          15px;
    flex-shrink:     0;
    cursor:          pointer;
}

/* ============================================================
   Total row
   ============================================================ */
.shg-total-row {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    padding:         14px 16px;
    background:      var(--shg-accent-light);
    border-radius:   8px;
    margin-bottom:   20px;
    border:          1px solid rgba(61,107,94,0.12);
}

.shg-total-label {
    font-size:       13px;
    color:           var(--shg-accent);
    font-weight:     500;
    text-transform:  uppercase;
    letter-spacing:  0.06em;
}

.shg-total-amount {
    font-size:       18px;
    font-weight:     600;
    color:           var(--shg-accent);
}

/* ============================================================
   Error
   ============================================================ */
.shg-error {
    background:      #fef2f2;
    border:          1px solid #fecaca;
    border-radius:   8px;
    padding:         12px 16px;
    font-size:       13.5px;
    color:           var(--shg-error);
    margin-bottom:   16px;
    line-height:     1.5;
}

/* ============================================================
   Give button
   ============================================================ */
.shg-give-btn {
    width:           100%;
    padding:         16px;
    background:      var(--shg-accent);
    color:           #fff;
    border:          none;
    border-radius:   8px;
    font-size:       16px;
    font-weight:     600;
    cursor:          pointer;
    transition:      all 0.2s;
    font-family:     var(--shg-font);
    letter-spacing:  0.02em;
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             10px;
    margin-bottom:   16px;
}

.shg-give-btn:hover:not(:disabled) {
    background:      var(--shg-accent-hover);
    box-shadow:      0 4px 16px rgba(61,107,94,0.3);
    transform:       translateY(-1px);
}

.shg-give-btn:disabled {
    opacity:         0.7;
    cursor:          not-allowed;
    transform:       none;
}

/* ============================================================
   Spinner
   ============================================================ */
@keyframes shg-spin { to { transform: rotate(360deg); } }

.shg-spinner {
    animation:       shg-spin 0.7s linear infinite;
    width:           18px;
    height:          18px;
    display:         inline-block;
}

/* ============================================================
   Secure note
   ============================================================ */
.shg-secure-note {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             5px;
    font-size:       12px;
    color:           var(--shg-text-light);
    margin:          0;
}

.shg-secure-note svg {
    flex-shrink:     0;
    color:           var(--shg-text-light);
}

/* ============================================================
   QR code block
   ============================================================ */
.shg-qr-wrap {
    text-align:      center;
    padding:         32px;
    max-width:       340px;
    margin:          0 auto;
    font-family:     var(--shg-font);
}

.shg-qr-img {
    display:         block;
    margin:          0 auto 16px;
    width:           220px;
    height:          220px;
}

.shg-qr-label {
    font-size:       18px;
    font-weight:     700;
    color:           var(--shg-text);
    margin:          0 0 6px;
    letter-spacing:  0.02em;
    text-transform:  uppercase;
}

.shg-qr-church {
    font-size:       14px;
    color:           var(--shg-text-mid);
    margin:          0 0 20px;
}

.shg-qr-print {
    padding:         10px 24px;
    background:      var(--shg-accent);
    color:           #fff;
    border:          none;
    border-radius:   6px;
    font-size:       14px;
    font-weight:     500;
    cursor:          pointer;
    font-family:     var(--shg-font);
    transition:      background 0.2s;
}

.shg-qr-print:hover {
    background:      var(--shg-accent-hover);
}

/* ============================================================
   Print styles — only QR content visible, everything else hides
   ============================================================ */
@media print {
    body > *:not(.shg-qr-wrap),
    #wpadminbar,
    .site-header,
    .site-footer,
    nav {
        display: none !important;
    }

    .shg-qr-wrap {
        padding:     60px 40px;
        max-width:   none;
    }

    .shg-qr-img {
        width:       260px;
        height:      260px;
    }

    .shg-qr-label {
        font-size:   22px;
    }

    .shg-qr-church {
        font-size:   16px;
    }

    .shg-qr-print {
        display:     none;
    }
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 560px) {
    .shg-wrap {
        padding:          24px 16px 28px;
        border-radius:    10px;
        border:           1.5px solid #c8c4be;
        box-shadow:       0 4px 20px rgba(0,0,0,0.1);
        margin:           0 16px;
        max-width:        none;
    }

    .shg-amounts {
        grid-template-columns: repeat(3, 1fr);
        gap:              6px;
    }

    .shg-amount {
        padding:          10px 4px;
        font-size:        14px;
    }

    .shg-toggle {
        padding:          8px 0;
        font-size:        13px;
    }

    .shg-toggle-row {
        margin-bottom:    20px;
    }

    .shg-custom-label {
        font-size:        11px;
    }

    .shg-dollar,
    .shg-custom-input {
        padding:          10px 12px;
        font-size:        14px;
    }

    .shg-fee-label {
        font-size:        12.5px;
    }

    .shg-give-btn {
        padding:          14px;
        font-size:        15px;
    }

    .shg-secure-note {
        font-size:        11px;
    }
}
