
/* Removed Quotes light theme overrides; colors now follow base variables */
/* Bulk assign modal overlay defaults */
#bulk-assign-modal.fixed.inset-0 {
  z-index: 50;
}

/* Show indicators while the form/requesting element is requesting */
.htmx-indicator { display: none; }
button.htmx-request .htmx-indicator { display: inline-block; }
form.htmx-request .htmx-indicator { display: inline-block; }
a.htmx-request .htmx-indicator { display: inline-block; }
/* generic inline spinner helper */
.inline-spinner { display: none; }
.show-inline-spinner .inline-spinner { display: inline-block; }
@keyframes spin { from { transform: rotate(0deg);} to { transform: rotate(360deg);} }
@keyframes spinY { from { transform: translateY(-50%) rotate(0deg);} to { transform: translateY(-50%) rotate(360deg);} }

/* Reliable button spinner using a class */
.button-loading { position: relative; padding-right: 36px; }
.button-loading::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinY .6s linear infinite;
}

/* Button Classes */
.button_primary {
  @apply bg-[var(--primary-color)] text-white py-2 px-4 rounded-md hover:bg-[var(--button-hover)] focus:outline-none;
}

.button_secondary {
  @apply bg-[#2C2C2C] text-white py-2 px-4 rounded-md hover:bg-gray-600 focus:outline-none;
}

.button_small {
  @apply py-1 px-3 text-sm rounded-md;
}

/* Export result styling */
#export-result {
  transition: all 0.3s ease;
}

#export-result .button_primary {
  transition: all 0.2s ease;
}

#export-result .button_primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Nice fade-in for validation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 200ms ease-out; }


/* Disable browser/Tailwind focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: inherit !important;
  background-color: inherit !important;
  color: inherit !important;
}

/* Remove click/active shade or border glow from all buttons site-wide */
button,
a.button_primary,
a.button_secondary,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}
button:active,
a.button_primary:active,
a.button_secondary:active,
[role="button"]:active,
button:focus,
a.button_primary:focus,
a.button_secondary:focus,
[role="button"]:focus,
button:focus-visible,
a.button_primary:focus-visible,
a.button_secondary:focus-visible,
[role="button"]:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  filter: none !important;
  border-color: inherit !important;
  -webkit-box-shadow: none !important;
}
/* Firefox inner focus padding */
button::-moz-focus-inner { border: 0; }
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="submit"]:-moz-focusring,
[role="button"]:-moz-focusring { outline: none; }

/* Remove native number spinners for quantity and cost inputs (we show + / -) */
input[type=number].no-spin::-webkit-outer-spin-button,
input[type=number].no-spin::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number].no-spin {
  -moz-appearance: textfield; /* Firefox */
}


/* Force themed backgrounds for selects/options and prevent UA light autofill */
.custom-input,
.custom-select,
input,
select,
textarea {
  background-color: var(--card-background) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
.custom-input:focus,
.custom-select:focus,
input:focus,
select:focus,
textarea:focus {
  background-color: var(--card-background) !important;
  color: var(--text-primary) !important;
}
select option { background-color: var(--card-background); color: var(--text-primary); }

/* Override background for fitting questions section */
#qc-fitting-questions select,
#qc-fitting-questions select:focus {
  background-color: var(--background-color) !important;
}
#qc-fitting-questions select option { background-color: var(--background-color); color: var(--text-primary); }
#qc-fitting-questions select:focus option { background-color: var(--background-color); color: var(--text-primary); }

/* Autofill overrides (WebKit/Blink) */
input:-webkit-autofill,
select:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text-primary) !important;
  caret-color: var(--text-primary) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--card-background) inset;
  box-shadow: 0 0 0px 1000px var(--card-background) inset;
}
input:-webkit-autofill:focus,
select:-webkit-autofill:focus,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--card-background) inset;
}
/* Autofill (Firefox) */
input:-moz-autofill,
select:-moz-autofill,
textarea:-moz-autofill {
  -moz-text-fill-color: var(--text-primary) !important;
  box-shadow: 0 0 0px 1000px var(--card-background) inset;
}

