html,
body,
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.columns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.column {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.row {
  display: flex;
  flex-direction: row;
}

.row:has(input[type="checkbox"]) {
  gap: 14px;
}

.half {
  width: 100%;
}

.align-center {
  align-items: center;
  justify-content: center;
}

.justify {
  justify-content: center;
}

.spacer {
  flex-grow: 1;
}

.space-between {
  justify-content: space-between;
}

.grow {
  flex-grow: 1;
}

.shrink {
  flex-shrink: 1;
}

.content {
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  margin: auto;
  gap: 12px;
  width: 100%;
  background: #eceff4;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  border-radius: 3px;
  z-index: 1;
  color: #2e3440;
}

.wrapper {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.content .wrapper {
  gap: 24px;
}

footer .wrapper {
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  gap: 12px;
  width: 100%;
}

form,
.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input,
button {
  font-size: 1.4rem;
  display: block;
  width: 100%;
  font-family: inherit;
  outline: 0;
}

button {
  background: #2e3440;
  color: #eceff4;
  border: none;
  border-radius: 3px;
  padding: 8px 12px;
  font-weight: bold;
}

button:hover {
  background: #3b4252;
}

button:active {
  filter: brightness(0.92);
  transform: translateY(1px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 2px 6px rgba(0, 0, 0, 0.65),
    inset 0 -2px 6px rgba(0, 0, 0, 0.65),
    inset 2px 0 6px rgba(0, 0, 0, 0.55),
    inset -2px 0 6px rgba(0, 0, 0, 0.55);
}

.submit-button {
  width: 100%;
  display: block;
  white-space: nowrap;
}

.submit-button-column {
  width: 100%;
  flex: 1 1 auto;
  white-space: nowrap;
}

a,
a:visited {
  color: #2e3440;
}

a:hover {
  color: #5e81ac;
}

.input {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  transition: border-color 0.3s ease;
  outline: 0;
  transition: 0.3s ease;
}

.input::placeholder {
  color: transparent;
}

.form fieldset {
  display: flex;
  flex-direction: column;
  border: none;
}

fieldset {
  border: none;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

.donation-form-columns {
  gap: 24px;
}

.field-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.field-group::before {
  content: "";
  display: block;
  position: absolute;
  height: 2px;
  bottom: 0;
  left: 6px;
  right: 6px;
  background: lightgray;
}

.field-group::after {
  content: "";
  display: block;
  position: absolute;
  height: 2px;
  bottom: 0;
  left: 6px;
  right: 6px;
  background: #5e81ac;
  transition: 0.3s ease;
  transform: scaleX(0);
}

.field-group:has(.input:focus)::after {
  transform: scaleX(1);
}

.field-group label {
  position: absolute;
  left: 8px;
  font-weight: bold;
  font-size: 1.4rem;
  transition: 0.3s ease;
  cursor: text;
  color: gray;
}

.input:focus + label {
  color: #5e81ac;
}

.error .field-group label,
.error .field-group .input {
  color: #bf616a;
}

.error .field-group::before {
  background: #bf616a;
}

.input:focus + label,
.input:not(:placeholder-shown) + label {
  font-size: 1rem;
  transform: translateY(-20px);
}

.error .field-group + p {
  color: #bf616a;
  padding: 4px 8px;
}

.field-group .field-counter {
  position: absolute;
  bottom: 4px;
  right: 8px;
  pointer-events: none;
}

.message-input {
  height: auto;
  min-height: 7.5rem;
}

input[type="checkbox"] {
  transform: scale(1.4);
  transform-origin: left center;
  accent-color: #2e3440;
}

figure {
  position: relative;
}

@media (min-width: 768px) {
  .half {
    width: 50%;
  }

  .columns {
    flex-direction: row;
  }

  .desktop-reverse {
    flex-direction: row-reverse;
  }

  .submit-button {
    width: fit-content;
    display: inline-block;
  }

  .submit-button-column {
    width: fit-content;
    flex: 0 0 auto;
  }

  .message-fieldset {
    height: 100%;
  }

  .message-field-group {
    height: 100%;
  }

  .message-input {
    height: 100%;
    min-height: 0;
  }
}
