/**
 * BlessGive Donation System - Frontend Stylesheet
 * Inspired by superthankss.com
 */

:root {
  --bg-sky-top: #dbeafe;
  --bg-sky-mid: #e8f1fb;
  --bg-sky-low: #f6f9ff;
  --card-bg: #ffffff;
  --ink: #2b3a52;
  --ink-soft: #5c6b84;
  --gold: #f6ead2;
  --gold-border: #e8d5a8;
  --gold-dark: #a9812f;
  --halo: #8ea8e8;
  --halo-deep: #5f7dd1;
  --line: #dde6f4;
  --ok: #3f9d6b;
  --danger: #e53e3e;
  --radius: 14px;
}

/* =====================================================================
   UNIVERSAL SKY BACKGROUND & FULL-BLEED BREAKOUT
   ===================================================================== */
html,
body,
html.blessgive-has-sky-bg,
body.blessgive-has-sky-bg,
html:has(.blessgive-wrapper),
body:has(.blessgive-wrapper) {
  background: linear-gradient(180deg, #dbeafe 0%, #e8f1fb 45%, #f6f9ff 100%) !important;
  background-attachment: fixed !important;
  min-height: 100vh !important;
  margin: 0 !important;
  overflow-x: hidden !important;
}

/* Make all theme, Gutenberg & Elementor parent containers transparent */
body:has(.blessgive-wrapper) #page,
body:has(.blessgive-wrapper) #content,
body:has(.blessgive-wrapper) .site,
body:has(.blessgive-wrapper) .site-content,
body:has(.blessgive-wrapper) .site-main,
body:has(.blessgive-wrapper) .content-area,
body:has(.blessgive-wrapper) .entry-content,
body:has(.blessgive-wrapper) .post-content,
body:has(.blessgive-wrapper) .ast-container,
body:has(.blessgive-wrapper) .elementor,
body:has(.blessgive-wrapper) .elementor-section,
body:has(.blessgive-wrapper) .elementor-section-boxed,
body:has(.blessgive-wrapper) .elementor-container,
body:has(.blessgive-wrapper) .elementor-column,
body:has(.blessgive-wrapper) .elementor-widget-wrap,
body:has(.blessgive-wrapper) .wp-site-blocks,
body:has(.blessgive-wrapper) article,
body:has(.blessgive-wrapper) main,
body.blessgive-has-sky-bg #page,
body.blessgive-has-sky-bg #content,
body.blessgive-has-sky-bg .site,
body.blessgive-has-sky-bg .site-content,
body.blessgive-has-sky-bg .site-main,
body.blessgive-has-sky-bg .content-area,
body.blessgive-has-sky-bg .entry-content,
body.blessgive-has-sky-bg .post-content,
body.blessgive-has-sky-bg .ast-container,
body.blessgive-has-sky-bg .elementor,
body.blessgive-has-sky-bg .elementor-section,
body.blessgive-has-sky-bg .elementor-section-boxed,
body.blessgive-has-sky-bg .elementor-container,
body.blessgive-has-sky-bg .elementor-column,
body.blessgive-has-sky-bg .elementor-widget-wrap,
body.blessgive-has-sky-bg .wp-site-blocks,
body.blessgive-has-sky-bg article,
body.blessgive-has-sky-bg main {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Full-bleed breakout: forces the wrapper to stretch 100vw edge-to-edge */
.blessgive-wrapper {
  position: relative !important;
  width: 100vw !important;
  max-width: 100vw !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  min-height: 100vh !important;
  background: linear-gradient(180deg, var(--bg-sky-top, #dbeafe) 0%, var(--bg-sky-mid, #e8f1fb) 45%, var(--bg-sky-low, #f6f9ff) 100%) !important;
  background-attachment: fixed !important;
  color: var(--ink, #2b3a52);
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  padding: 30px 0 80px !important;
}

.blessgive-wrapper *,
.blessgive-wrapper *::before,
.blessgive-wrapper *::after {
  box-sizing: border-box;
}

/* Atmospheric Drifting Clouds across whole viewport */
.blessgive-clouds {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 0 !important;
  overflow: hidden !important;
}

.blessgive-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  filter: blur(24px);
  animation: blessgive-drift linear infinite;
}

.blessgive-cloud:nth-child(1) { width: 340px; height: 90px; top: 5%; left: -20%; animation-duration: 75s; }
.blessgive-cloud:nth-child(2) { width: 260px; height: 70px; top: 32%; left: -30%; animation-duration: 105s; animation-delay: -35s; }
.blessgive-cloud:nth-child(3) { width: 420px; height: 110px; top: 60%; left: -25%; animation-duration: 90s; animation-delay: -65s; }
.blessgive-cloud:nth-child(4) { width: 300px; height: 80px; top: 82%; left: -15%; animation-duration: 115s; animation-delay: -20s; }

@keyframes blessgive-drift {
  from { transform: translateX(0); }
  to { transform: translateX(150vw); }
}

@media (prefers-reduced-motion: reduce) {
  .blessgive-cloud { animation: none; left: 10%; }
}

/* Container & Main Panel */
.blessgive-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px;
  position: relative;
  z-index: 1;
}

.blessgive-panel {
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(95, 125, 209, 0.16);
  border: 1px solid rgba(221, 230, 244, 0.6);
  padding: 48px 40px;
  margin-bottom: 36px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 560px) {
  .blessgive-panel {
    padding: 32px 20px;
    border-radius: 18px;
  }
}

/* Holy Emblem Halo */
.blessgive-emblem-halo {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.4), rgba(142, 168, 232, 0.22), transparent 70%);
}

.blessgive-emblem {
  width: 100px !important;
  height: 100px !important;
  border-radius: 50% !important;
  -webkit-border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  box-shadow: 0 8px 24px rgba(212, 167, 55, 0.4), 0 4px 14px rgba(95, 125, 209, 0.25);
  border: 2px solid #dfb15b !important;
  clip-path: circle(50% at 50% 50%) !important;
  -webkit-clip-path: circle(50% at 50% 50%) !important;
  overflow: hidden !important;
}

/* Typography */
.blessgive-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(32px, 5.5vw, 46px);
  text-align: center;
  color: var(--halo-deep);
  letter-spacing: 0.5px;
  line-height: 1.15;
  margin: 0 0 12px;
}

