/* ══════════════════════════════════════════════════════
   EasyDose – Sections / Filters / Tags (Dark Theme)
   ══════════════════════════════════════════════════════ */

/* === BARRA FILTRI === */
#filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  margin-bottom: 4px;
  scrollbar-width: none;
}

#filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.filter-chip.active {
  background: var(--blue-500);
  color: var(--white);
  border-color: var(--blue-500);
  box-shadow: var(--shadow-blue);
}

/* === LISTA PIATTA (2 col desktop) === */
.food-list-flat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {
  .food-list-flat {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.food-list-flat:last-child {
  margin-bottom: 140px;
}

/* === TAG SULLE CARD === */
.food-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.mini-tag {
  font-size: 10px;
  background: rgba(33, 150, 243, 0.1);
  color: var(--blue-400);
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .3px;
}

/* === DROPDOWN TAG SELECT === */
.custom-select-container {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: border-color 0.2s;
}

.custom-select-trigger:hover {
  border-color: var(--blue-500);
}

.custom-select-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.tag-checklist-dropdown {
  display: flex;
  flex-direction: column;
}

.tag-check-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

.tag-check-item:hover {
  background: rgba(255,255,255,.03);
}

.tag-check-item input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--blue-500);
}

.tag-dropdown-add {
  padding: 10px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-default);
}

.btn-add-tag-inline {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px dashed var(--grey-400);
  border-radius: var(--r-sm);
  color: var(--blue-400);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-add-tag-inline:hover {
  background: var(--blue-glow);
  border-color: var(--blue-500);
}

.btn-add-tag-inline .material-icons-round {
  font-size: 18px;
}
