* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--theme-background, #f5f7fa);
  font-family: sans-serif;
  color: var(--theme-text, #111827);
  font-weight: 200;
}

.my-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.my-card {
  background: var(--theme-surface, #fff);
  padding: 24px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

p {
  margin: 0 0 20px;
  color: var(--theme-text-muted, #6b7280);
}

#payment-element {
  margin-bottom: 20px;
}

button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#message {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  display: none;
}

.success {
  display: block;
  background: var(--theme-success-background, #dcfce7);
  color: var(--theme-success-text, #166534);
}

.error {
  display: block;
  background: var(--theme-danger-background, #fee2e2);
  color: var(--theme-danger-text, #991b1b);
}

.loading {
  display: block;
  background: var(--theme-info-background, #dbeafe);
  color: var(--theme-info-text, #1e40af);
}

.my-radio {
  display: block;
  width: 100%;
  padding: 1rem;
  margin: 0;
  border-radius: 0.5rem;
  background: var(--theme-neutral-control, #ededed);
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}

.my-radio:hover {
  background: var(--theme-neutral-control-hover, #e5e7eb);
}

.btn-check:checked+.my-radio {
  background: #8d0dfd;
  color: white;
}

.pointer {
  cursor: pointer;
}

.StripeElement {
  padding: 16px;
  border: 1px solid var(--theme-control-border, #ced4da);
  border-radius: 0.375rem;
  background: var(--theme-surface, #fff);
}

.StripeElement--focus {
  border-color: #86b7fe;
}

.StripeElement--invalid {
  border-color: #dc3545;
}

[data-other] {
  max-height: 60px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

[data-other].other-hidden {
  max-height: 0;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

@media (min-width: 992px) {
  .my-card {
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }
}

/* Account-aware giving contact card */
#contact-status {
  color: var(--theme-text-muted, #6b7280);
}

.giving-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.giving-profile-item {
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 0.75rem;
  background: var(--theme-surface-soft, #f8f9fa);
  color: var(--theme-text, #111827);
}

.giving-profile-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--theme-text-muted, #6b7280);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.giving-profile-item strong {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 500;
}


.profile-update-link {
  color: var(--theme-text, #111);
  font-weight: 600;
}

.profile-update-link:hover {
  color: var(--theme-text-muted, #000);
}

@media (max-width: 575.98px) {
  .giving-profile-grid {
    grid-template-columns: 1fr;
  }
}