/* ================================
   MODERN CHIP BASE STYLES
   ================================ */
.chip {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px; /* More modern rounded corners */
  border: none; /* Remove border for cleaner look */
  margin: 4px 0;
  text-transform: none; /* Modern designs avoid all-caps */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Modern easing curve */
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(10px); /* Glass morphism effect */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 
              0 1px 3px rgba(0, 0, 0, 0.06); /* Subtle depth */
}

/* Modern hover with subtle lift */
.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 
              0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Hide checkbox */
.chip-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Modern selected state */
.chip.is-selected,
.chip:has(.chip-input:checked) {
  font-weight: 600;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 
              0 3px 8px rgba(0, 0, 0, 0.1);
}

.chip.is-selected .chip-text,
.chip:has(.chip-input:checked) .chip-text {
  color: #ffffff !important;
}

/* ================================
   INDUSTRY SPECIFIC COLOR PALETTE
   ================================ */

/* Accounting & Finance - Modern Orange */
.chip.chip-accounting-and-finance {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: #ffffff;
}
.chip.chip-accounting-and-finance:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fff1eb 0%, #ffeee6 100%);
  color: #e55a2b;
}

/* Agriculture - Modern Green */
.chip.chip-agriculture-farming {
  background: linear-gradient(135deg, #00d4aa 0%, #01a085 100%);
  color: #ffffff;
}
.chip.chip-agriculture-farming:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #e6faf7 0%, #d1f2ec 100%);
  color: #008f75;
}

/* Arts - Modern Pink/Purple */
.chip.chip-arts-creative {
  background: linear-gradient(135deg, #ff4081 0%, #e91e63 100%);
  color: #ffffff;
}
.chip.chip-arts-creative:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
  color: #c2185b;
}

/* Construction - Modern Purple */
.chip.chip-construction-property {
  background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
  color: #ffffff;
}
.chip.chip-construction-property:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  color: #7b1fa2;
}

/* Education - Modern Blue */
.chip.chip-education-training {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  color: #ffffff;
}
.chip.chip-education-training:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
}

/* Energy - Modern Teal */
.chip.chip-energy-environment {
  background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
  color: #ffffff;
}
.chip.chip-energy-environment:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
  color: #00796b;
}

/* Engineering - Modern Dark Blue */
.chip.chip-engineering-manufacturing {
  background: linear-gradient(135deg, #37474f 0%, #263238 100%);
  color: #ffffff;
}
.chip.chip-engineering-manufacturing:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #eceff1 0%, #cfd8dc 100%);
  color: #455a64;
}

/* Government - Modern Amber */
.chip.chip-government-public-services {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: #ffffff;
}
.chip.chip-government-public-services:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
}

/* HR - Modern Lavender */
.chip.chip-hr-recruitment {
  background: linear-gradient(135deg, #ba68c8 0%, #9c27b0 100%);
  color: #ffffff;
}
.chip.chip-hr-recruitment:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  color: #8e24aa;
}

/* Healthcare - Modern Red */
.chip.chip-healthcare-medical {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: #ffffff;
}
.chip.chip-healthcare-medical:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #c62828;
}

/* Hospitality - Modern Gold */
.chip.chip-hospitality-tourism {
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  color: #ffffff;
}
.chip.chip-hospitality-tourism:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%);
  color: #f57f17;
}

/* Insurance - Modern Navy */
.chip.chip-insurance {
  background: linear-gradient(135deg, #3f51b5 0%, #303f9f 100%);
  color: #ffffff;
}
.chip.chip-insurance:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
  color: #3949ab;
}

/* Legal - Modern Charcoal */
.chip.chip-legal-compliance {
  background: linear-gradient(135deg, #424242 0%, #212121 100%);
  color: #ffffff;
}
.chip.chip-legal-compliance:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  color: #616161;
}

/* Marketing - Modern Magenta */
.chip.chip-marketing-advertising-digital {
  background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%);
  color: #ffffff;
}
.chip.chip-marketing-advertising-digital:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
  color: #c2185b;
}

/* Media - Modern Violet */
.chip.chip-media-entertainment {
  background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
  color: #ffffff;
}
.chip.chip-media-entertainment:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  color: #8e24aa;
}

/* Retail - Modern Emerald */
.chip.chip-retail-e-commerce {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  color: #ffffff;
}
.chip.chip-retail-e-commerce:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  color: #2e7d32;
}

/* Sales - Modern Sky Blue */
.chip.chip-sales-customer-service {
  background: linear-gradient(135deg, #03a9f4 0%, #0288d1 100%);
  color: #ffffff;
}
.chip.chip-sales-customer-service:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
  color: #0277bd;
}

