@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

:root {
  --hmf-primary: #792516;
  --hmf-accent: #df8729;
  --hmf-ink: #111827;
  --hmf-muted: #6b7280;
  --hmf-line: #e5e7eb;
  --hmf-bg: #f8fafc;
}

.hmf-donation-form *,
.hmf-donation-form *::before,
.hmf-donation-form *::after {
  box-sizing: border-box;
}

.hmf-donation-form,
.hmf-donor-dashboard,
.hmf-campaign-card {
  color: var(--hmf-ink);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hmf-donation-form {
  width: min(100%, 820px);
  max-width: 820px;
  margin: 24px auto;
  padding: 28px;
  border: 1px solid var(--hmf-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(121, 37, 22, .12);
}

.hmf-form-header span {
  color: var(--hmf-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.hmf-form-header h2 {
  margin: 6px 0 18px;
  font-size: 28px;
  line-height: 1.2;
}

.hmf-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 0 22px;
}

.hmf-steps span {
  height: 4px;
  border-radius: 999px;
  background: var(--hmf-line);
}

.hmf-steps .is-active,
.hmf-progress span {
  background: var(--hmf-primary);
}

.hmf-grid,
.hmf-settings-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hmf-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hmf-donation-form [hidden],
.hmf-step[hidden],
.hmf-screen-reader {
  display: none !important;
}

.hmf-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hmf-tabs button {
  min-height: 48px;
  border: 1px solid rgba(121, 37, 22, .25);
  border-radius: 6px;
  padding: 12px;
  background: var(--hmf-bg);
  color: var(--hmf-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.hmf-tabs button.is-active {
  border-color: var(--hmf-accent);
  background: var(--hmf-accent);
  color: var(--hmf-ink);
}

.hmf-tabs button:hover,
.hmf-tabs button:focus-visible {
  border-color: var(--hmf-accent);
  background: var(--hmf-accent);
  color: var(--hmf-ink);
}

.hmf-field-width {
  flex: 0 1 calc(50% - 8px);
  min-width: 150px;
}

.hmf-field-width-50 {
  flex: 0 1 calc(50% - 8px);
}

.hmf-field-width-100 {
  flex: 0 1 100%;
}

.hmf-donation-form label,
.hmf-donation-form legend {
  display: grid;
  gap: 7px;
  font-weight: 700;
  font-size: 14px;
}

.hmf-donation-form input,
.hmf-donation-form select,
.hmf-donation-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--hmf-line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

.hmf-choice,
.hmf-amounts {
  border: 0;
  padding: 0;
  margin: 22px 0;
}

.hmf-amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hmf-amounts legend {
  grid-column: 1 / -1;
}

.hmf-amounts label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 44px;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--hmf-line);
  border-radius: 6px;
  background: var(--hmf-bg);
  text-align: center;
  line-height: 1.25;
  overflow: hidden;
}

.hmf-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hmf-choice legend {
  width: 100%;
}

.hmf-choice label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--hmf-line);
  border-radius: 6px;
  background: var(--hmf-bg);
}

.hmf-amounts label:not(.hmf-custom) {
  min-height: 72px;
  padding: 14px 10px;
  font-size: clamp(14px, 2.8vw, 17px);
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
}

.hmf-amounts label:not(.hmf-custom) input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hmf-amounts label:has(input:checked) {
  border-color: var(--hmf-accent);
  background: rgba(223, 135, 41, .12);
}

.hmf-donation-type label {
  flex: 1 1 240px;
  border-color: rgba(121, 37, 22, .25);
}

.hmf-inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 500;
}

.hmf-custom input {
  width: 100%;
}

.hmf-custom span {
  text-align: left;
}

.hmf-custom {
  grid-column: 1 / -1;
  display: grid !important;
  grid-template-columns: minmax(90px, max-content) minmax(160px, 1fr);
  align-items: center;
  justify-content: stretch;
  min-height: 72px;
}

.hmf-submit,
.hmf-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  padding: 12px 20px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.hmf-submit {
  background: var(--hmf-primary);
  color: #fff;
}

.hmf-secondary {
  border: 1px solid var(--hmf-accent);
  background: #fff;
  color: var(--hmf-ink);
}

.hmf-submit:hover {
  background: var(--hmf-accent);
  color: var(--hmf-ink);
  filter: none;
}

.hmf-submit:focus-visible {
  background: var(--hmf-accent);
  color: var(--hmf-ink);
}

.hmf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.hmf-tax-exemption {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.hmf-check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  width: auto;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.hmf-check input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.hmf-check span {
  min-width: 0;
}

.hmf-pan-field {
  width: 100%;
  max-width: 100%;
}

.hmf-pan-field input {
  min-height: 44px;
  border-color: var(--hmf-line);
  border-radius: 6px;
  font-size: inherit;
  font-weight: 400;
}

.hmf-form-message {
  min-height: 22px;
  color: var(--hmf-muted);
}

.hmf-campaign-card {
  border: 1px solid var(--hmf-line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.hmf-campaign-card > img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.hmf-campaign-card__body {
  padding: 22px;
}

.hmf-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--hmf-line);
}

.hmf-progress span {
  display: block;
  height: 100%;
}

.hmf-table-wrap {
  overflow-x: auto;
}

.hmf-donor-dashboard table {
  width: 100%;
  border-collapse: collapse;
}

.hmf-donor-dashboard th,
.hmf-donor-dashboard td {
  border-bottom: 1px solid var(--hmf-line);
  padding: 10px;
  text-align: left;
}

.hmf-thank-you {
  min-height: 78vh;
  display: grid;
  align-items: center;
  padding: 72px 24px;
  background: linear-gradient(135deg, #792516, #3f140c);
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hmf-thank-you > div {
  max-width: 760px;
  margin: auto;
}

.hmf-thank-you h1 {
  color: inherit;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
}

.hmf-social-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hmf-social-share a {
  border: 1px solid rgba(223,135,41,.75);
  border-radius: 999px;
  color: #fff;
  padding: 8px 12px;
  text-decoration: none;
}

@media (max-width: 700px) {
  .hmf-donation-form {
    padding: 16px;
    margin: 12px auto;
  }

  .hmf-settings-grid,
  .hmf-tabs {
    grid-template-columns: 1fr;
  }

  .hmf-form-header h2 {
    font-size: 23px;
  }

  .hmf-submit,
  .hmf-secondary,
  .hmf-actions {
    width: 100%;
  }

  .hmf-grid {
    gap: 14px;
  }

  .hmf-field-width {
    flex-basis: 100%;
    min-width: 100%;
  }

  .hmf-amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hmf-amounts label {
    width: 100%;
  }

  .hmf-custom {
    align-items: stretch;
    flex-direction: column;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .hmf-custom input {
    width: 100%;
  }
}
