/* =============================================================================
   InventoryDashboard.razor.css — Host page styles
   Radzen internal (.rz-*) overrides live in wwwroot/css/radzen-overrides.css.
   ============================================================================= */

/* ── Page layout ─────────────────────────────────────────────────────────── */
.inventory-page {
  min-height: 100vh;
  background-color: #f9fafb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.inventory-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

/* RadzenButton root element — class is applied directly, scope attr lands here */
.filter-trigger-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #374151 !important;
  position: relative !important;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease !important;
}

  .filter-trigger-btn:hover {
    border-color: #9ca3af !important;
    background-color: #f9fafb !important;
    color: #111827 !important;
  }

  .filter-trigger-btn:focus-visible {
    outline: 2px solid #2563eb !important;
    outline-offset: 2px !important;
  }

.filter-trigger-btn--active {
  color: #2563eb !important;
  background-color: #eff6ff !important;
}

  .filter-trigger-btn--active:hover {
    background-color: #dbeafe !important;
    border-color: #1d4ed8 !important;
    color: #1d4ed8 !important;
  }

/* RadzenIcon (.rzi) inside the button is a Radzen internal class — see radzen-overrides.css */

/* ── Active filter count badge ───────────────────────────────────────────── */
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background-color: #2563eb;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* ── Main content ────────────────────────────────────────────────────────── */
.inventory-content {
  padding: 24px;
}

.inventory-placeholder {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
  min-height: 400px;
  color: #6b7280;
}

/* ── Active filters summary (demo only) ─────────────────────────────────── */
.active-filters-summary {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #374151;
}

  .active-filters-summary span {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 4px 10px;
  }
/* =============================================================================
   FilterFlyout.razor.css — Blazor scoped styles for the filter flyout panel
   Design reference: Fresh Inventory Dashboard (Figma node 4670:39932)
   Radzen components used: RadzenAccordion, RadzenCheckBox, RadzenButton, RadzenIcon
   Radzen internal (.rz-*) overrides live in wwwroot/css/radzen-overrides.css.
   ============================================================================= */

/* ── Root wrapper (full-screen stacking context) ────────────────────────── */
.ff-root {
  position: fixed;
  inset: 0;
  /* pointer-events off so the wrapper never blocks the page when closed */
  pointer-events: none;
  z-index: 1000;
}

/* ── Overlay backdrop ───────────────────────────────────────────────────── */
.ff-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.3s ease;
  pointer-events: none;
}

.ff-overlay--visible {
  background-color: rgba(0, 0, 0, 0.35);
  pointer-events: all;
  cursor: pointer;
}

/* ── Panel ──────────────────────────────────────────────────────────────── */
.ff-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 375px;
  max-width: 100vw;
  background: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  overflow: hidden;
}

.ff-panel--open {
  transform: translateX(0);
  pointer-events: all;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.ff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.ff-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  font-family: inherit;
}

/* RadzenIcon root element — class is applied directly, scope attr lands here */
.ff-icon-filter {
  font-size: 20px !important;
  color: #111827;
  flex-shrink: 0;
  line-height: 1;
}

/* RadzenButton root element — class is applied directly, scope attr lands here */
.ff-close-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: unset !important;
  padding: 0 !important;
  color: #111827 !important;
  border-radius: 6px !important;
  background: transparent !important;
  border-color: transparent !important;
}

  .ff-close-btn:hover {
    background-color: #f3f4f6 !important;
    border-color: transparent !important;
  }

/* .rz-button-icon-left is a Radzen internal class — overridden in radzen-overrides.css */

/* ── Scrollable body ─────────────────────────────────────────────────────── */
.ff-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* RadzenAccordion root — class is applied directly, scope attr lands here.
   Internal .rz-accordion-* overrides live in radzen-overrides.css. */
.ff-accordion {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* ── RadzenButton — Category items ─────────────────────────────────────── */
.ff-category-item {
  display: flex !important;
  width: 100% !important;
  justify-content: flex-start !important;
  padding: 10px 0 !important;
  font-size: 14px !important;
  color: #374151 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid #f3f4f6 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: color 0.15s ease !important;
}

  .ff-category-item:last-of-type {
    border-bottom: none !important;
  }

  .ff-category-item:hover {
    background-color: transparent !important;
    color: #111827 !important;
  }

  .ff-category-item.ff-category-item--active {
    color: #2563eb !important;
    font-weight: 600 !important;
  }

/* ── RadzenButton — Show All / Show Less ────────────────────────────────── */
.ff-show-all {
  padding: 10px 0 4px !important;
  color: #2563eb !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

  .ff-show-all:hover {
    background-color: transparent !important;
    color: #1d4ed8 !important;
    text-decoration: underline !important;
  }

/* ── Checkbox rows (layout wrapper) ──────────────────────────────────────── */
.ff-checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  font-family: inherit;
}

  .ff-checkbox-row:last-child {
    border-bottom: none;
  }

/* RadzenCheckBox / RadzenLabel internal overrides live in radzen-overrides.css */

/* ── Footer — Apply button ───────────────────────────────────────────────── */
.ff-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #ffffff;
}

/* RadzenButton root element — class is applied directly, scope attr lands here */
.ff-apply-btn {
  flex: 1;
  padding: 14px 20px !important;
  background-color: #0C60A5 !important;
  border: 2px solid #0C60A5 !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  transition: background-color 0.15s ease, border-color 0.15s ease !important;
}

  .ff-apply-btn:hover {
    background-color: #0C60A5 !important;
    border-color: #0C60A5 !important;
  }

  .ff-apply-btn:active {
    background-color: #0C60A5 !important;
    border-color: #0C60A5 !important;
  }

/* Clear button — secondary style */
.ff-clear-btn {
  flex: 1;
  padding: 14px 20px !important;
  background-color: white !important;
  border: 2px solid #0C60A5 !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #374151 !important;
  letter-spacing: 0.01em !important;
  transition: background-color 0.15s ease, border-color 0.15s ease !important;
}

  .ff-clear-btn:hover {
    background-color: white !important;
    border-color: #0C60A5 !important;
  }

  .ff-clear-btn:active {
    background-color: white !important;
    border-color: #0C60A5 !important;
  }

/* ── Responsive: full-width on mobile ────────────────────────────────────── */
@media (max-width: 480px) {
  .ff-panel {
    width: 100%;
  }
}
