/* ==========================================================================
 * Hardeman Motorsport B.V. — 3D Tussenbak Koppeling & Slijtage Simulator
 * Strikte Hardeman & Motorsportparts.nl Huisstijl:
 * - Uitsluitend Roboto + tabular-nums (geen monospace, geen emoji's, geen pills)
 * - Max 2px border-radius, 1px solid #D1D5DB kaders, #1F3140 Navy, #EC6921 Oranje
 * ========================================================================== */

.hm-tc-sim,
.hm-tc-sim *,
.hm-tc-sim *::before,
.hm-tc-sim *::after {
  box-sizing: border-box;
}

.hm-tc-sim {
  width: 100%;
  margin: 26px 0 34px 0;
  background: #F3F4F6;
  color: #111827;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid #D1D5DB;
  border-top: 3px solid #1F3140;
  border-radius: 2px;
  overflow: hidden;
  text-align: left;
}

.hm-tc-sim h2,
.hm-tc-sim h3,
.hm-tc-sim h4,
.hm-tc-sim p,
.hm-tc-sim div,
.hm-tc-sim span,
.hm-tc-sim label,
.hm-tc-sim button {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
}

/* ---------- Header Bar ---------- */
.hm-tc-sim .hm-tc-head {
  background: #FFFFFF;
  border-bottom: 2px solid #1F3140;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hm-tc-sim .hm-tc-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.hm-tc-sim .hm-tc-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #355670;
  margin-bottom: 2px;
}

.hm-tc-sim .hm-tc-title {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  line-height: 1.25 !important;
}

.hm-tc-sim .hm-tc-subtitle {
  margin: 2px 0 0 0 !important;
  font-size: 12.5px !important;
  color: #6B7280 !important;
  line-height: 1.35 !important;
}

.hm-tc-sim .hm-tc-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hm-tc-sim .hm-tc-lang-group {
  display: inline-flex;
  border: 1px solid #D1D5DB;
  border-radius: 2px;
  overflow: hidden;
  background: #F9FAFB;
}

.hm-tc-sim button.hm-tc-lang-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none !important;
  border-right: 1px solid #D1D5DB !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #374151 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  padding: 6px 9px !important;
  margin: 0 !important;
  cursor: pointer;
  line-height: 1 !important;
  text-transform: uppercase;
  box-shadow: none !important;
}

.hm-tc-sim button.hm-tc-lang-btn:last-child {
  border-right: none !important;
}

.hm-tc-sim button.hm-tc-lang-btn:hover {
  background: #E5E7EB !important;
  color: #111827 !important;
}

.hm-tc-sim button.hm-tc-lang-btn.is-active {
  background: #1F3140 !important;
  color: #FFFFFF !important;
}

/* ---------- Scenario Preset Strip ---------- */
.hm-tc-sim .hm-tc-presets {
  background: #F9FAFB;
  border-bottom: 1px solid #D1D5DB;
  padding: 12px 20px;
}

.hm-tc-sim .hm-tc-presets-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #374151;
  margin-bottom: 8px;
}

.hm-tc-sim .hm-tc-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hm-tc-sim button.hm-tc-preset-btn {
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  background: #FFFFFF !important;
  border: 1px solid #D1D5DB !important;
  border-top: 2px solid #9CA3AF !important;
  border-radius: 2px !important;
  padding: 9px 11px !important;
  margin: 0 !important;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
  box-shadow: none !important;
}

.hm-tc-sim button.hm-tc-preset-btn:hover {
  border-color: #355670 !important;
  border-top-color: #1F3140 !important;
  background: #FFFFFF !important;
}

.hm-tc-sim button.hm-tc-preset-btn.is-active {
  background: #1F3140 !important;
  border-color: #1F3140 !important;
  border-top-color: #EC6921 !important;
}

.hm-tc-sim .hm-tc-preset-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  margin-bottom: 3px;
}

.hm-tc-sim .hm-tc-preset-desc {
  display: block;
  font-size: 11.5px;
  color: #6B7280;
  line-height: 1.3;
}

.hm-tc-sim button.hm-tc-preset-btn.is-active .hm-tc-preset-name {
  color: #FFFFFF;
}

.hm-tc-sim button.hm-tc-preset-btn.is-active .hm-tc-preset-desc {
  color: #CBD5E1;
}

/* ---------- Main Grid (3D Viewport + Engineering Controls) ---------- */
.hm-tc-sim .hm-tc-body {
  display: grid;
  grid-template-columns: 1.42fr 1fr;
  min-height: 500px;
}

