.orca-documents-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.orca-documents-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.orca-documents-title--desktop {
  display: none;
}

.orca-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  gap: 0.75rem;
  min-width: 0;
}

.orca-mobile-filter-row {
  display: contents;
}

.orca-mobile-filter-toggle {
  display: none;
}

.orca-search-field {
  position: relative;
  flex: 1 1 20rem;
  max-width: 23rem;
  min-width: 16rem;
}

.receipt-search::-webkit-search-cancel-button {
  display: none;
  appearance: none;
}

.orca-search-clear {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  color: #64748b;
  transform: translateY(-50%);
  transition: background-color 120ms ease, color 120ms ease;
}

.orca-search-clear:hover,
.orca-search-clear:focus-visible {
  background: #e4e2e4;
  color: #1b1b1d;
}

.orca-search-clear .lucide-icon {
  width: 1rem;
  height: 1rem;
}

.orca-search-clear.hidden {
  display: none;
}

.orca-filter-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  min-width: 0;
}

.orca-receipt-results-body {
  --orca-receipt-min-rows: 10;
}

.orca-date-range-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(9rem, 1fr));
  gap: 0.5rem;
  flex: 0 0 19.5rem;
}

.orca-filter-date-field,
.orca-status-filter-field {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  border: 1px solid #c6c6cd;
  border-radius: 0.5rem;
  background: #f6f3f5;
  color: #45464d;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.375rem;
  letter-spacing: 0.04em;
  padding: 0 0.75rem;
  text-transform: uppercase;
}

.orca-filter-date-input {
  width: 100%;
  min-width: 0;
  background: transparent;
  color: #1b1b1d;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  outline: none;
  text-transform: none;
}

.orca-filter-date-input::placeholder {
  color: #8f9098;
}

.orca-status-filter-field {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
}

.orca-status-filter-field * {
  cursor: pointer;
}

.orca-status-filter-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.orca-status-filter-current {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  border-radius: 9999px;
  color: #1b1b1d;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.125rem 0;
}

.orca-status-filter-current-badge {
  padding: 0.25rem 0.5rem;
}

.orca-status-filter-panel {
  z-index: 85;
  min-width: 12rem;
}

.orca-status-filter-option {
  padding: 0.375rem;
}

@media (min-width: 768px) {
  .orca-documents-title--desktop {
    display: flex;
  }
}

@media (max-width: 767px) {
  .orca-filter-toolbar {
    gap: 0;
  }

  .orca-mobile-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.75rem;
    gap: 0.625rem;
    align-items: center;
  }

  .orca-mobile-filter-row .receipt-search {
    height: 2.75rem;
    border-radius: 0.875rem;
    padding-top: 0;
    padding-bottom: 0;
  }

  .orca-mobile-filter-row .orca-search-field > .lucide-icon {
    top: 50%;
    width: 1.375rem;
    height: 1.375rem;
    transform: translateY(-50%);
  }

  .orca-mobile-filter-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid #c6c6cd;
    border-radius: 0.875rem;
    background: #ffffff;
    color: #0058be;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  }

  .orca-mobile-filter-toggle .lucide-icon {
    width: 1.375rem;
    height: 1.375rem;
  }

  .orca-mobile-filter-toggle:hover,
  .orca-mobile-filter-toggle:focus-visible,
  .orca-mobile-filter-toggle--active {
    border-color: #adc6ff;
    background: #ffffff;
    color: #004395;
  }

  .orca-mobile-filter-dot {
    position: absolute;
    top: -0.375rem;
    right: -0.375rem;
    width: 1rem;
    height: 1rem;
    border: 2px solid #ffffff;
    border-radius: 9999px;
    background: #0058be;
  }

  .orca-filter-panel {
    display: none;
    padding-top: 0.75rem;
  }

  .orca-filter-panel--mobile-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .orca-status-filter-field {
    width: 100%;
    min-height: 3rem;
  }

  .orca-filter-reset {
    width: 100%;
    min-height: 3rem;
    border: 1px solid #c6c6cd;
    background: #ffffff;
  }

  .orca-status-filter-menu {
    position: static;
  }

  #documents:focus-within .orca-receipt-results-body {
    min-height: calc(var(--orca-receipt-min-rows) * 3.95rem);
  }

  .orca-status-filter-panel {
    top: auto;
    bottom: calc(100% + 0.375rem);
    right: 0;
    left: 0;
    width: 100%;
    min-width: 0;
    max-height: min(18rem, calc(100dvh - 2rem));
    overflow-y: auto;
  }
}
