@import url('/shared/css/artist-portal.css');
@import url('/shared/css/loading-overlay.css');

.production-filters {
  grid-template-columns: 2fr minmax(220px, 280px) auto;
  align-items: end;
}

.production-stat--inprod .portal-stat__value {
  color: #0369a1;
}

.production-stat--prepress .portal-stat__value {
  color: #6d28d9;
}

.production-stat--printing .portal-stat__value {
  color: #0f766e;
}

.production-portal-table__qty {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.production-portal-table__qty--head {
  font-weight: 600;
}

.portal-table thead th {
  vertical-align: middle;
}

.portal-table__filter-head {
  position: relative;
  z-index: 8;
}

.portal-table__filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  width: 100%;
}

.portal-table__filter-trigger {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.portal-table__filter-trigger svg {
  width: 18px;
  height: 18px;
}

.portal-table__filter-trigger:hover,
.portal-table__filter-trigger[aria-expanded="true"] {
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.portal-table__filter-popover {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  z-index: 80;
  width: min(320px, calc(100vw - 64px));
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(12px);
}

.portal-table__filter-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-strong);
  margin-bottom: 14px;
}

.portal-table__filter-options {
  display: grid;
  gap: 12px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.portal-table__filter-option {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-table__filter-option input {
  width: 18px;
  height: 18px;
}

.portal-table__filter-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.portal-table__sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  padding: 0;
  min-height: 36px;
  width: 100%;
}

.portal-table__sort-icon {
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
}

.portal-table__sort-button.is-active .portal-table__sort-icon {
  color: #2563eb;
}

@media (max-width: 900px) {
  .production-filters {
    grid-template-columns: 1fr;
  }

  .portal-table__filter-popover {
    left: auto;
    right: 0;
  }
}
