/* ==========================================================================
   Give Online Page
   Location: assets/css/give.css
   Enqueued only on template-give.php (see inc/enqueue.php).

   Reuses the site's existing tokens (--lgm-*) and field/error patterns
   from assets/css/prayer.css rather than reinventing them, so this
   page reads as part of the same design system, not a bolted-on
   payment widget. The giving card itself intentionally leans on the
   deep-navy + metallic-gold pairing (--lgm-deep-navy/--lgm-metallic-gold)
   already reserved for premium dark surfaces (see the page-header
   partial and the Prayer page), since "Secure Giving" is exactly that
   kind of moment.
   ========================================================================== */

/* ---- Why We Give / Transparency (simple centered text blocks) ---- */

.lgm-give-why-section,
.lgm-give-transparency-section {
  padding: var(--lgm-section-padding) 0;
  background: var(--lgm-white);
  text-align: center;
}

.lgm-give-transparency-section {
  background: var(--lgm-light-gray);
}

.lgm-give-why,
.lgm-give-transparency {
  max-width: var(--lgm-text-width);
  margin: 0 auto;
}

.lgm-section-eyebrow {
  display: inline-block;
  color: var(--lgm-metallic-gold-deep);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: var(--lgm-label-letter-spacing);
  text-transform: uppercase;
  margin-bottom: var(--lgm-space-sm);
}

.lgm-give-why h2,
.lgm-give-transparency h2 {
  color: var(--lgm-heading-color);
  margin-bottom: var(--lgm-space-sm);
}

.lgm-give-why p,
.lgm-give-transparency p {
  color: var(--lgm-dark-grey);
  line-height: var(--lgm-body-line-height);
}

/* ---- Ways to Give: category cards ---- */

.lgm-give-categories-section {
  padding: var(--lgm-section-padding) 0;
  background: var(--lgm-off-white);
}

.lgm-give-section-title {
  text-align: center;
  color: var(--lgm-heading-color);
  margin-bottom: var(--lgm-space-xl);
}

.lgm-give-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--lgm-space-md);
}

.lgm-give-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: var(--lgm-space-lg) var(--lgm-space-md);
  background: var(--lgm-white);
  border: 1.5px solid var(--lgm-border);
  border-radius: var(--lgm-radius-card);
  box-shadow: var(--lgm-shadow-sm);
  cursor: pointer;
  font-family: var(--lgm-font-body);
  transition: transform var(--lgm-transition-fast), box-shadow var(--lgm-transition-fast), border-color var(--lgm-transition-fast);
}

.lgm-give-category-card:hover,
.lgm-give-category-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--lgm-shadow-md);
  border-color: var(--lgm-metallic-gold);
  outline: none;
}

.lgm-give-category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--lgm-deep-navy);
  color: var(--lgm-metallic-gold);
  font-size: 1.2rem;
}

.lgm-give-category-label {
  color: var(--lgm-heading-color);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}

/* ---- Return / receipt panel ---- */

.lgm-give-return-section {
  padding: var(--lgm-space-xl) 0 0;
}

.lgm-give-return-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: var(--lgm-space-xl) var(--lgm-space-lg);
  border-radius: var(--lgm-radius-card);
  box-shadow: var(--lgm-shadow-card);
  background: var(--lgm-white);
  border-top: 6px solid var(--lgm-metallic-gold);
}

.lgm-give-return-card--failed,
.lgm-give-return-card--reversed {
  border-top-color: var(--lgm-red);
}

.lgm-give-return-card--pending {
  border-top-color: var(--lgm-medium-grey);
}

.lgm-give-return-icon {
  font-size: 3rem;
  color: var(--lgm-metallic-gold-deep);
  margin-bottom: var(--lgm-space-sm);
}

.lgm-give-return-card--failed .lgm-give-return-icon,
.lgm-give-return-card--reversed .lgm-give-return-icon {
  color: var(--lgm-red);
}

.lgm-give-return-card h2 {
  color: var(--lgm-heading-color);
  margin-bottom: var(--lgm-space-xs);
}

.lgm-give-return-card p {
  color: var(--lgm-dark-grey);
  margin-bottom: var(--lgm-space-md);
}

.lgm-give-receipt-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 var(--lgm-space-md);
  text-align: left;
  background: var(--lgm-off-white);
  border-radius: var(--lgm-radius-md);
  padding: var(--lgm-space-md);
}

.lgm-give-receipt-summary > div {
  display: flex;
  justify-content: space-between;
  gap: var(--lgm-space-sm);
}

.lgm-give-receipt-summary dt {
  color: var(--lgm-medium-grey);
  font-weight: 500;
}

.lgm-give-receipt-summary dd {
  color: var(--lgm-heading-color);
  font-weight: 700;
  margin: 0;
}