/* Science - Modern Purple */
.chip.chip-science-research {
  background: linear-gradient(135deg, #673ab7 0%, #512da8 100%);
  color: #ffffff;
}
.chip.chip-science-research:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #ede7f6 0%, #d1c4e9 100%);
  color: #5e35b1;
}

/* Technology - Modern Lime */
.chip.chip-technology-it {
  background: linear-gradient(135deg, #8bc34a 0%, #689f38 100%);
  color: #ffffff;
}
.chip.chip-technology-it:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
  color: #558b2f;
}

/* Telecom - Modern Cyan */
.chip.chip-telecommunication {
  background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
  color: #ffffff;
}
.chip.chip-telecommunication:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
  color: #00796b;
}

/* Transport - Modern Orange */
.chip.chip-transport-logistics {
  background: linear-gradient(135deg, #ff5722 0%, #d84315 100%);
  color: #ffffff;
}
.chip.chip-transport-logistics:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fbe9e7 0%, #ffccbc 100%);
  color: #bf360c;
}

/* ================================
   SUB-INDUSTRY COLOR INHERITANCE
   ================================ */

/* Sub-industry chips inherit parent industry colors through data attributes */

/* Accounting & Finance Sub-Industries */
.chip[data-parent-industry="accounting-and-finance"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fff8f3 0%, #ffeee6 100%);
  color: #cc4a1f;
  opacity: 0.9;
}

.chip[data-parent-industry="accounting-and-finance"].is-selected,
.chip[data-parent-industry="accounting-and-finance"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: #ffffff !important;
}

/* Agriculture Sub-Industries */
.chip[data-parent-industry="agriculture-farming"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f0fdf9 0%, #d1f2ec 100%);
  color: #065f46;
  opacity: 0.9;
}

.chip[data-parent-industry="agriculture-farming"].is-selected,
.chip[data-parent-industry="agriculture-farming"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #00d4aa 0%, #01a085 100%);
  color: #ffffff !important;
}

/* Arts Sub-Industries */
.chip[data-parent-industry="arts-creative"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fdf2f8 0%, #f8bbd9 100%);
  color: #be185d;
  opacity: 0.9;
}

.chip[data-parent-industry="arts-creative"].is-selected,
.chip[data-parent-industry="arts-creative"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #ff4081 0%, #e91e63 100%);
  color: #ffffff !important;
}

/* Construction Sub-Industries */
.chip[data-parent-industry="construction-property"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #faf5ff 0%, #e1bee7 100%);
  color: #7c2d92;
  opacity: 0.9;
}

.chip[data-parent-industry="construction-property"].is-selected,
.chip[data-parent-industry="construction-property"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
  color: #ffffff !important;
}

/* Education Sub-Industries */
.chip[data-parent-industry="education-training"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f0f9ff 0%, #bbdefb 100%);
  color: #1e40af;
  opacity: 0.9;
}

.chip[data-parent-industry="education-training"].is-selected,
.chip[data-parent-industry="education-training"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  color: #ffffff !important;
}

/* Energy Sub-Industries */
.chip[data-parent-industry="energy-environment"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f0fdfa 0%, #b2dfdb 100%);
  color: #0f766e;
  opacity: 0.9;
}

.chip[data-parent-industry="energy-environment"].is-selected,
.chip[data-parent-industry="energy-environment"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
  color: #ffffff !important;
}

/* Engineering Sub-Industries */
.chip[data-parent-industry="engineering-manufacturing"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f8fafc 0%, #cfd8dc 100%);
  color: #374151;
  opacity: 0.9;
}

.chip[data-parent-industry="engineering-manufacturing"].is-selected,
.chip[data-parent-industry="engineering-manufacturing"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #37474f 0%, #263238 100%);
  color: #ffffff !important;
}

/* Government Sub-Industries */
.chip[data-parent-industry="government-public-services"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fffbeb 0%, #ffe0b2 100%);
  color: #d97706;
  opacity: 0.9;
}

.chip[data-parent-industry="government-public-services"].is-selected,
.chip[data-parent-industry="government-public-services"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: #ffffff !important;
}

/* HR Sub-Industries */
.chip[data-parent-industry="hr-recruitment"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #faf5ff 0%, #e1bee7 100%);
  color: #a21caf;
  opacity: 0.9;
}

.chip[data-parent-industry="hr-recruitment"].is-selected,
.chip[data-parent-industry="hr-recruitment"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #ba68c8 0%, #9c27b0 100%);
  color: #ffffff !important;
}

/* Healthcare Sub-Industries */
.chip[data-parent-industry="healthcare-medical"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fef2f2 0%, #ffcdd2 100%);
  color: #dc2626;
  opacity: 0.9;
}

.chip[data-parent-industry="healthcare-medical"].is-selected,
.chip[data-parent-industry="healthcare-medical"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: #ffffff !important;
}