/* 3D Canvas Viewport */
.hm-tc-sim .hm-tc-viewport-col {
  display: flex;
  flex-direction: column;
  background: #0F1922;
  border-right: 1px solid #D1D5DB;
  position: relative;
}

.hm-tc-sim .hm-tc-canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 430px;
  width: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  background: radial-gradient(circle at 50% 46%, #1D2E3D 0%, #0F1922 76%);
}

.hm-tc-sim .hm-tc-canvas-wrap:active {
  cursor: grabbing;
}

.hm-tc-sim canvas.hm-tc-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 3D Callout Overlay Badges */
.hm-tc-sim .hm-tc-overlay-bar {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
  z-index: 3;
}

.hm-tc-sim .hm-tc-rpm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hm-tc-sim .hm-tc-rpm-chip {
  background: rgba(15, 25, 34, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  padding: 5px 9px;
  color: #E5E7EB;
  font-size: 11.5px;
  line-height: 1.25;
}

.hm-tc-sim .hm-tc-rpm-chip strong {
  color: #FFFFFF;
  font-weight: 700;
}

.hm-tc-sim .hm-tc-rpm-chip.is-slip {
  border-color: #EC6921;
}

.hm-tc-sim .hm-tc-cam-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  pointer-events: auto;
}

.hm-tc-sim button.hm-tc-mini-btn {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(31, 49, 64, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.26) !important;
  border-radius: 2px !important;
  color: #F3F4F6 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 5px 9px !important;
  margin: 0 !important;
  cursor: pointer;
  line-height: 1.1 !important;
  box-shadow: none !important;
}

.hm-tc-sim button.hm-tc-mini-btn:hover {
  background: #355670 !important;
  border-color: #FFFFFF !important;
}

.hm-tc-sim button.hm-tc-mini-btn.is-active {
  background: #EC6921 !important;
  border-color: #EC6921 !important;
  color: #FFFFFF !important;
}

.hm-tc-sim .hm-tc-cam-dock {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
  z-index: 3;
}

.hm-tc-sim .hm-tc-cam-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  pointer-events: auto;
}

/* Projected 3D Part Labels */
.hm-tc-sim .hm-tc-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hm-tc-sim .hm-tc-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(15, 25, 34, 0.82);
  border: 1px solid rgba(203, 213, 225, 0.34);
  border-left: 2px solid #93B5CF;
  color: #F1F5F9;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 2px;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.hm-tc-sim .hm-tc-marker.is-clutch {
  border-left-color: #EC6921;
  color: #FFFFFF;
  font-weight: 700;
}

.hm-tc-sim .hm-tc-markers.is-hidden {
  display: none;
}

.hm-tc-sim .hm-tc-vp-foot {
  background: #162430;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #CBD5E1;
  font-size: 11.5px;
}

.hm-tc-sim .hm-tc-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hm-tc-sim .hm-tc-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hm-tc-sim .hm-tc-swatch {
  width: 10px;
  height: 10px;
  border-radius: 1px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* ---------- Right Controls Column ---------- */
.hm-tc-sim .hm-tc-controls-col {
  background: #FFFFFF;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hm-tc-sim .hm-tc-ctrl-group {
  border-bottom: 1px solid #E5E7EB;
  padding-bottom: 12px;
}

.hm-tc-sim .hm-tc-ctrl-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hm-tc-sim .hm-tc-ctrl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}

.hm-tc-sim .hm-tc-ctrl-label {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.hm-tc-sim .hm-tc-ctrl-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #1F3140;
}

.hm-tc-sim .hm-tc-ctrl-val.is-warn {
  color: #B45309;
}

.hm-tc-sim .hm-tc-ctrl-val.is-danger {
  color: #B91C1C;
}

.hm-tc-sim .hm-tc-ctrl-hint {
  font-size: 11.5px;
  color: #6B7280;
  margin-top: 4px;
  line-height: 1.35;
}

.hm-tc-sim input[type="range"].hm-tc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #D1D5DB;
  border-radius: 2px;
  outline: none;
  margin: 6px 0 2px 0;
  cursor: pointer;
}

.hm-tc-sim input[type="range"].hm-tc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: #1F3140;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px #1F3140;
  cursor: pointer;
}

.hm-tc-sim input[type="range"].hm-tc-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: #1F3140;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px #1F3140;
  cursor: pointer;
}

.hm-tc-sim input[type="range"].hm-tc-slider:hover::-webkit-slider-thumb {
  background: #EC6921;
  box-shadow: 0 0 0 1px #EC6921;
}

