.excel-filter {
  position: relative;
  min-width: 0;
}

.excel-filter-trigger {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #d0d7e2;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font: inherit;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.excel-filter-trigger:hover,
.excel-filter.is-open .excel-filter-trigger {
  border-color: #165dff;
  background: #f4f8ff;
}

.excel-filter-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.excel-filter-trigger svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: #667085;
}

.excel-filter.is-open .excel-filter-trigger svg {
  transform: rotate(180deg);
}

.excel-filter-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  width: min(300px, calc(100vw - 28px));
  max-width: 300px;
  padding: 10px;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.excel-filter-search-wrap {
  margin-bottom: 8px;
}

.excel-filter-search {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #d0d7e2;
  border-radius: 6px;
  font: inherit;
  text-align: left;
}

.excel-filter-actions {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}

.excel-filter-actions button,
.excel-filter-apply {
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid #d0d7e2;
  border-radius: 5px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  cursor: pointer;
}

.excel-filter-actions button:hover {
  border-color: #165dff;
  color: #165dff;
}

.excel-filter-options {
  text-align: left;
  max-height: min(46vh, 280px);
  overflow: auto;
  border-top: 1px solid #e4e7ec;
  border-bottom: 1px solid #e4e7ec;
}

.excel-filter-option {
  display: flex !important;
  min-height: 34px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 5px 4px;
  text-align: left;
  cursor: pointer;
}

.excel-filter-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
}

.excel-filter-option:hover {
  background: #f7f9fc;
}

.excel-filter-option span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
}

.excel-filter-empty {
  padding: 16px 4px;
  color: #667085;
  font-size: 12px;
  text-align: center;
}

.excel-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  color: #667085;
  font-size: 12px;
}

.excel-filter-apply {
  min-width: 58px;
  border-color: #165dff;
  background: #165dff;
  color: #fff;
}

@media (max-width: 820px) {
  .excel-filter-trigger,
  .excel-filter-search {
    min-height: 44px;
  }

  .excel-filter-panel {
    position: fixed;
    z-index: 1200;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
  }
}