.blessgive-sub {
  text-align: center;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto 36px;
  font-size: 15.5px;
  line-height: 1.6;
}

/* Form Fields */
.blessgive-field {
  margin-bottom: 28px;
}

.blessgive-label {
  display: block;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 12px;
  letter-spacing: 0.2px;
  color: var(--ink);
}

.blessgive-req {
  color: var(--halo-deep);
  font-weight: 800;
}

.blessgive-optional {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 13px;
}

.blessgive-field input[type="text"],
.blessgive-field input[type="number"],
.blessgive-field input[type="email"],
.blessgive-field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 18px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  text-align: center;
  background: #ffffff;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.blessgive-field textarea {
  text-align: left;
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.blessgive-field input:focus,
.blessgive-field textarea:focus {
  outline: none;
  border-color: var(--halo-deep);
  box-shadow: 0 0 0 4px rgba(142, 168, 232, 0.18);
}

#blessgive_custom_amount {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--halo-deep);
}

/* Preset Amount Chips Grid */
.blessgive-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 440px) {
  .blessgive-chips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.blessgive-chip {
  padding: 13px 0;
  background: var(--gold);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s, color 0.15s, border-color 0.15s;
}

.blessgive-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(232, 213, 168, 0.5);
}

.blessgive-chip.active {
  background: var(--halo-deep) !important;
  border-color: var(--halo-deep) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(95, 125, 209, 0.4);
}

/* Hint & Live Counters */
.blessgive-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  background: #f2f5fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
}

.blessgive-field:has(.blessgive-hint) {
  text-align: center;
}

.blessgive-counter {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* Image Dropzone */
.blessgive-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed #b9c9ea;
  border-radius: var(--radius);
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  color: var(--ink-soft);
  background: #fafcff;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}

.blessgive-dropzone:hover,
.blessgive-dropzone.dragover {
  background: #f0f6ff;
  border-color: var(--halo-deep);
}

.blessgive-dz-icon {
  font-size: 28px;
  line-height: 1;
}

.blessgive-dz-title {
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
}

.blessgive-dz-hint {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.blessgive-dropzone input[type="file"] {
  display: none !important;
}

.blessgive-preview-img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 12px;
  margin-top: 10px;
  display: none;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.blessgive-btn-remove-img {
  margin-top: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #c53030;
  cursor: pointer;
}

/* Anonymous Support Box */
.blessgive-anon-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  background: #ffffff;
  transition: border-color 0.15s, background 0.15s;
}

.blessgive-anon-toggle:hover {
  border-color: var(--halo);
  background: #fafcff;
}

.blessgive-anon-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--halo-deep);
  cursor: pointer;
}

.blessgive-anon-toggle span {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
}

/* Free eBook Gift Teaser Card */
.blessgive-gift-card {
  display: flex;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, #fdf6e6, #fffdf8);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 28px 0;
}

@media (max-width: 560px) {
  .blessgive-gift-card {
    flex-direction: column;
    text-align: center;
  }
}

.blessgive-gift-cover-thumb {
  width: 82px;
  height: auto;
  flex: 0 0 82px;
  border-radius: 8px;
  display: block;
  box-shadow: 0 6px 16px rgba(95, 125, 209, 0.28);
}

.blessgive-gift-info {
  flex: 1;
}

.blessgive-gift-badge {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: none;
  color: var(--gold-dark);
  margin-bottom: 4px;
}

.blessgive-gift-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--halo-deep);
  line-height: 1.2;
  margin: 0 0 4px;
}