.lgm-give-return-note {
  font-size: 0.85rem;
  color: var(--lgm-medium-grey);
}

/* ---- The giving card itself ---- */

.lgm-give-panel-section {
  padding: var(--lgm-space-2xl) 0;
  background: var(--lgm-off-white);
}

.lgm-give-panel-wrap {
  display: flex;
  justify-content: center;
}

.lgm-give-card {
  width: 100%;
  max-width: 560px;
  background: var(--lgm-white);
  border-radius: var(--lgm-radius-card);
  box-shadow: var(--lgm-shadow-card);
  padding: var(--lgm-space-xl);
  position: relative;
  overflow: hidden;
}

.lgm-give-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--lgm-deep-navy), var(--lgm-metallic-gold));
}

.lgm-give-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--lgm-space-md);
}

.lgm-give-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lgm-border);
  transition: background var(--lgm-transition-fast), transform var(--lgm-transition-fast);
}

.lgm-give-step-dot.is-active {
  background: var(--lgm-metallic-gold);
  transform: scale(1.3);
}

.lgm-give-step-line {
  width: 48px;
  height: 2px;
  background: var(--lgm-border);
}

.lgm-give-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--lgm-medium-grey);
  font-size: 0.85rem;
  margin-bottom: var(--lgm-space-lg);
}

.lgm-give-security-note i {
  color: var(--lgm-metallic-gold-deep);
}

.lgm-give-step h2 {
  text-align: center;
  color: var(--lgm-heading-color);
  font-size: 1.4rem;
  margin-bottom: var(--lgm-space-lg);
}

.lgm-give-category-select {
  margin-bottom: var(--lgm-space-md);
}

.lgm-give-category-select label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--lgm-heading-color);
  margin-bottom: 8px;
}

.lgm-give-category-select select {
  width: 100%;
  background: var(--lgm-off-white);
  border: 1.5px solid var(--lgm-border);
  border-radius: var(--lgm-radius-md);
  color: var(--lgm-dark-grey);
  padding: 14px 16px;
  font-family: var(--lgm-font-body);
  font-size: 1rem;
}

/* Frequency toggle — pill switch, mirrors the "DONATE ONCE / MONTHLY"
   reference control but in brand colors. */

.lgm-give-recurring-toggle {
  display: flex;
  background: var(--lgm-off-white);
  border: 1.5px solid var(--lgm-border);
  border-radius: var(--lgm-radius-pill);
  padding: 4px;
  margin-bottom: var(--lgm-space-lg);
}

.lgm-give-freq-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--lgm-dark-grey);
  font-family: var(--lgm-font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: var(--lgm-radius-pill);
  cursor: pointer;
  transition: background var(--lgm-transition-fast), color var(--lgm-transition-fast);
}

.lgm-give-freq-btn.is-active {
  background: var(--lgm-deep-navy);
  color: var(--lgm-white);
}

.lgm-give-amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: var(--lgm-space-md);
}

.lgm-give-amount-btn {
  padding: 16px 8px;
  border: 1.5px solid var(--lgm-border);
  border-radius: var(--lgm-radius-md);
  background: var(--lgm-off-white);
  color: var(--lgm-heading-color);
  font-family: var(--lgm-font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--lgm-transition-fast), border-color var(--lgm-transition-fast), background var(--lgm-transition-fast), color var(--lgm-transition-fast);
}

.lgm-give-amount-btn:hover {
  transform: translateY(-2px);
  border-color: var(--lgm-metallic-gold);
}

.lgm-give-amount-btn.is-active {
  background: var(--lgm-deep-navy);
  border-color: var(--lgm-deep-navy);
  color: var(--lgm-metallic-gold);
}

.lgm-give-impact {
  display: none;
  background: var(--lgm-off-white);
  border-left: 3px solid var(--lgm-metallic-gold);
  border-radius: var(--lgm-radius-sm);
  padding: 12px 16px;
  color: var(--lgm-dark-grey);
  font-size: 0.9rem;
  margin: 0 0 var(--lgm-space-lg);
}

.lgm-give-impact.is-visible {
  display: block;
}

.lgm-give-impact.is-error {
  border-left-color: var(--lgm-red);
  color: var(--lgm-red);
  font-weight: 600;
}

.lgm-give-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--lgm-royal-blue);
  font-family: var(--lgm-font-body);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: var(--lgm-space-md);
  padding: 0;
}

.lgm-give-summary-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--lgm-deep-navy);
  color: var(--lgm-white);
  border-radius: var(--lgm-radius-md);
  padding: 14px 18px;
  margin-bottom: var(--lgm-space-lg);
  font-weight: 700;
}

#lgm-give-summary-category {
  color: var(--lgm-metallic-gold);
  font-weight: 500;
  font-size: 0.85rem;
}

