/* ==========================================================================
   category-view.css — view selector (desktop)
   Wymaga: variables.css, category-controls.css
   ========================================================================== */

.category-view {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-10);
  width: max-content;
  max-width: 380px;
}

.category-view__toggle {
  display: flex;
  flex: 0 0 300px;
  width: 300px;
  min-width: 0;
  box-sizing: border-box;
  height: 40px;
  max-height: 40px;
  align-items: stretch;
  gap: var(--space-8);
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-1);
}

html[data-theme="dark"] .category-view__toggle {
  background: #1f1f1f;
  border-color: rgba(255, 255, 255, 0.16);
}

.category-view__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  gap: var(--space-8);
  padding: 0 var(--space-10);
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out);
}

.category-view__option i {
  font-size: var(--fs-12);
}

.category-view__option:hover:not(.category-view__option--active) {
  background: rgba(20, 20, 20, 0.06);
}

html[data-theme="dark"] .category-view__option {
  color: rgba(255, 255, 255, 0.72);
}

html[data-theme="dark"] .category-view__option:hover:not(.category-view__option--active) {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

.category-view__option:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.category-view__option--active {
  background: var(--fg);
  color: var(--bg);
  font-weight: var(--fw-500);
}

.category-view__option:disabled,
.category-view__option--locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.category-view__option:disabled:hover,
.category-view__option--locked:hover:not(.category-view__option--active) {
  background: transparent;
}

html[data-theme="light"] .category-view__option--active {
  background: #333333;
  color: #ffffff;
}

html[data-theme="dark"] .category-view__option--active {
  background: #ffffff;
  color: #141414;
}