.blessgive-gift-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.45;
}

/* Error Alert */
.blessgive-error-alert {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: center;
}

/* Submit Button */
button.blessgive-btn-donate,
button#blessgive-submit-btn,
.blessgive-btn-donate,
.blessgive-btn-primary,
#blessgive-submit-btn {
  width: 100% !important;
  padding: 18px 24px !important;
  border: none !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  outline: none !important;
  border-radius: var(--radius) !important;
  background: linear-gradient(135deg, #7290dd, #5f7dd1) !important;
  background-color: #5f7dd1 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-family: inherit !important;
  font-weight: 800 !important;
  font-size: 17px !important;
  letter-spacing: 0.4px !important;
  cursor: pointer !important;
  box-shadow: 0 10px 24px rgba(95, 125, 209, 0.35) !important;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

/* Force pure white text on all children (spans, labels, text) */
button.blessgive-btn-donate *,
button.blessgive-btn-donate span,
button.blessgive-btn-donate .btn-text,
.blessgive-btn-donate *,
.blessgive-btn-donate span,
.blessgive-btn-donate .btn-text,
.blessgive-btn-primary *,
.blessgive-btn-primary span,
#blessgive-submit-btn *,
#blessgive-submit-btn span,
#blessgive-submit-btn .btn-text {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
  font-weight: 800 !important;
}

button.blessgive-btn-donate:hover,
button.blessgive-btn-donate:focus,
.blessgive-btn-donate:hover,
.blessgive-btn-donate:focus,
.blessgive-btn-primary:hover,
.blessgive-btn-primary:focus,
#blessgive-submit-btn:hover,
#blessgive-submit-btn:focus {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 30px rgba(95, 125, 209, 0.45) !important;
  background: linear-gradient(135deg, #6584d4, #5270c7) !important;
  background-color: #5270c7 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: none !important;
  outline: none !important;
}

button.blessgive-btn-donate:hover *,
button.blessgive-btn-donate:focus *,
.blessgive-btn-donate:hover *,
.blessgive-btn-donate:focus *,
#blessgive-submit-btn:hover *,
#blessgive-submit-btn:focus * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.blessgive-btn-donate:disabled,
#blessgive-submit-btn:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: blessgive-spin 0.7s linear infinite;
}

@keyframes blessgive-spin {
  to { transform: rotate(360deg); }
}

/* Trust Section */
.blessgive-trust {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 24px;
  text-align: center;
}

.blessgive-trust-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--ink);
}

.blessgive-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.blessgive-badge-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  background: #ffffff;
}

.blessgive-badge-pill b {
  color: var(--ok);
}

/* Toast */
.blessgive-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #ffffff;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 99999;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.blessgive-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =====================================================================
   SUPPORTER WALL COMPONENT
   ===================================================================== */
.blessgive-wall-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  font-family: 'Nunito Sans', sans-serif;
  color: var(--ink);
}

.blessgive-wall-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 38px);
  color: var(--halo-deep);
  text-align: center;
  margin: 0 0 30px;
}

.blessgive-spark {
  color: var(--halo);
  font-size: 0.8em;
  vertical-align: middle;
}

.blessgive-wall-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.blessgive-donor-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
  background: linear-gradient(180deg, #fbfdff, #ffffff);
  text-align: center;
  box-shadow: 0 4px 18px rgba(95, 125, 209, 0.06);
  transition: transform 0.15s, box-shadow 0.15s;
}

.blessgive-donor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(95, 125, 209, 0.12);
}

.blessgive-avatar-wrap {
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
}

.blessgive-avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.blessgive-avatar-initial {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #7290dd, #486ac2);
  color: #ffffff;
  font-weight: 800;
  font-size: 22px;
}

.blessgive-avatar-photo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(95, 125, 209, 0.25);
  border: 2px solid #ffffff;
}

.blessgive-donor-name {
  font-weight: 800;
  font-size: 16.5px;
  color: var(--ink);
  margin-bottom: 2px;
}

.blessgive-donor-amt {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--halo-deep);
  margin: 2px 0;
}

.blessgive-donor-time {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.blessgive-donor-msg {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  background: #ffffff;
  margin: 0 auto;
  max-width: 520px;
}

.blessgive-badge-small-anon {
  display: inline-block;
  background: #f7ecd2;
  color: #926d21;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

.blessgive-wall-empty {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  background: #ffffff;
}

.blessgive-wall-empty .empty-icon {
  font-size: 40px;
  margin: 0 0 10px;
}

.blessgive-wall-empty .empty-text {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0;
}

.blessgive-load-more-wrap {
  text-align: center;
  margin-top: 30px;
}

.blessgive-btn-load-more {
  padding: 14px 32px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}

.blessgive-btn-load-more:hover {
  border-color: var(--halo);
  background: #f7faff;
  transform: translateY(-1px);
}

.blessgive-wall-count {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 10px;
}
