.msf-donation-card {
  --msf-donation-plum: #3e235a;
  --msf-donation-plum-strong: #3e235a;
  --msf-donation-gold: #c8a95b;
  --msf-donation-cream: #faf8f5;
  --msf-donation-white: #ffffff;
  --msf-donation-border: rgba(43, 22, 61, 0.14);
  --msf-donation-text: #1f1a24;
  --msf-donation-muted: #6b6672;
  --msf-donation-error: #d93b3b;

  position: relative;
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px;
  background: var(--msf-donation-cream);
  border-radius: 20px;
  box-shadow: 2px 8px 24px 0 rgba(0, 0, 0, 0.08);
  font-family: Roboto;
  color: var(--msf-donation-text);
  box-sizing: border-box;
}

.msf-donation-card *,
.msf-donation-card *::before,
.msf-donation-card *::after {
  box-sizing: border-box;
}

/* Heading */
.msf-donation-heading {
  margin-bottom: 28px;
}

.msf-donation-heading p {
  display: none;
}

.msf-donation-heading h2 {
  margin: 0;
  font-family: "Playfair Display";
  font-weight: 700;
  font-size: clamp(24px, 4vw, 32px);
  letter-spacing: 0.01em;
  color: var(--msf-donation-plum);
  text-transform: uppercase;
  line-height: 1.15;
}

/* Fieldsets */
.msf-donation-card form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.msf-donation-card fieldset {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msf-donation-card legend {
  padding: 0;
  margin-bottom: 4px;
  color: var(--msf-donation-plum);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* Amount preset buttons */
.msf-donation-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.msf-donation-options button {
  appearance: none;
  background: var(--msf-donation-white);
  border: 1px solid var(--msf-donation-border);
  border-radius: 10px;
  padding: 14px 8px;
  font-family: Roboto;
  font-size: 14px;
  font-weight: 700;
  color: var(--msf-donation-plum);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.05s ease;
}

.msf-donation-options button:hover {
  border-color: var(--msf-donation-plum);
}

.msf-donation-options button:active {
  transform: translateY(1px);
}

.msf-donation-options button[data-donation-preset-active],
.msf-donation-options button.is-active {
  background: var(--msf-donation-plum-strong);
  border-color: var(--msf-donation-plum-strong);
  color: var(--msf-donation-white);
}

/* Amount input */
.msf-donation-amount-label {
  display: none;
}

.msf-donation-amount-wrap {
  display: flex;
  align-items: center;
  background: var(--msf-donation-white);
  border: 1px solid var(--msf-donation-border);
  border-radius: 10px;
  padding: 0 20px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.msf-donation-amount-wrap:focus-within {
  border-color: var(--msf-donation-plum);
  box-shadow: 0 0 0 3px rgba(82, 53, 108, 0.12);
}

.msf-donation-amount-wrap span {
  flex: none;
  color: var(--msf-donation-muted);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding-right: 14px;
  border-right: 1px solid var(--msf-donation-border);
  margin-right: 14px;
}

.msf-donation-amount-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none !important;
  padding: 12px;
  font-family: Roboto;
  font-size: 16px;
  font-weight: 500;
  color: var(--msf-donation-text);
}

.msf-donation-amount-wrap input::placeholder {
  color: #8b8792;
}

.msf-donation-amount-wrap input[type="number"]::-webkit-outer-spin-button,
.msf-donation-amount-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.msf-donation-amount-wrap input[type="number"] {
  -moz-appearance: textfield;
}

/* Personal information inputs */
.msf-donation-card fieldset input[type="text"],
.msf-donation-card fieldset input[type="email"],
.msf-donation-card fieldset input[type="tel"] {
  width: 100%;
  background: var(--msf-donation-white);
  border: 1px solid var(--msf-donation-border);
  border-radius: 10px;
  padding: 12px;
  font-family: Roboto;
  font-size: 16px;
  font-weight: 400;
  color: var(--msf-donation-text);
  outline: none !important;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.msf-donation-card fieldset input::placeholder {
  color: #8b8792;
}

.msf-donation-card fieldset input:focus {
  border-color: var(--msf-donation-plum);
  box-shadow: 0 0 0 3px rgba(82, 53, 108, 0.12);
}

.msf-donation-card fieldset input.msf-donation-invalid {
  border-color: var(--msf-donation-error) !important;
  box-shadow: none;
}

/* Error text */
.msf-donation-error {
  display: block;
  min-height: 16px;
  color: var(--msf-donation-error);
  font-size: 12px;
  font-weight: 600;
}

.msf-donation-error:empty {
  min-height: 0;
}

/* Submit button */
.msf-donation-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--msf-donation-gold);
  color: var(--msf-donation-plum-strong);
  border: none;
  border-radius: 8px;
  font-family: Roboto;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(200, 169, 91, 0.28);
  transition:
    filter 0.15s ease,
    transform 0.05s ease;
}

.msf-donation-submit:hover {
  filter: brightness(0.96);
}

.msf-donation-submit:active {
  transform: translateY(1px);
}

.msf-donation-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.msf-donation-submit svg {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
}

/* Status message */
.msf-donation-status {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  min-height: 0;
}

.msf-donation-status:empty {
  display: none;
}

.msf-donation-status[data-status="success"] {
  color: #1d6b4d;
}

.msf-donation-status[data-status="error"] {
  color: var(--msf-donation-error);
}

/* Responsive */
@media (max-width: 640px) {
  .msf-donation-card {
    padding: 24px;
    border-radius: 16px;
  }

  .msf-donation-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .msf-donation-heading h2 {
    font-size: 28px;
  }
}

@media (max-width: 420px) {
  .msf-donation-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
