/* Keeps the List view date-range dropdowns compact and aligned with their section headers. */
#appointment_tasks .tasks-header,
#completed_tasks .tasks-header {
  align-items: center;
}

.task-list-range {
  background: #191919;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: #ddd;
  color-scheme: dark;
  cursor: pointer;
  display: block;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
  grid-template-columns: none;
  line-height: 1.1;
  margin: 0;
  min-height: 27px;
  min-width: 78px;
  padding: 3px 7px;
  width: auto;
}

.task-list-range:hover,
.task-list-range:focus-visible {
  background: #1c1c1c;
  color: #f4f4f4;
  border-color: #12a878;
  outline: none;
}

.task-list-range[aria-busy="true"] {
  opacity: 0.72;
}

.task-list-range-empty {
  border: 1px dashed #343434;
  border-radius: 8px;
  color: #999;
  font-size: 0.74rem;
  margin-bottom: 10px;
  padding: 10px;
  text-align: center;
}

.task-list-range-empty[hidden] {
  display: none;
}

body.light-mode .task-list-range {
  background: var(--theme-surface-2);
  border-color: var(--theme-border);
  color-scheme: light;
  color: var(--theme-muted);
}

body.light-mode .task-list-range:hover,
body.light-mode .task-list-range:focus-visible {
  background: var(--theme-surface);
  border-color: var(--theme-accent);
  color: var(--theme-text);
}

body.light-mode .task-list-range-empty {
  border-color: var(--theme-border);
  color: var(--theme-muted);
}

@media (max-width: 430px) {
  #appointment_tasks .tasks-header,
  #completed_tasks .tasks-header {
    gap: 4px;
  }

  .task-list-range {
    font-size: 0.65rem;
    min-height: 25px;
    min-width: 72px;
    padding: 2px 5px;
  }
}
