main {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem;
  padding-top: 2rem;
  gap: 1rem;
}

.payment,
.previous-donations {
  --max-section-width: 31.25rem;
  flex: 1 1 var(--max-section-width);
  max-width: var(--max-section-width);
}

header {
  background-color: #181818;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  display: flex;
  box-shadow: 0 8px 12px #000000b0;
}

header img {
  aspect-ratio: 1;
  border: 2px solid #b39cd0;
  border-radius: 0.25rem;
  width: 12rem;
}

header .info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  max-width: 31.25rem;
  text-align: center;
}

header .info p {
  text-align: left;
}

form {
  display: flex;
  flex-direction: column;
  background-color: #181818;
  border-radius: 0.25rem;
  gap: 0.5rem;
  padding: 1rem;
  box-shadow: 0 4px 8px #0000001a;
}

form .group {
  flex-direction: column;
  gap: 0.5rem;
  display: flex;
}

form label {
  font-weight: 700;
}

form label .detail {
  font-size: 0.875rem;
  color: #ccc;
}

form label:has(+ input:required)::after {
  content: ' [required]';
  font-size: 0.875rem;
  color: #ccc;
}

form input {
  color: #e4e4e4;
  background-color: #282828;
  border: 1px solid #444;
  border-radius: 0.25rem;
  padding: 0.5rem;
}

form input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

form input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

form input[type='number'] {
  appearance: textfield;
}

form textarea {
  color: #e4e4e4;
  background-color: #282828;
  border: 1px solid #444;
  border-radius: 0.25rem;
  padding: 0.5rem;
  resize: vertical;
}

.error-message {
  color: #ff6b6b;
  font-size: 0.875rem;
}

form button {
  color: #fff;
  background-color: #b39cd0;
  border: none;
  border-radius: 0.25rem;
  padding: 0.75rem;
  font-weight: 700;
  transition: background-color 0.3s;
}

.payment-confirmation-loading {
  text-align: center;
  font-weight: 700;
  padding: 2rem 0;
}

.payment-confirmation-loading .spinner {
  border: 4px solid #444;
  border-top: 4px solid #b39cd0;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.payment-confirmation-card {
  background-color: #181818;
  border-radius: 0.25rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 31.25rem;
  box-shadow: 0 4px 8px #0000001a;
}

.previous-donations {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.previous-donations ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.previous-donations ul li {
  display: flex;
}

.previous-donations .load-more-button {
  color: #fff;
  background-color: #b39cd0;
  border: none;
  border-radius: 0.25rem;
  padding: 0.75rem;
  font-weight: 700;
  transition: background-color 0.3s;
}

.payment-card {
  flex: 1;
  background-color: #282828;
  border-radius: 0.25rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.payment-card .header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.payment-card .left,
.payment-card .right {
  display: flex;
}

.payment-card .left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.payment-card .left img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.25rem;
}

.payment-card .header .right {
  flex: 1;
  gap: 1rem;
}

.payment-card .header .info,
.payment-card .header .details {
  flex: 1;
}

.payment-card .header .right .info .date {
  font-size: 0.875rem;
  color: #aaa;
}

.payment-card .header .right .details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.payment-card .header .right .details .amount {
  font-weight: 700;
  font-size: 1.25rem;
}

.payment-card .header .right .info,
.payment-card .header .right .details .amount,
.payment-card .message {
  display: block;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.payment-card .message {
  font-style: italic;
  color: #ccc;
}

.return-home-link {
  color: #b39cd0;
  text-align: center;
  margin-top: 1rem;
  font-weight: 700;
}

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