// Donations filter form (date, status, payment method)
// Aligned with donor-account / donation-detail variables

$gfw-filter-border: 1px solid #e5e7eb;
$gfw-filter-radius: 6px;
$gfw-filter-bg: #f8fafc;
$gfw-filter-text: #1e293b;
$gfw-filter-text-muted: #64748b;
$gfw-filter-input-bg: #ffffff;
$gfw-filter-primary: #0f172a;
$gfw-filter-primary-hover: #334155;

.gfw-donations-filter-form {
  margin: 1.5rem 0;
  padding: 1.5rem 0;
}

.gfw-donations-filter-form__header {
  margin-bottom: 1.25rem;
}

.gfw-donations-filter-form__title {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-weight: bold;
  padding-bottom: .2rem;
  margin-block-end: 0 !important;
  // text-transform: uppercase;
  // letter-spacing: 0.06em;
  // color: $gfw-filter-text-muted;
}

.gfw-donations-filter-form__description {
  margin: 0;
  max-width: 36rem;
  font-size: 0.875rem;
  line-height: 1.5;
  // color: $gfw-filter-text-muted;
}

.gfw-donations-filter-form__fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.gfw-donations-filter-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gfw-donations-filter-form__label {
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  // letter-spacing: 0.05em;
  // color: $gfw-filter-text-muted;
}

.gfw-donations-filter-form__input,
.gfw-donations-filter-form__select {
  width: 100%;
  min-width: 0;
  padding: 0.8rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: $gfw-filter-text;
  background: $gfw-filter-input-bg;
  border: $gfw-filter-border;
  // border-radius: 4px;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
  margin-bottom: 0;

  &:focus {
    outline: none;
    border-color: $gfw-filter-primary;
  }
}

.gfw-donations-filter-form__select {
  cursor: pointer;
  appearance: auto;
}

.gfw-donations-filter-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.gfw-donations-filter-form__submit {
  border: none;
  background: $primary-color;
  color: #fff;
  padding: 1rem;
  // border-radius: $gfw-filter-radius;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease;
  // font-size: 0.875rem;
  // font-weight: 600;
  margin-left: auto;
  width: 100%;
  font-size: 1rem;

  &:hover {
    opacity: 0.9;
  }
}

.gfw-donations-filter-form__clear {
  font-size: 0.9375rem;
  font-weight: 500;
  color: $gfw-filter-text-muted;
  text-decoration: none;
  transition: color 0.15s ease;

  &:hover {
    color: $gfw-filter-text;
  }
}

@media (max-width: 600px) {
  .gfw-donations-filter-form {
    padding: 0.875rem 1rem;
  }

  .gfw-donations-filter-form__fields {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}