/* Products: widen price tier select to avoid icon overlap */
#price-tier-select { min-width: 150px; padding-right: 2rem; }

/* Ensure AG Grid paging panel sits at the bottom edge of the products section */
#products-grid.ag-theme-quartz {
  display: flex;
  flex-direction: column;
}
#products-grid.ag-theme-quartz .ag-root-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
#products-grid.ag-theme-quartz .ag-root-wrapper-body {
  flex: 1 1 auto;
}
#products-grid.ag-theme-quartz .ag-paging-panel {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background-color: var(--card-background);
}

/* Switch styling */
.switch {
  transition: background-color 0.2s ease;
}

.switch .dot {
  transition: transform 0.2s ease;
}

/* Image preview styling */
.image-preview-container {
  min-height: 4rem;
}

.image-preview-container img {
  transition: all 0.2s ease;
  cursor: move;
}

.image-preview-container img:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.image-preview-container .relative {
  transition: all 0.2s ease;
}

.image-preview-container .relative:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* News Show Carousel Styles */
.carousel-item {
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* Accordion slide animation */
.accordion-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 220ms ease, opacity 200ms ease;
}
.accordion-body.open { opacity: 1; }

.carousel-item.carousel-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

.carousel-item.carousel-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

#carousel-inner {
  position: relative;
  min-height: 400px;
  aspect-ratio: 16/9;
  width: 100%;
}

#carousel-inner .carousel-item {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

#carousel-inner .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#carousel-inner img {
  transition: transform 0.3s ease;
}

/* Disabled hover effect on carousel images */
/* #carousel-inner:hover img {
  transform: scale(1.02);
} */

/* Navigation buttons */
#prevBtn, #nextBtn {
  transition: background-color 0.2s ease;
  z-index: 10;
}

#prevBtn:hover, #nextBtn:hover {
  background-color: rgba(0, 0, 0, 0.7) !important;
}

/* Thumbnails */
#thumbnail-gallery img {
  transition: all 0.2s ease;
  cursor: pointer;
}

#thumbnail-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#thumbnail-gallery img.border-blue-500 {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Header nav active state */
.top-nav-link.active {
  color: var(--text-primary);
  border-bottom-color: transparent; /* keep layout without visible underline */
  transform: translateY(-2px);
}


#products-grid-wrap { position: relative; contain: content; }
#products-spinner { display: none; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); will-change: opacity; }
#products-spinner.htmx-request { display: flex; }
#products-spinner.htmx-request .htmx-indicator { display: inline-block !important; }

/* Quote Create grid overlay spinner */
#qc-spinner { display: none; }
#qc-spinner.htmx-request { display: flex; }
#qc-spinner.htmx-request .htmx-indicator { display: inline-block !important; }


/* Global under-nav progress bar */
#global-progress {
  position: fixed;
  top: 56px; /* aligned just under header (header is sticky too) */
  z-index: 60;
  height: 1px; /* ultra-thin for seamless look */
  width: 100%;
  left: 0;
  right: 0;
  overflow: hidden; /* prevent horizontal scrollbars during animation */
  /* rail color: slightly darker than background (no brand color) */
  background: color-mix(in oklab, var(--background-color) 30%, gray 70%);
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0);
  transition: opacity .32s ease;
}
#global-progress.show { opacity: 1; }
#global-progress::before {
  content: "";
  display: block;
  height: 100%;
  width: 15%; /* reduced from 20% for more compact bar */
  /* moving chunk: clearly darker than background */
  background: rgba(0,0,0,.28);
  background: color-mix(in oklab, var(--background-color) 75%, black 25%);
  filter: drop-shadow(0 0 2px rgba(0,0,0,.2));
  animation: gp-slide 1.2s linear infinite; /* faster animation: 0.8s instead of 1.2s, linear instead of cubic-bezier */
}
#global-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.1), transparent); /* darker shimmer */
}



/* Active dealer row highlight */
.dealer-row.active-row { border-bottom-color: rgba(255,255,255,0.30); }
@keyframes gp-slide { from { transform: translateX(-25vw);} to { transform: translateX(100vw);} }

