/* ==========================================================================
   OBD-II CAN Bus OLED Gauge - Module Specific Overrides
   ========================================================================== */

:root {
  --accent-color: var(--accent-amber);
  --accent-color-glow: var(--accent-amber-glow);
  --accent-color-dim: rgba(255, 140, 0, 0.12);
}

/* Back Link Hover Override */
.back-hub-link:hover {
  color: var(--accent-amber) !important;
  transform: translateX(-3px);
}

/* Specific wiring section adjustments */
#obd-schematic-svg {
  filter: drop-shadow(0 10px 25px rgba(0,0,0,0.6));
}

/* Layout selection button group */
.layout-toggle-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.layout-btn {
  background: var(--bg-darker);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.8rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.layout-btn:hover {
  border-color: var(--accent-color-glow);
  color: var(--text-primary);
}

.layout-btn.active {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--accent-color-dim);
  box-shadow: 0 0 10px var(--accent-color-glow);
}

/* Virtual SSD1306 OLED Screen Panel */
/* Acrylic screen bezel housing */
.virtual-oled-bezel {
  background: #111520;
  border: 3px solid #202636;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 
    0 10px 20px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  width: 90%;
  margin-top: -30px;
}

/* Mock screw decorations on corners */
.virtual-oled-bezel::before,
.virtual-oled-bezel::after {
  content: '▪';
  position: absolute;
  font-size: 8px;
  color: #3b455e;
}
.virtual-oled-bezel::before { top: 4px; left: 8px; }
.virtual-oled-bezel::after { bottom: 4px; right: 8px; }

/* Screen output pixel buffer */
.virtual-oled-screen {
  width: 100%;
  height: 170px;
  background-color: #000;
  border: 1px solid #1f2536;
  border-radius: 6px;
  padding: 1rem;
  overflow: hidden;
  font-family: 'Roboto Mono', monospace;
  color: var(--accent-cyan);
  position: relative;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.9);
}

.virtual-oled-screen::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
}

/* OLED Gauge layouts */
.oled-layout {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.oled-header {
  font-size: 0.7rem;
  border-bottom: 1px dashed rgba(0, 176, 255, 0.3);
  padding-bottom: 0.25rem;
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
}

.oled-body-gauge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-grow: 1;
  padding-top: 0.5rem;
}

.oled-temp-text {
  font-size: 2.2rem;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 176, 255, 0.6);
}

.oled-temp-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.oled-gauge-circle {
  width: 70px;
  height: 70px;
}

.oled-gauge-bg {
  fill: none;
  stroke: #10141f;
  stroke-width: 6;
}

.oled-gauge-fill {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 6;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(-90deg);
  transition: stroke-dashoffset 0.15s ease;
  filter: drop-shadow(0 0 2px var(--accent-cyan));
}

.oled-list-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0, 176, 255, 0.1);
  font-size: 0.85rem;
}

.oled-list-row:last-child {
  border-bottom: none;
}

.oled-list-val {
  font-weight: 700;
}

.oled-terminal-console {
  width: 100%;
  height: 100%;
  font-size: 0.65rem;
  line-height: 1.4;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.terminal-line {
  white-space: nowrap;
  opacity: 0.9;
}

.terminal-line.tx {
  color: var(--accent-cyan);
}

.terminal-line.rx {
  color: var(--accent-green);
}

.can-metric-footer {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #07080d;
  border: 1px solid #1f2536;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 90%;
  margin: 0 auto;
}

.bus-load-status {
  font-family: 'Roboto Mono', monospace;
}