.hm-tc-sim .hm-tc-oil-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.hm-tc-sim button.hm-tc-oil-btn {
  appearance: none;
  -webkit-appearance: none;
  background: #F9FAFB !important;
  border: 1px solid #D1D5DB !important;
  border-radius: 2px !important;
  padding: 7px 9px !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #374151 !important;
  cursor: pointer;
  text-align: center;
  line-height: 1.25 !important;
  box-shadow: none !important;
}

.hm-tc-sim button.hm-tc-oil-btn.is-active {
  background: #1F3140 !important;
  border-color: #1F3140 !important;
  color: #FFFFFF !important;
}

.hm-tc-sim button.hm-tc-oil-btn.is-old.is-active {
  background: #7C2D12 !important;
  border-color: #7C2D12 !important;
  color: #FFFFFF !important;
}

/* ---------- Bottom Telemetry & Workshop Diagnosis ---------- */
.hm-tc-sim .hm-tc-telemetry {
  background: #F9FAFB;
  border-top: 1px solid #D1D5DB;
  padding: 14px 20px 18px 20px;
}

.hm-tc-sim .hm-tc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.hm-tc-sim .hm-tc-kpi {
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-top: 2px solid #1F3140;
  border-radius: 2px;
  padding: 10px 12px;
}

.hm-tc-sim .hm-tc-kpi.status-warn {
  border-top-color: #D97706;
}

.hm-tc-sim .hm-tc-kpi.status-danger {
  border-top-color: #DC2626;
  background: #FEF2F2;
}

.hm-tc-sim .hm-tc-kpi-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6B7280;
  margin-bottom: 3px;
}

.hm-tc-sim .hm-tc-kpi-val {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  line-height: 1.15;
}

.hm-tc-sim .hm-tc-kpi.status-danger .hm-tc-kpi-val {
  color: #991B1B;
}

.hm-tc-sim .hm-tc-kpi-sub {
  font-size: 11.5px;
  color: #4B5563;
  margin-top: 3px;
  line-height: 1.3;
}

/* Thermal & Wear Bar */
.hm-tc-sim .hm-tc-wear-meter {
  height: 6px;
  width: 100%;
  background: #E5E7EB;
  border-radius: 1px;
  overflow: hidden;
  margin-top: 6px;
}

.hm-tc-sim .hm-tc-wear-fill {
  height: 100%;
  width: 8%;
  background: #15803D;
  transition: width 0.18s ease, background-color 0.18s ease;
}

/* Diagnosis Panel */
.hm-tc-sim .hm-tc-diag {
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-left: 4px solid #15803D;
  border-radius: 2px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.hm-tc-sim .hm-tc-diag.status-warn {
  border-left-color: #D97706;
  background: #FFFBEB;
}

.hm-tc-sim .hm-tc-diag.status-danger {
  border-left-color: #DC2626;
  background: #FEF2F2;
}

.hm-tc-sim .hm-tc-diag-main {
  flex: 1 1 520px;
}

.hm-tc-sim .hm-tc-diag-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.hm-tc-sim .hm-tc-diag.status-danger .hm-tc-diag-title {
  color: #991B1B;
}

.hm-tc-sim .hm-tc-diag-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
  margin: 0 !important;
}

.hm-tc-sim .hm-tc-diag-badge {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 5px 10px;
  border-radius: 2px;
  border: 1px solid #BBF7D0;
  background: #F0FDF4;
  color: #166534;
  align-self: flex-start;
  white-space: nowrap;
}

.hm-tc-sim .hm-tc-diag.status-warn .hm-tc-diag-badge {
  border-color: #FDE68A;
  background: #FEF3C7;
  color: #92400E;
}

.hm-tc-sim .hm-tc-diag.status-danger .hm-tc-diag-badge {
  border-color: #FECACA;
  background: #FEE2E2;
  color: #991B1B;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hm-tc-sim .hm-tc-preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hm-tc-sim .hm-tc-body {
    grid-template-columns: 1fr;
  }
  .hm-tc-sim .hm-tc-viewport-col {
    border-right: none;
    border-bottom: 1px solid #D1D5DB;
  }
  .hm-tc-sim .hm-tc-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .hm-tc-sim .hm-tc-preset-grid,
  .hm-tc-sim .hm-tc-kpi-grid {
    grid-template-columns: 1fr;
  }
  .hm-tc-sim .hm-tc-canvas-wrap {
    min-height: 290px;
  }
  .hm-tc-sim .hm-tc-marker {
    font-size: 10px;
    padding: 2px 5px;
  }
}
