*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #1e3a8a;
  --color-accent: #3b82f6;
  --color-text-dark: #1f2937;
  --color-text-light: #ffffff;
  --color-background-light: #ffffff;
  --color-background-soft: #f9fafb;
  --color-border: #e5e7eb;
}

.sec-form-container {
  max-width: 100%; /* Ensure it fills its parent container */
  color: var(--color-text-dark);
}

/* Donation Preset Buttons */

.sec-donation-presets {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  justify-content: center; 
}

.sec-preset {
  flex: 1 1 80px; 
  min-width: 80px;
  min-height: 80px;
  padding: 1rem;
  background: var(--color-background-light); 
  color: var(--color-text-dark); 
  border: 2px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.sec-preset:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

.sec-preset.active {
  background: var(--color-text-dark);
  color: var(--color-background-light);
  transform: scale(1.05);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.6);
}

/* Inputs & Gift Aid */

#donation-amount {
  width: 100%;
  padding: 0.75rem 1rem; 
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--color-border); 
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#donation-amount:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.sec-giftaid {
  margin-bottom: 1.5rem;
}

.sec-giftaid label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--color-text-dark); 
}

.sec-giftaid-details {
  margin-top: 1rem; 
  display: none;
  animation: fadeIn 0.3s ease;
}

.sec-giftaid input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.sec-giftaid-info {
  font-size: 0.85rem;
  color: #6b7280; 
}

.giftaid-logo {
  height: 30px; 
  width: auto;
  vertical-align: middle; 
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stripe / card section wrapper */
#card-payment-button {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-background-soft);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Donate button */
#card-submit {
  position: relative;
  width: 100%;
  padding: 0.75rem; 
  background: var(--color-text-dark);
  color: var(--color-background-light);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  margin-bottom: 0.75rem;
}

#card-submit:hover {
  background: #111827;
  transform: translateY(-1px);
}

#card-submit:disabled {
  background: #6b7280;
  cursor: not-allowed;
  opacity: 0.7;
}

#card-submit.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-background-light);
  border-top: 2px solid var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

#card-amount-display {
  font-weight: bold;
}

/* Fluent Forms */

#fluentform_6 .ff-btn-submit {
  display: none !important;
}

#fluentform_6 input[type="checkbox"] {
  margin-right: 10px;
}

#fluentform_6 #ff_6_title, #ff_6_name, #ff_6_address_1_address_line_1_, #ff_6_address_1_zip_, #ff_6_email {
  width: 100%;
  padding: 0.75rem 1rem; 
  border: 1px solid #dadbdc; 
  color: #898e92;
  border-radius: 0.5rem; 
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none; 
  background-color: #fff; 
}

#fluentform_6 select.ff-el-form-control {
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* General donation message box */
#donation-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  display: none; 
}

/* Success style */
#donation-message.success {
  background-color: #e6ffed;
  border: 1px solid #34d399;
  color: #065f46;
}

/* Error style */
#donation-message.error {
  background-color: #fee2e2;
  border: 1px solid #f87171;
  color: #7f1d1d;
}

/* Stripe inline errors */
#card-errors {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  color: #7f1d1d;
  font-size: 0.9rem;
  display: none;
}
