/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* -----
  CSS Reset
----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: 'Poppins', sans-serif;
  margin: 0;
}

input,
button,
textarea,
select {
  font: inherit;
}
/* ----- End of Reset ----- */

/* ----- Base & Variables ----- */
:root {
  /* Brand Colors */
  --brand-dark-green: #047857;
  --brand-medium-green: #34a853;
  --brand-light-bg: #f0f7f3; /* Lighter, softer green bg */
  --brand-border-green: #a3d9b8;

  /* Neutral Colors */
  --neutral-white: #ffffff;
  --neutral-100: #f9fafb; /* Lightest gray for footer */
  --neutral-300: #e5e7eb;
  --neutral-400: #d1d5db; /* Default border */
  --neutral-500: #9ca3af; /* Placeholder */
  --neutral-600: #6b7280; /* Label text */
  --neutral-800: #374151; /* Body text */
  --neutral-900: #1f2937; /* Headings */

  /* UI Elements */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --radius-md: 0.5rem; /* 8px */
  --radius-lg: 0.75rem; /* 12px */
  --transition-all: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Global Utility Styles ----- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/*
================================================================
  DONATION FORM STYLES
  (SINGLE-COLUMN, 100% WIDTH)
================================================================
*/

.card-container {
  max-width: 600px; /* CHANGED: Form is 100% of parent */
  margin-left: auto;
  margin-right: auto;
}

.page-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.donation-card {
  background-color: var(--neutral-white, #ffffff);
  overflow: hidden;
  border-radius: var(--radius-lg, 0.75rem);
  border: 1px solid var(--neutral-300, #e5e7eb);
}

/* Form is now a single column grid */
.donation-card form {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.donation-card .card-body {
  padding: 1.5rem; /* 24px */
}

.donation-card .card-footer {
  padding: 1.5rem; /* 24px */
  background-color: var(--neutral-100, #f9fafb); /* Light gray footer */
  border-top: 1px solid var(--neutral-300, #e5e7eb);
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .donation-card .card-body,
  .donation-card .card-footer {
    padding: 2.5rem; /* 40px */
  }
}

/* ----- Form Layout ----- */
.donation-card .form-space-y > * + * {
  margin-top: 2.25rem; /* More spacing */
}

.donation-card .form-grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem; /* 32px */
}

@media (min-width: 768px) {
  .donation-card .form-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.donation-card .form-label {
  display: block;
  font-size: 0.875rem; /* 14px */
  font-weight: 500;
  color: var(--neutral-800, #374151);
  margin-bottom: 0.5rem; /* 8px */
}

/* ----- Floating Label Inputs (UNDERLINE STYLE) ----- */
.donation-card .form-group-floating {
  position: relative;
}

.donation-card .floating-input {
  margin-top: 0.25rem;
  display: block;
  width: 100%;
  padding: 0.75rem 0.1rem; /* Padding for text */
  border: none;
  border-bottom: 1px solid var(--neutral-400, #d1d5db); /* 1px underline */
  border-radius: 0;
  box-shadow: none;
  transition: var(--transition-all);
  background-color: transparent;
}

.donation-card .floating-input::placeholder {
  color: transparent;
}

.donation-card .floating-input:focus {
  outline: none;
  box-shadow: none;
  border-bottom: 2px solid var(--brand-dark-green, #047857); /* Thicker green */
}

.donation-card .floating-label {
  position: absolute;
  left: 0.1rem;
  background-color: transparent;
  padding: 0;
  transition: var(--transition-all);
  pointer-events: none;
  color: var(--neutral-600, #6b7280);
  top: -0.625rem; /* -10px (Always up) */
  font-size: 0.875rem; /* 14px */
}

/* State when placeholder is shown (inactive/down) */
.donation-card .peer:placeholder-shown + .floating-label {
  top: 0.875rem; /* 14px */
  font-size: 1rem; /* 16px */
  color: var(--neutral-500, #9ca3af);
}

/* State when focused (active/up + green) */
.donation-card .peer:focus + .floating-label {
  top: -0.625rem;
  font-size: 0.875rem;
  color: var(--brand-dark-green, #047857);
}

/* ----- Amount Options (OUTLINE STYLE) ----- */
.donation-card .amount-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem; /* 12px */
}

@media (min-width: 640px) {
  .donation-card .amount-options-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.donation-card .amount-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--neutral-300, #e5e7eb); /* Thinner border */
  border-radius: var(--radius-md, 0.5rem); /* Less rounded */
  font-size: 0.875rem; /* 14px */
  font-weight: 600;
  color: var(--neutral-800, #374151);
  background-color: var(--neutral-white, #ffffff);
  cursor: pointer;
  transition: var(--transition-all);
}

.donation-card .amount-btn:hover {
  background-color: var(--neutral-100, #f9fafb);
  border-color: var(--neutral-400, #d1d5db);
}

.donation-card .amount-btn.active {
  background-color: var(--neutral-white, #ffffff); /* White BG */
  color: var(--brand-dark-green, #047857); /* Green Text */
  border-color: var(--brand-medium-green, #34a853); /* Green Border */
  border-width: 2px;
  padding: calc(0.75rem - 1px); /* Adjust padding for border */
}

.donation-card .custom-amount-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--neutral-300, #e5e7eb);
  border-radius: var(--radius-md, 0.5rem);
  box-shadow: none;
  transition: var(--transition-all);
  background-color: var(--neutral-white, #ffffff);
}

.donation-card .custom-amount-input:focus {
  outline: none;
  border-color: var(--brand-medium-green, #34a853);
  border-width: 2px;
  padding: calc(0.75rem - 1px);
}

.donation-card .custom-amount-input::placeholder {
  color: var(--neutral-500, #9ca3af);
}

/* ----- Checkbox ----- */
.donation-card .checkbox-group {
  display: flex;
  align-items: center;
}

.donation-card .checkbox-input {
  height: 1.25rem;
  width: 1.25rem;
  color: var(--brand-medium-green, #34a853);
  border: 1px solid var(--neutral-400, #d1d5db);
  border-radius: 0.25rem;
  cursor: pointer;
  flex-shrink: 0;
  appearance: none;
  background-color: var(--neutral-white, #ffffff);
  transition: var(--transition-all);
}

.donation-card .checkbox-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--brand-medium-green, #34a853);
}

.donation-card .checkbox-input:checked {
  background-color: var(--brand-medium-green, #34a853);
  border-color: var(--brand-medium-green, #34a853);
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

.donation-card .checkbox-label {
  margin-left: 0.75rem;
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-900, #1f2937);
  cursor: pointer;
}

/* ----- Payment Methods (2x2 GRID) ----- */
.donation-card .payment-options-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem; /* 12px */
}

.donation-card .payment-option-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md, 0.5rem);
  cursor: pointer;
  transition: var(--transition-all);
  background-color: var(--neutral-white, #ffffff);
  color: var(--neutral-800, #374151);
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid var(--neutral-300, #e5e7eb);
}

.donation-card .payment-option-label:hover {
  background-color: var(--neutral-100, #f9fafb);
  border-color: var(--neutral-400, #d1d5db);
}

/* CHANGED: Active payment style is now prominent */
.donation-card input[name='payment-method']:checked + .payment-option-label {
  background-color: var(--brand-light-bg, #f0f7f3); /* Light Green BG */
  color: var(--brand-dark-green, #047857); /* Dark Green Text */
  border-color: var(--brand-medium-green, #34a853); /* Medium Green Border */
  border-width: 2px;
  padding: calc(0.875rem - 1px); /* Adjust padding for border */
  box-shadow: var(--shadow-sm); /* Add subtle pop */
}

/* ----- Footer Elements ----- */
.donation-card .submit-button {
  width: 100%;
  color: var(--neutral-white, #ffffff);
  font-size: 1.125rem; /* 18px */
  font-weight: 700;
  padding: 1rem 1rem;
  border: none;
  border-radius: var(--radius-md, 0.5rem); /* Less rounded */
  box-shadow: var(--shadow-md);
  transform: translateZ(0);
  transition: var(--transition-all), transform 200ms ease-out,
    filter 200ms ease-out;
  cursor: pointer;
  background-color: var(--brand-dark-green, #047857);
}

.donation-card .submit-button:hover {
  transform: scale(1.02) translateY(-2px);
  filter: brightness(1.1);
  box-shadow: var(--shadow-lg-hover);
}

.donation-card .submit-button:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--neutral-white, #ffffff),
    0 0 0 6px var(--brand-medium-green, #34a853);
}

.donation-card .footer-text-small {
  font-size: 0.875rem; /* 14px */
  color: var(--neutral-600, #6b7280);
  text-align: center;
  margin-top: 1.25rem; /* 20px */
}

.donation-card .footer-badge-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem; /* 12px */
  margin-top: 1.5rem; /* 24px */
}

@media (min-width: 640px) {
  .donation-card .footer-badge-container {
    flex-direction: row;
    gap: 1rem; /* 16px */
  }
}

/* Badge style */
.donation-card .footer-badge {
  display: flex;
  align-items: center;
  font-size: 0.75rem; /* 12px */
  color: var(--neutral-800, #374151);
  background-color: #dff4e6;
  border: 1px solid var(--neutral-300, #e5e7eb); /* Light gray border */
  padding: 0.375rem 0.75rem; /* 6px 12px */
  border-radius: 9999px; /* full */
}

/* Icon style */
.donation-card .badge-icon {
  width: 1rem; /* 16px */
  height: 1rem; /* 16px */
  margin-right: 0.375rem; /* 6px */
  color: var(--neutral-600, #6b7280); /* Gray icon */
}

/*
================================================================
  DONATION BAR STYLES
  (Unchanged)
================================================================
*/

/* Standard height for all inputs/buttons in the bar */
.input-bar-item {
  height: 50px; /* 3.125rem */
}

/* Style for the active amount button */
.amount-btn-bar.active {
  background-color: var(--brand-medium-green);
  color: white;
  border-color: var(--brand-medium-green);
  font-weight: 600;
}

/* ----- Layout ----- */

.donation-bar-section .container {
  max-width: 80rem; /* 1280px */
  margin-left: auto;
  margin-right: auto;
}

.donation-bar-section .donation-card {
  background-color: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  padding: 1.5rem; /* 24px */
}

.donation-bar-section .form-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem 1.25rem; /* 24px 20px */
  align-items: flex-end;
}

.donation-bar-section .amount-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem; /* 8px */
}

/* ----- Responsive Grid Columns ----- */
@media (min-width: 640px) {
  .donation-bar-section .amount-options-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .donation-bar-section .form-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .donation-bar-section .form-group-amount {
    grid-column: span 5 / span 5;
  }
  .donation-bar-section .form-group-name {
    grid-column: span 2 / span 2;
  }
  .donation-bar-section .form-group-email {
    grid-column: span 3 / span 3;
  }
  .donation-bar-section .form-group-submit {
    grid-column: span 2 / span 2;
  }
}

/* ----- Form Elements ----- */
.donation-bar-section .form-label {
  display: block;
  font-size: 0.875rem; /* 14px */
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem; /* 8px */
}

.amount-btn-bar {
  width: 100%;
  padding: 0.75rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem; /* 8px */
  font-size: 0.875rem; /* 14px */
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  background-color: #fff; /* Added for consistency */
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.amount-btn-bar:hover {
  background-color: #f3f4f6;
  color: black;
}

.amount-btn-bar:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--brand-medium-green);
}

.donation-bar-section .custom-amount-input {
  width: 100%;
  padding: 0.75rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.donation-bar-section .custom-amount-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--brand-medium-green),
    0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.donation-bar-section .custom-amount-input::placeholder {
  color: #9ca3af;
  font-size: 1rem;
}

/* ----- Floating Label Inputs ----- */
.donation-bar-section .form-group-name,
.donation-bar-section .form-group-email {
  position: relative;
}

.donation-bar-section .floating-input {
  display: block;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  background-color: transparent; /* Bar-specific style */
}

.donation-bar-section .floating-input::placeholder {
  color: transparent;
}

.donation-bar-section .floating-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--brand-medium-green),
    0 1px 2px 0 rgba(0, 0, 0, 0.05); /* Bar-specific style */
}

.donation-bar-section .floating-label {
  position: absolute;
  left: 1rem;
  background-color: #ffffff; /* Bar-specific style */
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  color: #6b7280;
  top: -0.625rem; /* 10px */
  font-size: 0.875rem; /* 14px */
}

.donation-bar-section .peer:placeholder-shown + .floating-label {
  top: 0.875rem; /* 14px */
  font-size: 1rem; /* 16px */
  color: #9ca3af;
}

.donation-bar-section .peer:focus + .floating-label {
  top: -0.625rem;
  font-size: 0.875rem;
  color: var(--brand-medium-green);
}

/* ----- Submit Button ----- */
.donation-bar-section .submit-button {
  width: 100%;
  display: flex; /* Bar-specific style */
  align-items: center; /* Bar-specific style */
  justify-content: center; /* Bar-specific style */
  color: #ffffff;
  font-size: 1.125rem; /* 18px */
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  background-color: var(--brand-dark-green);
  border: none;
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.donation-bar-section .submit-button:hover {
  transform: scale(1.02);
}

.donation-bar-section .submit-button:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 6px var(--brand-medium-green);
}

.submit-arrow {
  width: 1.25rem; /* 20px */
  height: 1.25rem; /* 20px */
  margin-left: 0.5rem; /* 8px */
}

/*
================================================================
  Admin Donation Status Badges (v1.5.0)
================================================================
*/
.gpf-status-pending {
  background-color: #ffb900;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  font-size: 0.9em;
}
.gpf-status-completed {
  background-color: #4caf50;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  font-size: 0.9em;
}
.gpf-status-failed {
  background-color: #dc3232;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  font-size: 0.9em;
}
.gpf-status-cancelled {
  background-color: #777;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  font-size: 0.9em;
}
