.msf-wrapper {
  position: relative;
  display: inline-flex;
  min-width: 140px;
  margin: 0;
  padding: 0;
}
.msf-trigger {
  display: inline-flex;
  align-items: center;
  padding: 0 12px !important;
  padding-right: 30px !important;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
  font-size: 12px !important;
  height: 38px !important;
  line-height: 38px !important;
  box-sizing: border-box !important;
  user-select: none;
  cursor: pointer;
  min-width: 120px;
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.msf-trigger:hover { border-color: #9ca3af; }
.msf-label { color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; font-size: 12px !important; }
.msf-arrow { display: none; }
.msf-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  max-width: 280px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 1000;
  overflow: hidden;
}
.msf-search-wrap { padding: 8px; border-bottom: 1px solid #f1f5f9; }
.msf-search {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}
.msf-search:focus { border-color: #3b82f6; }
.msf-actions {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
}
.msf-btn {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f9fafb;
  font-size: 11px;
  color: #374151;
  text-align: center;
  width: auto !important;
  min-width: 0 !important;
}
.msf-btn:hover { background: #e5e7eb; }
.msf-options {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}
.msf-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: #374151;
}
.msf-option:hover { background: #f1f5f9; }
.msf-option.selected { background: #eff6ff; }
.msf-option input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  min-height: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}
.msf-option span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mobile overrides for multi-select filter */
@media (max-width: 768px) {
  .msf-wrapper {
    width: 100% !important;
    display: block !important;
  }
  .msf-trigger {
    min-height: 44px;
  }
  .msf-dropdown {
    min-width: 100%;
    max-width: 100%;
  }
  .msf-search, .msf-option span {
    font-size: 12px !important;
  }
  .msf-option {
    padding: 8px 12px;
    min-height: auto;
  }
  .msf-option input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
  }
  .msf-actions {
    display: flex !important;
    gap: 8px !important;
  }
  .msf-btn {
    flex: 1 !important;
    padding: 8px 10px !important;
    min-height: 36px !important;
    font-size: 12px !important;
  }
  .msf-search {
    min-height: 36px !important;
    padding: 8px !important;
    font-size: 12px !important;
  }
}
