/* WQDetector custom styles */

/* ── Feature chips ── */
.feature-chip {
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  text-align: center;
  border: 1px solid transparent;
}

/* Unselected = red tint */
.feature-chip {
  background: rgba(69, 10, 10, 0.6);
  border-color: rgba(153, 27, 27, 0.5);
  color: rgba(252, 165, 165, 0.8);
}

/* Selected = green tint */
.feature-chip.selected {
  background: rgba(6, 78, 59, 0.7);
  border-color: rgba(16, 185, 129, 0.6);
  color: #6ee7b7;
}

/* Hover */
.feature-chip:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

/* ── Feature group headings ── */
.feature-group-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 0.25rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.25);
}

/* ── Result cards ── */
.result-card {
  background: rgba(30, 41, 59, 0.7);
  border-radius: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.4);
  transition: all 0.15s ease;
  min-width: 0;
  overflow: hidden;
  word-break: break-word;
}
.result-card > * + * { margin-top: 0.5rem; }
.result-card.pass  { border-left: 3px solid #10b981; }
.result-card.fail  { border-left: 3px solid #f43f5e; }
.result-card.info  { border-left: 3px solid #0ea5e9; }
.result-card.error { border-left: 3px solid #f59e0b; }

/* ── Timing cards ── */
.timing-card {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 0.5rem;
  padding: 0.75rem;
  text-align: center;
  border: 1px solid rgba(51, 65, 85, 0.3);
}
.timing-card .value { font-size: 1.25rem; font-weight: 700; color: #f1f5f9; }
.timing-card .label { font-size: 0.6875rem; color: #64748b; margin-top: 0.125rem; }

/* ── Threshold slider ── */
.threshold-row label { font-size: 0.875rem; color: #cbd5e1; }
.threshold-row input[type=range] { width: 100%; accent-color: #6366f1; }
.threshold-row .val { font-size: 0.75rem; color: #64748b; font-family: monospace; }

/* ── Preview thumbnails ── */
.preview-thumb {
  width: 4rem; height: 4rem;
  border-radius: 0.5rem;
  object-fit: cover;
  border: 2px solid #334155;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.preview-thumb:hover { border-color: #818cf8; }
.preview-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.preview-item .name {
  font-size: 0.625rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 68px;
  text-align: center;
}
.preview-item .remove-btn {
  position: absolute;
  top: -0.375rem;
  right: -0.375rem;
  width: 1rem; height: 1rem;
  border-radius: 9999px;
  background: #e11d48;
  color: white;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
}
.preview-item .remove-btn:hover { background: #f43f5e; }

/* ── Image picker thumbnails ── */
.picker-thumb {
  width: 5rem; height: 5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  border: 2px solid #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}
.picker-thumb:hover { border-color: #818cf8; transform: translateY(-1px); }
.picker-thumb.active { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.4); }
.picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}
.picker-item .name {
  font-size: 0.625rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80px;
  text-align: center;
}
.picker-item.active .name { color: #a5b4fc; }
