/**
 * Listing search/filter controls — loaded after Tailwind CDN.
 * Tailwind preflight removes default borders on inputs; these classes restore visible edges.
 * (Mirrors the working rules from assets/css/style.css without @apply.)
 */

.webnut-search-input {
  border: 2px solid #dbe4f0 !important;
  border-radius: 0.875rem !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 18px -12px rgba(37, 99, 235, 0.45);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.webnut-search-input::placeholder {
  color: #64748b;
}

.webnut-search-input:hover {
  border-color: #bfdbfe !important;
}

.webnut-search-input:focus,
.webnut-search-input:focus-visible {
  outline: none;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), 0 14px 30px -18px rgba(37, 99, 235, 0.65);
  background: #fff;
}

.webnut-filter-input {
  border: 2px solid #e2e8f0 !important;
  border-radius: 0.75rem !important;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.webnut-filter-input:hover {
  border-color: #bfdbfe !important;
}

.webnut-filter-input:focus,
.webnut-filter-input:focus-visible {
  outline: none;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

/* Projects listing: grid stacking for multiselect columns vs budget/date fields */
#projects-filter-form .grid > div {
  position: relative;
  z-index: 0;
}
#projects-filter-form .grid > div[data-webnut-cauta-root] {
  z-index: 30;
}
#projects-filter-form .webnut-filter-input {
  position: relative;
  z-index: 0;
}

#projects-filter-location-btn-panel,
#projects-filter-category-btn-panel,
#projects-filter-service-btn-panel {
  z-index: 110000 !important;
}

#gantt-view-container {
  z-index: 0;
  isolation: isolate;
}

/* Horizontal scroll only — avoids trapping vertical sticky; axis sticks under header / fixed filters */
#gantt-view-container .gantt-chart-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/*
 * Gantt date axis: in-flow by default; when scrolled, JS pins it with position:fixed (same behaviour
 * as the minimised filter bar). CSS `position:sticky` does not follow the viewport here because an
 * ancestor has overflow-x:auto (.gantt-chart-scroll).
 */
#gantt-chart .gantt-axis-sentinel {
  height: 1px;
  margin-top: -1px;
  width: 100%;
}

#gantt-chart .gantt-sticky-axis {
  position: relative;
  z-index: 10;
  background: #fff;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 6px 10px -8px rgba(15, 23, 42, 0.12);
}

#gantt-chart .gantt-sticky-axis-inner {
  min-width: 800px;
  width: 100%;
}

#gantt-chart .gantt-sticky-axis.gantt-sticky-axis--docked {
  position: fixed;
  z-index: 65;
  margin-bottom: 0;
  overflow: hidden;
  box-shadow: 0 8px 16px -10px rgba(15, 23, 42, 0.2);
}


/*
 * Projects Gantt: timeline + in-row guides use 7 equal columns (same % scale as bars).
 * tailwind-built.css often omits `grid-cols-7` (purge), which collapses to one column —
 * labels stack vertically and guide stripes break bar layout.
 */
#gantt-chart .gantt-seven-cols {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
}

/* Gantt listing: colored segments fill the track height; tiny % widths still read as a bar */
#gantt-chart .gantt-bar-fill {
  top: 0;
  bottom: 0;
  min-width: 6px;
  border-radius: 0.125rem;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.14);
}

#gantt-chart .gantt-track-shell {
  background-color: #e5e7eb;
}
