/* Hide the normal inline filters on mobile (only when the component is active) */
@media (max-width: 767.98px) {
  form.mf-active > :not([data-mobile-filters]) {
    display: none !important;
  }
}

.mf-flag {
  width: 24px;
  height: 16px;
  margin-right: 0.5rem;
  object-fit: cover;
  vertical-align: middle;
  border: 1px solid #e3e6ee;
}
@media (min-width: 768px) {
  .mf-flag { display: none; }
}

.mf { width: 100%; color: #212133; }

.mf__open,
.mf__change,
.mf__primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 4px;
  background: #1a73d9;
  color: #fff;
  font-weight: 600;
}
.mf__change { background: #1d4fb8; }

.mf__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f5b800;
  color: #212133;
  font-size: 0.8rem;
  font-weight: 700;
}
.mf__badge[hidden] { display: none; }

.mf__summary-title { margin: 0 0 0.25rem; font-weight: 600; }
.mf__summary-list { margin: 0 0 1rem; padding: 0; list-style: none; }
.mf__summary-list li::before { content: "· "; }

.offcanvas.offcanvas-bottom.mf__panel {
  height: calc(100% - 1rem);
  margin: 0 0.5rem;
  border: 0;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #212133;
}

.mf__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #F2F3F7;
}
.mf__title { margin: 0; font-size: 1rem; font-weight: 700; }

.mf__close {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath stroke='%23212133' stroke-width='2' stroke-linecap='round' d='M5 5l14 14M19 5L5 19'/%3e%3c/svg%3e") center / 20px no-repeat;
}

.mf__body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }

.mf__footer { padding: 0.75rem 1.25rem; background: #F2F3F7; }

.mf__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.mf__toolbar--end { justify-content: flex-end; }
.mf__link {
  padding: 0;
  border: 0;
  background: none;
  color: #1a73d9;
}
.mf__link[hidden] { display: none; }
.mf__back::before {
  content: "";
  display: inline-block;
  margin-right: 0.4rem;
  border: 5px solid transparent;
  border-right: 6px solid currentColor;
  border-left: 0;
}

.mf__row {
  display: block;
  width: 100%;
  margin-bottom: 1.25rem;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.mf__row-label { display: block; font-weight: 600; color: #212133; }
.mf__row-value { color: #1a73d9; }
.mf__row-value::after {
  content: "";
  display: inline-block;
  margin-left: 0.5rem;
  border: 5px solid transparent;
  border-left: 6px solid currentColor;
  border-right: 0;
}

.mf__search-wrap[hidden] { display: none; }
.mf__search {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  border: 1px solid #C5D0E1;
  border-radius: 4px;
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23212133' d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3e%3c/svg%3e") right 0.75rem center / 16px no-repeat;
}

.mf__slot .multiselect-dropdown__list { margin: 0; padding: 0; list-style: none; }
.mf__slot .multiselect-dropdown__item { margin: 0 -0.5rem; padding: 0.4rem 0.5rem; border-radius: 4px; }
.mf__slot .multiselect-dropdown__item[hidden] { display: none; }
.mf__slot .multiselect-dropdown__item:has(input:checked) { background: #F2F3F7; }
.mf__slot .form-item { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.mf__slot .form-item__label { display: flex; align-items: center; margin: 0; font-weight: 500; }

.mf__slot input.form-checkbox {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  flex: 0 0 18px;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  border-radius: 2px !important;
  background: none !important;
  box-shadow: none !important;
  accent-color: #1a73d9;
}
.mf__slot input.form-checkbox::before,
.mf__slot input.form-checkbox::after { display: none !important; }

.mf__slot--date .fieldset { margin: 0; padding: 0; border: 0; }
.mf__slot--date .fieldset__wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.mf__slot--date .form-item { display: block; }
.mf__slot--date .form-item__label { display: block; margin-bottom: 0.4rem; font-weight: 600; }
.mf__slot--date input[type="date"] {
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: 1px solid #C5D0E1;
  border-radius: 4px;
}