/* Toggle control (used in Dealer Fitting Settings) */
.toggle-bg {
  position: relative;
  background-color: var(--accent-color);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  transition: background-color .2s ease;
}
.toggle-bg::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: var(--text-secondary);
  transition: transform .2s ease, background-color .2s ease;
}
.peer:checked + .toggle-bg {
  background-color: var(--primary-color);
}
.peer:checked + .toggle-bg::after {
  transform: translateX(20px);
  background: #fff;
}



  /* Apply black background only within products page scope */
  /* Removed global #main override to avoid affecting all pages */
  /* AG Grid Quartz theme overrides to match product table look & feel */
  #products-grid.ag-theme-quartz {
    --ag-foreground-color: var(--text-primary);
    --ag-secondary-foreground-color: var(--text-secondary);
    --ag-background-color: var(--card-background) !important;
    --ag-header-background-color: var(--card-background) !important;
    --ag-header-foreground-color: var(--text-secondary);
    --ag-border-color: var(--border-color);
    --ag-row-border-color: var(--border-color);
    --ag-row-hover-color: rgba(59,130,246,0.15);
    --ag-font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --ag-font-size: 14px;
    --ag-row-height: 164px;
    --ag-header-height: 52px;

  }
  /* New Quote grid adopts same theme values */
  #qc-grid.ag-theme-quartz {
    --ag-foreground-color: var(--p-text-primary);
    --ag-secondary-foreground-color: var(--p-text-secondary);
    --ag-background-color: var(--card-background) !important;
    --ag-header-background-color: var(--card-background) !important;
    --ag-header-foreground-color: var(--p-text-secondary);
    --ag-border-color: var(--p-border-color);
    --ag-row-border-color: var(--p-border-color);
    --ag-row-hover-color: rgba(59,130,246,0.15);
    --ag-font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --ag-font-size: 14px;
    --ag-row-height: 74px;
    --ag-header-height: 52px;
  }
  /* Bulk Price Update grid adopts same theme values as products grid */
  #bulk-price-grid.ag-theme-quartz {
    --ag-foreground-color: var(--text-primary);
    --ag-secondary-foreground-color: var(--text-secondary);
    --ag-background-color: var(--card-background) !important;
    --ag-header-background-color: var(--card-background) !important;
    --ag-header-foreground-color: var(--text-secondary);
    --ag-border-color: var(--border-color);
    --ag-row-border-color: var(--border-color);
    --ag-row-hover-color: rgba(59,130,246,0.15);
    --ag-font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --ag-font-size: 14px;
    --ag-row-height: 74px;
    --ag-header-height: 52px;
  }

  /* Ensure all grid viewports and wrappers have a dark background */
  #products-grid.ag-theme-quartz .ag-center-cols-viewport,
  #products-grid.ag-theme-quartz .ag-left-cols-viewport,
  #products-grid.ag-theme-quartz .ag-right-cols-viewport,
  #products-grid.ag-theme-quartz .ag-root-wrapper,
  #products-grid.ag-theme-quartz .ag-root-wrapper-body {
    background-color: var(--card-background) !important;
  }

  #qc-grid.ag-theme-quartz .ag-center-cols-viewport,
  #qc-grid.ag-theme-quartz .ag-left-cols-viewport,
  #qc-grid.ag-theme-quartz .ag-right-cols-viewport,
  #qc-grid.ag-theme-quartz .ag-root-wrapper,
  #qc-grid.ag-theme-quartz .ag-root-wrapper-body {
    background-color: var(--p-surface-color) !important;
  }

  #bulk-price-grid.ag-theme-quartz .ag-center-cols-viewport,
  #bulk-price-grid.ag-theme-quartz .ag-left-cols-viewport,
  #bulk-price-grid.ag-theme-quartz .ag-right-cols-viewport,
  #bulk-price-grid.ag-theme-quartz .ag-root-wrapper,
  #bulk-price-grid.ag-theme-quartz .ag-root-wrapper-body {
    background-color: var(--card-background) !important;
  }