/* Hospitality Sub-Industries */
.chip[data-parent-industry="hospitality-tourism"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fffbeb 0%, #fff9c4 100%);
  color: #d97706;
  opacity: 0.9;
}

.chip[data-parent-industry="hospitality-tourism"].is-selected,
.chip[data-parent-industry="hospitality-tourism"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  color: #ffffff !important;
}

/* Insurance Sub-Industries */
.chip[data-parent-industry="insurance"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f0f4ff 0%, #c5cae9 100%);
  color: #3730a3;
  opacity: 0.9;
}

.chip[data-parent-industry="insurance"].is-selected,
.chip[data-parent-industry="insurance"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #3f51b5 0%, #303f9f 100%);
  color: #ffffff !important;
}

/* Legal Sub-Industries */
.chip[data-parent-industry="legal-compliance"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fafafa 0%, #e0e0e0 100%);
  color: #525252;
  opacity: 0.9;
}

.chip[data-parent-industry="legal-compliance"].is-selected,
.chip[data-parent-industry="legal-compliance"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #424242 0%, #212121 100%);
  color: #ffffff !important;
}

/* Marketing Sub-Industries */
.chip[data-parent-industry="marketing-advertising-digital"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fdf2f8 0%, #f8bbd9 100%);
  color: #be185d;
  opacity: 0.9;
}

.chip[data-parent-industry="marketing-advertising-digital"].is-selected,
.chip[data-parent-industry="marketing-advertising-digital"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #e91e63 0%, #ad1457 100%);
  color: #ffffff !important;
}

/* Media Sub-Industries */
.chip[data-parent-industry="media-entertainment"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #faf5ff 0%, #e1bee7 100%);
  color: #a21caf;
  opacity: 0.9;
}

.chip[data-parent-industry="media-entertainment"].is-selected,
.chip[data-parent-industry="media-entertainment"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
  color: #ffffff !important;
}

/* Retail Sub-Industries */
.chip[data-parent-industry="retail-e-commerce"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f0fdf4 0%, #c8e6c9 100%);
  color: #166534;
  opacity: 0.9;
}

.chip[data-parent-industry="retail-e-commerce"].is-selected,
.chip[data-parent-industry="retail-e-commerce"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  color: #ffffff !important;
}

/* Sales Sub-Industries */
.chip[data-parent-industry="sales-customer-service"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f0f9ff 0%, #b3e5fc 100%);
  color: #0369a1;
  opacity: 0.9;
}

.chip[data-parent-industry="sales-customer-service"].is-selected,
.chip[data-parent-industry="sales-customer-service"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #03a9f4 0%, #0288d1 100%);
  color: #ffffff !important;
}

/* Science Sub-Industries */
.chip[data-parent-industry="science-research"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #faf5ff 0%, #d1c4e9 100%);
  color: #7c3aed;
  opacity: 0.9;
}

.chip[data-parent-industry="science-research"].is-selected,
.chip[data-parent-industry="science-research"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #673ab7 0%, #512da8 100%);
  color: #ffffff !important;
}

/* Technology Sub-Industries */
.chip[data-parent-industry="technology-it"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f7fee7 0%, #dcedc8 100%);
  color: #365314;
  opacity: 0.9;
}

.chip[data-parent-industry="technology-it"].is-selected,
.chip[data-parent-industry="technology-it"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #8bc34a 0%, #689f38 100%);
  color: #ffffff !important;
}

/* Telecom Sub-Industries */
.chip[data-parent-industry="telecommunication"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #f0fdfa 0%, #b2dfdb 100%);
  color: #0f766e;
  opacity: 0.9;
}

.chip[data-parent-industry="telecommunication"].is-selected,
.chip[data-parent-industry="telecommunication"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
  color: #ffffff !important;
}

/* Transport Sub-Industries */
.chip[data-parent-industry="transport-logistics"]:not(.is-selected):not(:has(.chip-input:checked)) {
  background: linear-gradient(135deg, #fef2f2 0%, #ffccbc 100%);
  color: #dc2626;
  opacity: 0.9;
}

.chip[data-parent-industry="transport-logistics"].is-selected,
.chip[data-parent-industry="transport-logistics"]:has(.chip-input:checked) {
  background: linear-gradient(135deg, #ff5722 0%, #d84315 100%);
  color: #ffffff !important;
}

/* ================================
   MODERN FALLBACK (Skills & Default)
   ================================ */
.chip:not([class*="chip-"]):not([data-parent-industry]) {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #495057;
}

.chip:not([class*="chip-"]):not([data-parent-industry]).is-selected,
.chip:not([class*="chip-"]):not([data-parent-industry]):has(.chip-input:checked) {
  background: linear-gradient(135deg, #4d6dff 0%, #1e40af 100%);
  color: #ffffff !important;
}
