/* 
   AI Workforce Operations Calculator - Compact Side-by-Side Grid Stylesheet
*/

:root {
  --wfc-primary: #a78bfa; /* Violet-400 */
  --wfc-primary-rgb: 167, 139, 250;
  --wfc-primary-hover: #c084fc; /* Purple-400 */
  
  --wfc-bg-dark: #09090b; /* Zinc-950 */
  --wfc-card-bg: rgba(20, 20, 25, 0.65);
  --wfc-border-color: rgba(167, 139, 250, 0.15);
  --wfc-text-muted: rgba(255, 255, 255, 0.4);
}

/* Calculator Wrapper */
.wfc-wrapper {
  background: var(--wfc-card-bg);
  border: 1px solid var(--wfc-border-color);
  border-radius: 24px;
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
              inset 0 0 24px rgba(167, 139, 250, 0.02);
  width: 100%;
}

.wfc-title {
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 4px;
}

.wfc-subtitle {
  font-size: 11px;
  color: var(--wfc-text-muted);
  line-height: 1.4;
  margin-bottom: 20px;
}

/* Side-by-Side Grid Layout */
.wfc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .wfc-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* Left Column: Sliders and Inputs */
.wfc-control-group {
  margin-bottom: 12px;
  position: relative;
}

.wfc-control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.wfc-control-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wfc-control-value {
  font-size: 13px;
  font-weight: 700;
  font-family: monospace;
  color: var(--wfc-primary);
  text-shadow: 0 0 8px rgba(167, 139, 250, 0.3);
}

/* Custom Range Inputs */
.wfc-range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  outline: none;
  transition: background 0.3s;
}

.wfc-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--wfc-primary);
  box-shadow: 0 0 10px var(--wfc-primary);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.wfc-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--wfc-primary-hover);
}

/* Tooltip implementation */
.wfc-tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.wfc-tooltip .tooltiptext {
  visibility: hidden;
  width: 160px;
  background: #09090b;
  color: #fff;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px;
  font-size: 9px;
  position: absolute;
  z-index: 100;
  bottom: 125%;
  left: 50%;
  margin-left: -80px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
}

.wfc-tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Right Column: Output Panel */
.wfc-results-panel {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

/* Gauge Dial Wrapper */
.wfc-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 90px;
}

.wfc-chart-dial {
  transform: rotate(-90deg);
  width: 75px;
  height: 75px;
}

.wfc-dial-bg {
  stroke: rgba(255, 255, 255, 0.03);
}

.wfc-dial-val {
  stroke: var(--wfc-primary);
  stroke-dasharray: 126; /* Radius = 20: 2 * Math.PI * 20 = 125.66 */
  stroke-dashoffset: 31.4; /* 75% default: 126 - (126 * 0.75) = 31.5 */
  transition: stroke-dashoffset 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.5));
}

.wfc-chart-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.wfc-chart-label .val {
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
  color: #ffffff;
}

.wfc-chart-label .lbl {
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--wfc-text-muted);
}

/* Loss Metric readout */
.wfc-loss-metric {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 0;
}

.wfc-loss-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wfc-text-muted);
  margin-bottom: 2px;
}

.wfc-loss-value {
  font-size: 20px;
  font-weight: 700;
  color: #f43f5e; /* Rose-500 */
  text-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

/* Recovery Card Highlight */
.wfc-recovery-card {
  background: rgba(167, 139, 250, 0.03);
  border: 1px solid rgba(167, 139, 250, 0.1);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.wfc-recovery-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--wfc-text-muted);
  margin-bottom: 2px;
}

.wfc-recovery-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--wfc-primary);
  text-shadow: 0 0 8px rgba(167, 139, 250, 0.3);
}

/* Compounding Ledger Card */
.wfc-ledger-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wfc-ledger-title {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.wfc-ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-family: monospace;
}

.wfc-ledger-year {
  color: var(--wfc-text-muted);
}

.wfc-ledger-val {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.wfc-ledger-val.highlight {
  color: var(--wfc-primary);
  font-weight: 700;
}