.modal-background {
  background-color:#f8f9fa !important;
}
.modal-text{
  color: #333333 !important;
}


  #products-grid.ag-theme-quartz .ag-cell, .tw-ag-cell { padding-top: 16px; padding-bottom: 16px; }
  #products-grid.ag-theme-quartz .ag-header-cell-label, .tw-ag-header .ag-header-cell-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    font-size: 0.875rem; /* 14px */
  }
  /* No outer border on entire table wrapper */
  #products-grid.ag-theme-quartz .ag-root-wrapper { border: none; border-radius: 0; overflow: visible; }
  /* Header border to match table head background separation */
  #products-grid.ag-theme-quartz .ag-header-viewport,
  #products-grid.ag-theme-quartz .ag-header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-color) !important;
    min-height: 52px !important;
    height: 52px !important;
  }
  /* Bulk price grid header and cell styling */
  #bulk-price-grid.ag-theme-quartz .ag-cell, #bulk-price-grid.ag-theme-quartz .tw-ag-cell { padding-top: 16px; padding-bottom: 16px; }
  #bulk-price-grid.ag-theme-quartz .ag-header-cell-label, #bulk-price-grid.ag-theme-quartz .tw-ag-header .ag-header-cell-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    font-size: 0.875rem; /* 14px */
  }
  #bulk-price-grid.ag-theme-quartz .ag-root-wrapper { border: none; border-radius: 0; overflow: visible; }
  #bulk-price-grid.ag-theme-quartz .ag-header-viewport,
  #bulk-price-grid.ag-theme-quartz .ag-header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-color) !important;
    min-height: 52px !important;
    height: 52px !important;
  }
  /* Ensure body rows and cells are vertically centered consistently */
  #products-grid.ag-theme-quartz .ag-center-cols-container .ag-row {
    display: flex;
    align-items: center;
  }
  #products-grid.ag-theme-quartz .ag-cell {
    display: flex;
    align-items: center;
  }
  #products-grid.ag-theme-quartz .ag-cell-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
  }
  /* Bulk price grid row and cell alignment */
  #bulk-price-grid.ag-theme-quartz .ag-center-cols-container .ag-row {
    display: flex;
    align-items: center;
  }
  #bulk-price-grid.ag-theme-quartz .ag-cell {
    display: flex;
    align-items: center;
  }
  #bulk-price-grid.ag-theme-quartz .ag-cell-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
  }
  #qc-grid.ag-theme-quartz .ag-header-viewport,
  #qc-grid.ag-theme-quartz .ag-header {
    border-bottom: 1px solid var(--p-border-color);
    background-color: rgb(31 41 55) !important;
    min-height: 50px !important;
    height: 50px !important;
  }
  /* Force quotes dealer dropdown theme */
  #qc-dealer-dd { background-color: var(--background-color) !important; }
  #qc-dealer-dd * { color: var(--text-primary) !important; }
  /* Ensure QC grid rows and cells are vertically centered consistently */
  #qc-grid.ag-theme-quartz .ag-center-cols-container .ag-row {
    display: flex;
    align-items: center !important;
  }
  #qc-grid.ag-theme-quartz .ag-cell,
  #qc-grid.ag-theme-quartz .ag-cell-wrapper,
  #qc-grid.ag-theme-quartz .ag-cell-value {
    display: flex;
    align-items: center !important;
    height: 100%;
  }

  /* Header text color, weight, and vertical centering */
  #products-grid.ag-theme-quartz .ag-header-cell,
  #products-grid.ag-theme-quartz .ag-header-cell-label, .ag-icon-filter {
    color: #9ca3af !important; /* requested font color */
    font-weight: 600 !important; /* semibold */
  }
  /* Ensure header label content is vertically centered at all times (including HTMX swaps) */
  #products-grid.ag-theme-quartz .ag-header-cell-label {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
  }
  #products-grid.ag-theme-quartz .ag-header-cell-text { align-self: center !important; }
  /* Bulk price grid header styling */
  #bulk-price-grid.ag-theme-quartz .ag-header-cell,
  #bulk-price-grid.ag-theme-quartz .ag-header-cell-label, #bulk-price-grid.ag-theme-quartz .ag-icon-filter {
    color: #9ca3af !important;
    font-weight: 600 !important;
  }
  #bulk-price-grid.ag-theme-quartz .ag-header-cell-label {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
  }
  #bulk-price-grid.ag-theme-quartz .ag-header-cell-text { align-self: center !important; }
  #bulk-price-grid.ag-theme-quartz .ag-header-cell {
    display: flex;
    align-items: center;
  }
  #qc-grid.ag-theme-quartz .ag-header-cell,
  #qc-grid.ag-theme-quartz .ag-header-cell-label, .ag-icon-filter {
    color: #9ca3af !important;
    font-weight: 600 !important;
  }
  #qc-grid.ag-theme-quartz .ag-header-cell-label {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
  }
  #qc-grid.ag-theme-quartz .ag-header-cell-text { align-self: center !important; }
  #qc-grid.ag-theme-quartz .ag-header-cell {
    display: flex;
    align-items: center;
    height: 50px !important;
  }
  #products-grid.ag-theme-quartz .ag-header-cell {
    display: flex;
    align-items: center; /* vertical align */
  }
  /* Remove intense focus outlines inside cells */
  #products-grid.ag-theme-quartz .ag-cell:focus-within {
    outline: none;
  }
  #bulk-price-grid.ag-theme-quartz .ag-cell:focus-within {
    outline: none;
  }

  /* Only row dividers top/bottom with product border color */
  #products-grid.ag-theme-quartz .ag-center-cols-container .ag-row {
    border-bottom: 1px solid var(--p-border-color);
  }
  #products-grid.ag-theme-quartz .ag-center-cols-container .ag-row:first-child {
    border-top: 1px solid var(--p-border-color);
  }
  #qc-grid.ag-theme-quartz .ag-center-cols-container .ag-row { border-bottom: 1px solid var(--p-border-color); }
  #qc-grid.ag-theme-quartz .ag-center-cols-container .ag-row:first-child { border-top: 1px solid var(--p-border-color); }
  #bulk-price-grid.ag-theme-quartz .ag-center-cols-container .ag-row { border-bottom: 1px solid var(--border-color); }
  #bulk-price-grid.ag-theme-quartz .ag-center-cols-container .ag-row:first-child { border-top: 1px solid var(--border-color); }

