/* =========================================================
   SUPPLIES THEME — clean unified version
   ========================================================= */
:root {
  --supplies-bg: #fff1f1; /* lighter */
  --supplies-border: #f2caca;
  --supplies-hover: #ffe2e2;
  --supplies-active: #ffd0d0;
  --supplies-text: #333;
}

/* Section background & palette anchor */
.theme-supplies {
  background-color: var(--supplies-bg);
  border: 1px solid var(--supplies-border);
  color: var(--supplies-text);

  /* internal palette for buttons & accents */
  --supplies-bg-light: #fff6f6;
  --supplies-bg-hover: #ffebeb;
  --supplies-border: #e7bdbd;
}

/* Nav button styling (matches other themed buttons) */
#btnNavSupplies {
  background-color: var(--supplies-bg);
  border: 1px solid var(--supplies-border);
  color: var(--supplies-text);
}

#btnNavSupplies:hover {
  background-color: var(--supplies-hover);
}

#btnNavSupplies.active {
  background-color: var(--supplies-active);
  border-color: var(--supplies-border);
}

/* ============================
   SUPPLIES TABLE 
   ============================ */
/* ========== Supplies Table Wrapper (Scrollable) ========== */
.supplies-table-wrapper {
  max-height: calc(100vh - 400px); /* start here */
  overflow-y: auto;
  border: 1px solid #ccc;
  margin-top: 10px;
}

#suppliesTable {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.9em;
  margin-top: 10px;
}

#suppliesTable th,
#suppliesTable td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#suppliesTable th {
  background-color: #f0f0f0;
  font-weight: bold;
}

#suppliesTable tbody tr.selected {
  background-color: #ffffcc !important;
}

#suppliesTable tr:hover {
  background-color: #eef;
  cursor: pointer;
}

/* Checkmark for Include column */
.supplies-include {
  text-align: center;
  font-size: 1.1em;
  font-weight: bold;
  color: green;
}

.supplies-include.empty {
  color: transparent; /* keeps cell size consistent */
}

/* ============================
   SUPPLIES ACTION BUTTONS 
   ============================ */
/* Prevent theme-supplies border from affecting file-action groups */
.file-action-group.theme-supplies {
  border: none !important;
}

/* REMOVE special positioning for supplies file actions */
#supplyFileActions {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Make supply buttons behave exactly like product/piece buttons */
#supplyFileActions button {
  all: unset; /* clears custom styling */
  display: inline-block;
  padding: 0.5em 1em;
  margin-left: 0.5em;
  font-size: 0.95em;
  font-family: system-ui, sans-serif;
  line-height: 1.2em;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #f5f5f5;
}

#supplyFileActions button:hover {
  background-color: #eee;
}

#supplyFileActions button:first-child {
  margin-left: 0;
}

/* ===== Supplies Input Fields (mirror of Products & Pieces) ===== */
.supplyInputRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 12px;
  margin-left: 0;
}

.supplyInputRow label {
  width: 120px;
  text-align: right;
  font-weight: normal;
}

.supplyInputRow input,
.supplyInputRow select,
.supplyInputRow textarea {
  width: 150px;
  padding: 4px 6px;
  font-size: 0.95em;
}

.supplyInputRow textarea {
  width: 600px; /* match Pieces & Products notes width */
}

/* Make URL input wider */
#inpSupplyURL {
  width: 800px; /* adjust to taste: 500–800px works well */
}

/* Notes row layout */
.notes-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* Notes textarea (single authoritative rule) */
.notes-row textarea#inpSupplyNotes {
  flex: 0 0 750px; /* width */
  height: 50px; /* height */
  resize: vertical;
}

/* totals box at right */
.supplyTotalsBox {
  min-width: 220px;
  line-height: 1.4;
  padding-top: 4px;
  font-size: 0.95rem;
}

/* ===== Supplies filter controls ===== */
.supply-filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0; /* no automatic spacing — we control it manually */
  border: none;
  padding: 0;
  margin: 0;
}

/* Tight label → dropdown spacing */
.supply-filter-controls label {
  margin-right: 4px; /* pulls label close to its select */
}

/* Spacing AFTER each select and after the Reset button */
.supply-filter-controls select,
.supply-filter-controls button {
  margin-right: 20px; /* spacing between pairs */
}

/* Remove right margin from last element for neatness */
.supply-filter-controls select:last-of-type,
.supply-filter-controls button:last-of-type {
  margin-right: 0;
}

/* Extra spacing before the Reset Filters button */
#btnSupplyResetFilters {
  margin-left: 12px; /* adjust to taste: 8–16px works well */
}
