/* Copyright 2025 Renofy Ltd. All rights reserved. */
/* ===== SKILL TAGS ===== */
/* Centralized skill tag system for consistent styling across components */

/* Base skill tag class - Modern rounded pill style */
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border-radius: 9999px;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-fast);
}

@media (min-width: 821px) {
  .skill-tag {
    font-size: var(--font-size-sm);
  }
}

/* Interactive skill tags (for selectors/forms) */
.skill-tag--interactive,
.selected-skills .skill-tag {
  background: linear-gradient(135deg, var(--color-primary, #3b82f6) 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: 1.25rem;
  padding: 0.375rem 0.75rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  user-select: none;
  font-size: 0.875rem;
}

.skill-tag--interactive:hover,
.selected-skills .skill-tag:hover {
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

/* Remove button for interactive tags */
.skill-tag .remove-skill {
  background-color: var(--color-bg-light);
  border: none;
  color: var(--color-blue);
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1;
  padding: 0;
  margin: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color var(--transition-fast);
  margin-left: 0.25rem;
}

.skill-tag .remove-skill:hover {
  background-color: rgba(255, 255, 255, 0.3);
  color: var(--color-white);
}

.skill-tag .skill-name {
  font-weight: var(--font-weight-medium, 500);
}

/* Container for skill tags */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* No skills message */
.no-skills-message {
  color: var(--color-text-secondary);
  font-style: italic;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  min-height: 1.5rem;
  width: 100%;
}

/* ===== REGULATED SKILL INDICATOR ===== */
/* Icon button with tooltip for regulated skills */

.skill-tag__regulated {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.125rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: help;
  position: relative;
}

.skill-tag__regulated:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  border-radius: 2px;
}

.skill-tag__regulated-icon {
  width: 0.875rem;
  height: 0.875rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Tooltip container */
.skill-tag__regulated-tooltip {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text-primary);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-base);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
  max-width: 200px;
  white-space: normal;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  z-index: 10;
  pointer-events: none;
}

/* Tooltip arrow */
.skill-tag__regulated-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 0.375rem solid transparent;
  border-top-color: var(--color-text-primary);
}

/* Show tooltip on hover (desktop) and focus (mobile tap) */
.skill-tag__regulated:hover .skill-tag__regulated-tooltip,
.skill-tag__regulated:focus .skill-tag__regulated-tooltip {
  opacity: 1;
  visibility: visible;
}