/* ---- Fields: same floating-label system as the Prayer form ---- */

.lgm-give-field {
  margin-bottom: var(--lgm-space-md);
  position: relative;
}

.lgm-give-field > label {
  display: block;
  color: var(--lgm-heading-color);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.lgm-give-field select,
.lgm-give-field .lgm-phone-code {
  width: 100%;
  background: var(--lgm-off-white);
  border: 1.5px solid var(--lgm-border);
  border-radius: var(--lgm-radius-md);
  color: var(--lgm-dark-grey);
  padding: 14px 16px;
  font-family: var(--lgm-font-body);
  font-size: 1rem;
}

.lgm-give-field--float input,
.lgm-give-field--float textarea {
  width: 100%;
  background: var(--lgm-off-white);
  border: 1.5px solid var(--lgm-border);
  border-radius: var(--lgm-radius-md);
  color: var(--lgm-dark-grey);
  padding: 22px 16px 10px;
  font-family: var(--lgm-font-body);
  font-size: 1rem;
  transition: border-color var(--lgm-transition-fast), box-shadow var(--lgm-transition-fast);
}

.lgm-give-field--float textarea {
  padding-top: 26px;
  min-height: 90px;
  resize: vertical;
}

.lgm-give-field--float label {
  position: absolute;
  left: 16px;
  top: 17px;
  color: var(--lgm-medium-grey);
  font-size: 1rem;
  pointer-events: none;
  transition: top var(--lgm-transition-fast), font-size var(--lgm-transition-fast), color var(--lgm-transition-fast);
}

.lgm-give-field--float input:focus + label,
.lgm-give-field--float input:not(:placeholder-shown) + label,
.lgm-give-field--float textarea:focus + label,
.lgm-give-field--float textarea:not(:placeholder-shown) + label {
  top: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--lgm-deep-navy);
}

.lgm-give-field input:focus-visible,
.lgm-give-field textarea:focus-visible,
.lgm-give-field select:focus-visible,
.lgm-give-field .lgm-phone-code:focus-visible {
  outline: none;
  border-color: var(--lgm-metallic-gold);
  box-shadow: var(--lgm-shadow-focus);
}

.lgm-give-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--lgm-space-sm);
}

.lgm-give-phone-group {
  display: flex;
  gap: 10px;
}

.lgm-give-phone-group .lgm-phone-code {
  flex: 0 0 130px;
}

.lgm-give-phone-input {
  flex: 1;
  background: var(--lgm-off-white);
  border: 1.5px solid var(--lgm-border);
  border-radius: var(--lgm-radius-md);
  color: var(--lgm-dark-grey);
  padding: 14px 16px;
  font-family: var(--lgm-font-body);
  font-size: 1rem;
}

.lgm-give-error {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--lgm-red);
  font-size: 0.85rem;
}

.lgm-give-error::before {
  content: "\26A0";
}

.lgm-give-field.has-error input,
.lgm-give-field.has-error textarea,
.lgm-give-field.has-error select,
.lgm-give-field.has-error .lgm-phone-code {
  border-color: var(--lgm-red);
}

.lgm-give-field.has-error .lgm-give-error {
  display: flex;
}

.lgm-give-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--lgm-dark-grey);
  margin-bottom: var(--lgm-space-lg);
  cursor: pointer;
}

.lgm-give-form-status {
  margin-bottom: var(--lgm-space-md);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2em;
}

.lgm-give-form-status.is-error {
  color: var(--lgm-red);
}

.lgm-give-form-status.is-success {
  color: #1e7e34;
}

.lgm-give-methods-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: var(--lgm-space-md);
  color: var(--lgm-medium-grey);
  font-size: 0.8rem;
}

.lgm-give-methods-note i {
  font-size: 1.3rem;
  color: var(--lgm-royal-blue);
}

/* ---- Submit button: full-width, premium micro-interactions ---- */

.lgm-give-submit {
  width: 100%;
  justify-content: center;
  position: relative;
}

.lgm-give-submit.is-loading {
  cursor: not-allowed;
  opacity: 0.85;
}

.lgm-give-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--lgm-white);
  border-radius: 50%;
  animation: lgm-give-spin 700ms linear infinite;
}

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

/* Honeypot — same off-screen (not display:none) pattern as
   .lgm-prayer-hp, so it still catches naive bots while staying
   invisible to sighted users and skipped by screen readers. */
.lgm-give-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 600px) {
  .lgm-give-card {
    padding: var(--lgm-space-lg) var(--lgm-space-md);
  }
  .lgm-give-form-row {
    grid-template-columns: 1fr;
  }
  .lgm-give-amount-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lgm-give-category-card,
  .lgm-give-amount-btn,
  .lgm-give-step-dot,
  .lgm-give-spinner {
    transition: none !important;
    animation: none !important;
  }
}
