/*
 * LBF Festival Donations — homepage donation card additive CSS
 * Loads alongside the theme's existing .lbf-spd25-* styles, NOT in place of them.
 * Only styles new/dynamic states and the embedded Gravity Form.
 */

/* Tile selected state */
.lbf-spd25-amt-card{cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease}
.lbf-spd25-amt-card:hover{transform:translateY(-2px)}
.lbf-spd25-amt-card.is-selected{border-color:#0537A4!important;background:linear-gradient(135deg,#fff 0%,#eff7ff 70%,#fff6c7 100%)!important;box-shadow:0 0 0 3px rgba(5,55,164,.10),0 14px 26px rgba(0,36,92,.14)!important}
.lbf-spd25-amt-card.is-selected .lbf-spd25-amt-icon{background:#0537A4!important;color:#fff!important}

/* Custom amount tile + input */
.lbf-fd-custom-tile .lbf-spd25-amt-val{font-variant-numeric:tabular-nums}
.lbf-fd-custom-amount{margin:10px 0 4px;display:none}
.lbf-fd-custom-amount.is-open{display:block}
.lbf-fd-custom-amount label{display:block;font-size:11px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:#52658a;margin-bottom:4px}
.lbf-fd-custom-amount input{width:100%;padding:11px 14px;border-radius:14px;border:1.5px solid rgba(5,55,164,.22);font:700 16px Barlow,Arial,sans-serif;color:#102b5c;background:#fff;outline:none;transition:border-color .15s ease,box-shadow .15s ease}
.lbf-fd-custom-amount input:focus{border-color:#0537A4;box-shadow:0 0 0 3px rgba(5,55,164,.12)}
.lbf-fd-custom-amount__hint{margin:4px 0 0;font-size:11.5px;color:#7a8aa3}

/* Disabled / loading button states */
.v3-donate-cta.is-disabled{opacity:.55;pointer-events:none;filter:grayscale(.4)}
.v3-donate-cta.is-loading{position:relative;color:transparent!important}
.v3-donate-cta.is-loading::after{content:'';position:absolute;inset:0;margin:auto;width:18px;height:18px;border:2.5px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:999px;animation:lbf-fd-spin .8s linear infinite}
@keyframes lbf-fd-spin{to{transform:rotate(360deg)}}

/* Expanded form area (slides in below Donate Now button) */
.lbf-fd-expand{display:none;margin-top:14px;padding-top:14px;border-top:1px dashed rgba(5,55,164,.18)}
.lbf-fd-expand.is-open{display:block;animation:lbf-fd-slide-in .25s ease}
@keyframes lbf-fd-slide-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
.lbf-fd-expand__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.lbf-fd-expand__title{font:900 13px Barlow,Arial,sans-serif;color:#102b5c;letter-spacing:-.01em;margin:0}
.lbf-fd-expand__title strong{color:#0537A4}
.lbf-fd-back-link{background:none;border:0;padding:0;color:#0537A4;font:800 12px Barlow,Arial,sans-serif;cursor:pointer;text-decoration:underline}
.lbf-fd-back-link:hover{color:#002580}

/* Embedded Gravity Form styled to fit the card width */
.lbf-fd-gf-shell{margin:0}
.lbf-fd-gf-shell .gform_wrapper{margin:0!important}
.lbf-fd-gf-shell .gform_heading{display:none!important}
.lbf-fd-gf-shell .gform_body{margin:0!important}
.lbf-fd-gf-shell .gfield{margin:0 0 10px!important;padding:0!important}
.lbf-fd-gf-shell .gfield_label{font:900 11px Barlow,Arial,sans-serif!important;color:#52658a!important;letter-spacing:.04em;text-transform:uppercase;margin:0 0 4px!important}
.lbf-fd-gf-shell .gfield_required{color:#a8000a!important;margin-left:3px}
.lbf-fd-gf-shell .gfield_description{font-size:11px!important;color:#7a8aa3!important;margin:3px 0 0!important;line-height:1.3!important}
.lbf-fd-gf-shell input[type="text"],
.lbf-fd-gf-shell input[type="email"],
.lbf-fd-gf-shell input[type="tel"],
.lbf-fd-gf-shell input[type="number"],
.lbf-fd-gf-shell select,
.lbf-fd-gf-shell textarea{width:100%!important;padding:10px 12px!important;border-radius:12px!important;border:1.5px solid rgba(5,55,164,.20)!important;background:#fff!important;font:700 14px Barlow,Arial,sans-serif!important;color:#102b5c!important;line-height:1.3!important;outline:none!important;transition:border-color .15s ease,box-shadow .15s ease!important;box-shadow:none!important}
.lbf-fd-gf-shell input:focus,
.lbf-fd-gf-shell select:focus,
.lbf-fd-gf-shell textarea:focus{border-color:#0537A4!important;box-shadow:0 0 0 3px rgba(5,55,164,.12)!important}

/* GF address composite — keep tight on narrow card. v1.4.8: scope by parent
 * field class so this rule no longer overrides PPCP's display:none on the
 * card-fields wrapper inside the PayPal field. */
.lbf-fd-gf-shell .lbf-fd-field--address .ginput_complex{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
.lbf-fd-gf-shell .lbf-fd-field--address .ginput_complex .address_line_1,
.lbf-fd-gf-shell .lbf-fd-field--address .ginput_complex .address_country,
.lbf-fd-gf-shell .lbf-fd-field--address .ginput_complex .ginput_full{grid-column:1/-1!important}
.lbf-fd-gf-shell .lbf-fd-field--address .ginput_complex span{margin:0!important}

/* Belt-and-braces: PPCP's hosted card-fields div must stay hidden when PPCP sets display:none.
 * The smart-button (gold) container will render in the form footer instead. */
.lbf-fd-gf-shell .ginput_container_custom_card_fields[style*="display:none"],
.lbf-fd-gf-shell .ginput_container_custom_card_fields[style*="display: none"]{display:none!important}

/* Hide the fields we drive from the card grid (amount + recurring + tribute fields by default + product + total + tokens + source) */
.lbf-fd-gf-shell .gfield--amount,
.lbf-fd-gf-shell .gfield--recurring,
.lbf-fd-gf-shell .gfield--product,
.lbf-fd-gf-shell .gfield--total,
.lbf-fd-gf-shell .gfield--source-url,
.lbf-fd-gf-shell .gfield--source-flag,
.lbf-fd-gf-shell .gfield--token,
.lbf-fd-gf-shell .gfield--phone,
.lbf-fd-gf-shell .gfield_visibility_hidden,
.lbf-fd-gf-shell .lbf-fd-field--amount,
.lbf-fd-gf-shell .lbf-fd-field--recurring,
.lbf-fd-gf-shell .lbf-fd-field--product,
.lbf-fd-gf-shell .lbf-fd-field--total{display:none!important}

/* Hide tribute fields by default — toggleable via "Add a tribute" link */
.lbf-fd-gf-shell .lbf-fd-section--tribute,
.lbf-fd-gf-shell .lbf-fd-field--tribute-type,
.lbf-fd-gf-shell .lbf-fd-field--tribute-name,
.lbf-fd-gf-shell .lbf-fd-field--tribute-notify{display:none!important}
.lbf-fd-gf-shell.is-tribute-open .lbf-fd-section--tribute,
.lbf-fd-gf-shell.is-tribute-open .lbf-fd-field--tribute-type,
.lbf-fd-gf-shell.is-tribute-open .lbf-fd-field--tribute-name,
.lbf-fd-gf-shell.is-tribute-open .lbf-fd-field--tribute-notify{display:block!important}

/* PayPal field container — keep it visible and adequately sized */
.lbf-fd-gf-shell .lbf-fd-field--paypal{margin-top:14px!important}
.lbf-fd-gf-shell .lbf-fd-field--paypal .gfield_label{display:block!important;margin-bottom:6px!important}

/* GF submit button — hide JUST the submit input, NOT the whole footer.
 * The footer is the PayPal smart-buttons container's home (PPCP injects
 * #gform_ppcp_smart_payment_buttons_134 INSIDE .gform_footer). Hiding the
 * whole footer was hiding the gold button too (v1.4.10 bug).
 * Keep footer visible; just nuke the gray submit button and any hidden inputs
 * GF puts in the footer (they're hidden anyway). */
.lbf-fd-gf-shell .gform_footer input[type="submit"]{display:none!important}
.lbf-fd-gf-shell .gform_footer{padding:0!important;margin:0!important;border:0!important;background:transparent!important;text-align:center}

/* Tribute toggle row */
.lbf-fd-tribute-toggle{margin:8px 0 4px;background:none;border:0;padding:0;color:#0537A4;font:800 12px Barlow,Arial,sans-serif;cursor:pointer;text-decoration:underline}
.lbf-fd-tribute-toggle:hover{color:#002580}

/* Validation error pill above the GF */
.lbf-fd-error{margin:0 0 12px;padding:10px 14px;border-radius:12px;background:#fff5f5;border:1px solid rgba(168,0,10,.25);color:#a8000a;font:700 12.5px Barlow,Arial,sans-serif}

/* Success state — replaces card contents after PayPal completes (rarely seen since we redirect, but a fallback) */
.lbf-fd-success{padding:18px 4px;text-align:center}
.lbf-fd-success__check{width:54px;height:54px;border-radius:999px;background:linear-gradient(135deg,#0a7d3c,#0537A4);color:#fff;display:flex;align-items:center;justify-content:center;font-size:28px;margin:0 auto 12px;box-shadow:0 12px 24px rgba(10,125,60,.22)}
.lbf-fd-success h3{margin:0 0 6px;color:#102b5c;font-size:18px}
.lbf-fd-success p{margin:0;color:#52658a;font-size:13.5px}

/* Footnote spacing parity with the original card */
.lbf-fd-card .lbf-spd25-secure-note{margin-top:14px}

/* Chunk 6: sandbox test mode banner — only renders when admin uses the
 * "Send $1 Sandbox Test Entry" button in the Festival Donations admin. */
.lbf-fd-test-banner{margin:0 0 14px;padding:12px 16px;border-radius:14px;background:linear-gradient(135deg,#fffce5,#fff5b3);border:1.5px solid #F3C303;color:#5b4a00;font:700 13px Barlow,Arial,sans-serif;display:flex;flex-direction:column;gap:4px;box-shadow:0 4px 12px rgba(243,195,3,.18)}
.lbf-fd-test-banner strong{font-weight:900;letter-spacing:.04em}
.lbf-fd-test-banner span{font-weight:600;line-height:1.4}
.lbf-fd-card--test{outline:2px dashed #F3C303;outline-offset:6px}
