/**
 * Workforce Proximity Styles
 */

/* ============================================
   Compact Badge (on cards)
   ============================================ */
.workforce-wrapper {
  display: inline-block;
  margin-left: 8px;
}

.workforce-compact {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.workforce-compact.high {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.workforce-compact.medium {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.workforce-compact.low {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.workforce-compact.none {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ============================================
   Full Badge
   ============================================ */
.workforce-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.workforce-badge.high {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.workforce-badge.medium {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.workforce-badge.low {
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.workforce-badge.none {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.workforce-icon {
  font-size: 16px;
}

.workforce-score {
  font-weight: 700;
  font-size: 14px;
}

.workforce-badge.high .workforce-score {
  color: #10b981;
}

.workforce-badge.medium .workforce-score {
  color: #f59e0b;
}

.workforce-badge.low .workforce-score {
  color: #f97316;
}

.workforce-badge.none .workforce-score {
  color: #ef4444;
}

.workforce-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

/* ============================================
   Workforce Panel (detail view)
   ============================================ */
.workforce-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.workforce-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.workforce-panel-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.workforce-score-display {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.workforce-score-display .score-value {
  font-size: 24px;
  font-weight: 700;
}

.workforce-score-display .score-label {
  font-size: 12px;
  color: #64748b;
}

.workforce-score-display.high .score-value {
  color: #10b981;
}

.workforce-score-display.medium .score-value {
  color: #f59e0b;
}

.workforce-score-display.low .score-value {
  color: #f97316;
}

.workforce-score-display.none .score-value {
  color: #ef4444;
}

/* Score Bar */
.workforce-score-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.workforce-score-bar .score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.workforce-score-bar .score-fill.high {
  background: linear-gradient(90deg, #10b981, #059669);
}

.workforce-score-bar .score-fill.medium {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.workforce-score-bar .score-fill.low {
  background: linear-gradient(90deg, #f97316, #ea580c);
}

.workforce-score-bar .score-fill.none {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Summary Stats */
.workforce-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.workforce-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.workforce-stat .stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
}

.workforce-stat .stat-label {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* Schools List */
.workforce-schools {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.workforce-schools-header {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.workforce-schools-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workforce-school-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.workforce-school-item .school-info {
  flex: 1;
  min-width: 0;
}

.workforce-school-item .school-name {
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workforce-school-item .school-location {
  font-size: 11px;
  color: #64748b;
}

.workforce-school-item .school-distance {
  font-size: 12px;
  font-weight: 600;
  color: #00b4d8;
  white-space: nowrap;
  margin-left: 12px;
}

/* Empty State */
.workforce-empty {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 13px;
}

/* Loading State */
.workforce-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  color: #64748b;
  font-size: 13px;
}

.workforce-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 180, 216, 0.2);
  border-top-color: #00b4d8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Panel container */
.workforce-panel-container {
  margin-top: 16px;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
  .workforce-summary {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .workforce-stat {
    padding: 10px 6px;
  }

  .workforce-stat .stat-value {
    font-size: 16px;
  }

  .workforce-stat .stat-label {
    font-size: 10px;
  }

  .workforce-school-item {
    padding: 6px 8px;
  }

  .workforce-school-item .school-name {
    font-size: 12px;
  }
}

/* 480px breakpoint for smaller phones */
@media (max-width: 480px) {
  .workforce-panel {
    padding: 8px;
  }

  .workforce-school-item {
    padding: 10px;
    min-height: 44px;
  }

  .workforce-stat .stat-value {
    font-size: 14px;
  }

  .workforce-stat .stat-label {
    font-size: 9px;
  }

  .workforce-summary {
    gap: 6px;
  }
}