#products-grid.ag-theme-quartz .ag-status-bar,
#products-grid.ag-theme-quartz .ag-paging-panel,
#products-grid.ag-theme-quartz .ag-paging-panel *,
#products-grid.ag-theme-quartz .ag-status-bar * {
  color: var(--text-primary);
}
 #qc-grid.ag-theme-quartz .ag-status-bar,
 #qc-grid.ag-theme-quartz .ag-paging-panel,
 #qc-grid.ag-theme-quartz .ag-paging-panel *,
 #qc-grid.ag-theme-quartz .ag-status-bar * { color: var(--p-text-primary); }
 #bulk-price-grid.ag-theme-quartz .ag-status-bar,
 #bulk-price-grid.ag-theme-quartz .ag-paging-panel,
 #bulk-price-grid.ag-theme-quartz .ag-paging-panel *,
 #bulk-price-grid.ag-theme-quartz .ag-status-bar * { color: var(--text-primary); }


/* Paging panel spacing and inputs */
#products-grid.ag-theme-quartz .ag-paging-panel { margin-top: 10px; gap: 8px; }
#products-grid.ag-theme-quartz .ag-paging-panel .ag-picker-field-wrapper,
#products-grid.ag-theme-quartz .ag-paging-panel input,
#products-grid.ag-theme-quartz .ag-paging-panel select {
  background-color: var(--card-background) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px;
  padding: 4px 8px;
}
 #qc-grid.ag-theme-quartz .ag-paging-panel { margin-top: 10px; gap: 8px; }
 #qc-grid.ag-theme-quartz .ag-paging-panel .ag-picker-field-wrapper,
 #qc-grid.ag-theme-quartz .ag-paging-panel input,
 #qc-grid.ag-theme-quartz .ag-paging-panel select {
   background-color: var(--p-surface-color) !important;
   color: #ffffff !important;
   border: 1px solid var(--p-border-color) !important;
   border-radius: 6px;
   padding: 4px 8px;
 }
 #bulk-price-grid.ag-theme-quartz .ag-paging-panel { margin-top: 10px; gap: 8px; }
 #bulk-price-grid.ag-theme-quartz .ag-paging-panel .ag-picker-field-wrapper,
 #bulk-price-grid.ag-theme-quartz .ag-paging-panel input,
 #bulk-price-grid.ag-theme-quartz .ag-paging-panel select {
   background-color: var(--card-background) !important;
   color: var(--text-primary) !important;
   border: 1px solid var(--border-color) !important;
   border-radius: 6px;
   padding: 4px 8px;
 }

