/* AI Career Risk - Custom Styles */

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e9ecef;
  border-top-color: #6c5ce7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Progress Bar */
.progress-bar {
  height: 8px;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6c5ce7, #8b7ff0);
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* Step Indicators */
.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.step-dot.inactive {
  background: #e9ecef;
  color: #adb5bd;
}
.step-dot.active {
  background: #6c5ce7;
  color: white;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2);
}
.step-dot.completed {
  background: #27ae60;
  color: white;
}
.step-connector {
  width: 40px;
  height: 2px;
  background: #e9ecef;
  transition: background 0.3s ease;
}
.step-connector.active {
  background: #6c5ce7;
}

/* Checkbox */
.checkbox-container {
  position: relative;
  width: 22px;
  height: 22px;
}
.checkbox-container input {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  cursor: pointer;
}
.checkbox-checkmark {
  position: absolute;
  top: 0; left: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #ced4da;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkbox-container input:checked + .checkbox-checkmark {
  background: #6c5ce7;
  border-color: #6c5ce7;
}
.checkbox-checkmark svg {
  width: 14px;
  height: 14px;
  stroke: white;
  stroke-width: 2;
  fill: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.checkbox-container input:checked + .checkbox-checkmark svg {
  opacity: 1;
}

/* Radio */
.radio-container {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.radio-container input {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  cursor: pointer;
}
.radio-mark {
  position: absolute;
  top: 0; left: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #ced4da;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.radio-container input:checked + .radio-mark {
  border-color: #6c5ce7;
}
.radio-container input:checked + .radio-mark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #6c5ce7;
  border-radius: 50%;
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6c5ce7;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(108, 92, 231, 0.3);
}
input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6c5ce7;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(108, 92, 231, 0.3);
}

/* Cards */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
}

/* Fade In */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Gauge Animation */
@keyframes gaugeAppear {
  from { stroke-dashoffset: 440; }
}

/* Risk Badge */
.risk-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.risk-badge.low { background: #e8f8ef; color: #27ae60; }
.risk-badge.medium { background: #ebf5ff; color: #3498db; }
.risk-badge.high { background: #fff8e1; color: #f39c12; }
.risk-badge.critical { background: #fde8e8; color: #e74c3c; }

/* Table */
.risk-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  border-bottom: 2px solid #e9ecef;
}
.risk-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f3f5;
}
.risk-table tr:hover td {
  background: #f8f9fa;
}

/* Risk bar */
.risk-bar-bg {
  height: 8px;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
}
.risk-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* Section animations */
.section-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modal */
#modal-overlay:not(.hidden) {
  animation: fadeIn 0.2s ease;
}