/* Selection: keep row visuals unchanged */
#products-grid.ag-theme-quartz .ag-row.ag-row-selected,
#products-grid.ag-theme-quartz .ag-row.ag-row-selected:hover,
#products-grid.ag-theme-quartz .ag-row.ag-row-selected .ag-cell,
#products-grid.ag-theme-quartz .ag-row.ag-row-selected .ag-cell:hover {
  background-color: var(--background-color) !important;
}
 #qc-grid.ag-theme-quartz .ag-row.ag-row-selected,
 #qc-grid.ag-theme-quartz .ag-row.ag-row-selected:hover,
 #qc-grid.ag-theme-quartz .ag-row.ag-row-selected .ag-cell,
 #qc-grid.ag-theme-quartz .ag-row.ag-row-selected .ag-cell:hover { background-color: var(--background-color) !important; }



/* Make AG-Grid checkboxes bigger */
#products-grid.ag-theme-quartz .ag-selection-checkbox .ag-checkbox,
#products-grid.ag-theme-quartz .ag-header-select-all .ag-checkbox {
  width: 1.25rem !important; /* 20px - slightly bigger than default */
  height: 1.25rem !important; /* 20px - slightly bigger than default */
}

/* Add padding-left to checkbox column body cells (not header) */
#products-grid.ag-theme-quartz .checkbox-cell-padding {
  padding-left: 5px !important;
}

/* Alternative selectors for ag-grid checkbox cells */
#products-grid.ag-theme-quartz .ag-cell.checkbox-cell-padding {
  padding-left: 5px !important;
}

#products-grid.ag-theme-quartz .ag-cell.checkbox-cell-padding .ag-selection-checkbox {
  padding-left: 5px !important;
}

/* Target the actual checkbox input within the cell */
#products-grid.ag-theme-quartz .ag-cell.checkbox-cell-padding input[type="checkbox"] {
  /* margin-left removed - using cell padding instead */
}

/* Try targeting all checkbox cells in the first column */
#products-grid.ag-theme-quartz .ag-pinned-left-cols-container .ag-cell {
  padding-left: 10px !important;
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

/* More specific targeting for checkbox cells */
#products-grid.ag-theme-quartz .ag-pinned-left-cols-container .ag-row .ag-cell:first-child {
  padding-left: 5px !important;
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

/* Target the checkbox wrapper specifically */
#products-grid.ag-theme-quartz .ag-pinned-left-cols-container .ag-cell .ag-selection-checkbox {
  margin-left: 10px !important;
}

.ag-pinned-left-header .ag-input-field-input {
  width: 15px !important;
  height: 15px !important;
  border-radius: 0.25rem;
  border: 1px solid var(--p-border-color);
  background-color: rgba(55,65,81,1); /* gray-700 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: none;
}
.ag-pinned-left-header{
  padding-left: 8px !important;
}
.ag-pinned-left-cols-container .ag-row{
  border-bottom: 1px solid var(--p-border-color);
}
.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within) {
  border-right: 0 !important;
}
.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right):not(.ag-cell-range-single-cell) {
  border-right: 0 !important;
}
.ag-pinned-left-header{
  border-right: 0 !important;
}
#products-grid.ag-theme-quartz .ag-paging-panel {
  border: 0 !important;
}
 #qc-grid.ag-theme-quartz .ag-paging-panel { border: 0 !important; }
 #bulk-price-grid.ag-theme-quartz .ag-paging-panel { border: 0 !important; }

/* Removed quotes page light overrides so it inherits dark theme tokens */
.ag-root-wrapper{
  border: 0 !important;
}

.ag-checkbox .ag-input-wrapper, .ag-radio-button .ag-input-wrapper {
  overflow: visible;
  width: 14px;
  height: 14px;
}
/* Add padding-left to checkbox column body cells (not header) */
#products-grid.ag-theme-quartz .checkbox-cell-padding {
  padding-left: 5px !important;
}

/* Additional ag-grid background overrides to ensure proper theming */
#products-grid.ag-theme-quartz .ag-root-wrapper,
#products-grid.ag-theme-quartz .ag-root-wrapper-body,
#products-grid.ag-theme-quartz .ag-center-cols-viewport,
#products-grid.ag-theme-quartz .ag-left-cols-viewport,
#products-grid.ag-theme-quartz .ag-right-cols-viewport,
#products-grid.ag-theme-quartz .ag-body-viewport,
#products-grid.ag-theme-quartz .ag-center-cols-container,
#products-grid.ag-theme-quartz .ag-body-horizontal-scroll-viewport,
#products-grid.ag-theme-quartz .ag-body-horizontal-scroll-container {
  background-color: var(--card-background) !important;
}

#qc-grid.ag-theme-quartz .ag-root-wrapper,
#qc-grid.ag-theme-quartz .ag-root-wrapper-body,
#qc-grid.ag-theme-quartz .ag-center-cols-viewport,
#qc-grid.ag-theme-quartz .ag-left-cols-viewport,
#qc-grid.ag-theme-quartz .ag-right-cols-viewport,
#qc-grid.ag-theme-quartz .ag-body-viewport,
#qc-grid.ag-theme-quartz .ag-center-cols-container,
#qc-grid.ag-theme-quartz .ag-body-horizontal-scroll-viewport,
#qc-grid.ag-theme-quartz .ag-body-horizontal-scroll-container {
  background-color: var(--card-background) !important;
}

#bulk-price-grid.ag-theme-quartz .ag-root-wrapper,
#bulk-price-grid.ag-theme-quartz .ag-root-wrapper-body,
#bulk-price-grid.ag-theme-quartz .ag-center-cols-viewport,
#bulk-price-grid.ag-theme-quartz .ag-left-cols-viewport,
#bulk-price-grid.ag-theme-quartz .ag-right-cols-viewport,
#bulk-price-grid.ag-theme-quartz .ag-body-viewport,
#bulk-price-grid.ag-theme-quartz .ag-center-cols-container,
#bulk-price-grid.ag-theme-quartz .ag-body-horizontal-scroll-viewport,
#bulk-price-grid.ag-theme-quartz .ag-body-horizontal-scroll-container {
  background-color: var(--card-background) !important;
}

/* Ensure grid cells have proper background */
#products-grid.ag-theme-quartz .ag-row,
#products-grid.ag-theme-quartz .ag-cell,
#products-grid.ag-theme-quartz .ag-cell-wrapper {
  background-color: var(--card-background) !important;
  color: var(--text-primary) !important;
}

#qc-grid.ag-theme-quartz .ag-row,
#qc-grid.ag-theme-quartz .ag-cell,
#qc-grid.ag-theme-quartz .ag-cell-wrapper {
  background-color: var(--card-background) !important;
  color: var(--p-text-primary) !important;
}

#bulk-price-grid.ag-theme-quartz .ag-row,
#bulk-price-grid.ag-theme-quartz .ag-cell,
#bulk-price-grid.ag-theme-quartz .ag-cell-wrapper {
  background-color: var(--card-background) !important;
  color: var(--text-primary) !important;
}