/**
 * 5G NR DCI Blind Decoding Simulator - local styles
 * Max width 800px, Courier New, black background (requirements.txt)
 */
#dci5g-container {
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: #0b0e14;
  color: #00f2ff;
  padding: 12px;
  border-radius: 4px;
  overflow: hidden;
}

#dci5g-container .dci5g-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  flex-wrap: wrap;
}

#dci5g-container .dci5g-btn-row {
  justify-content: center;
}

#dci5g-container .dci5g-control-row label {
  min-width: 70px;
  color: #00f2ff;
}

#dci5g-container .dci5g-control-row input[type="text"],
#dci5g-container .dci5g-control-row select {
  background: #000;
  border: 1px solid #1a2634;
  color: #00f2ff;
  padding: 4px 8px;
  font-family: 'Courier New', monospace;
}

#dci5g-container .dci5g-control-row input[type="range"] {
  flex: 0 1 80px;
  min-width: 50px;
}

#dci5g-container .dci5g-section {
  border-left: 3px solid #00f2ff;
  background: rgba(26, 38, 52, 0.5);
  padding: 10px;
  margin: 8px 0;
}

#dci5g-container .dci5g-rrc-table {
  border-collapse: collapse;
  font-size: 11px;
  margin: 8px auto;
  width: auto;
}

#dci5g-container .dci5g-rrc-table caption {
  caption-side: top;
  text-align: left;
  font-weight: bold;
  color: #00f2ff;
  padding: 4px 0 6px 0;
}

#dci5g-container .dci5g-rrc-table th,
#dci5g-container .dci5g-rrc-table td {
  border: 1px solid #1a2634;
  padding: 6px 12px;
  color: #00f2ff;
  background: #000;
  text-align: center;
}

#dci5g-container .dci5g-rrc-table th {
  background: rgba(26, 38, 52, 0.9);
  font-weight: bold;
}

#dci5g-container .dci5g-rrc-table select.dci5g-cand-select {
  background: #000;
  border: 1px solid #1a2634;
  color: #00f2ff;
  padding: 2px 4px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  min-width: 50px;
}

#dci5g-container .dci5g-section h4 {
  margin: 0 0 8px 0;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #00f2ff;
}

#dci5g-container .dci5g-canvas-wrap {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 2px solid #1a2634;
  background: #000;
  scrollbar-width: thin;
  scrollbar-color: #2a3a4a #0b0e14;
}
#dci5g-container .dci5g-canvas-wrap::-webkit-scrollbar {
  width: 10px;
}
#dci5g-container .dci5g-canvas-wrap::-webkit-scrollbar-track {
  background: #0b0e14;
}
#dci5g-container .dci5g-canvas-wrap::-webkit-scrollbar-thumb {
  background: #2a3a4a;
  border-radius: 5px;
}
#dci5g-container .dci5g-canvas-wrap::-webkit-scrollbar-thumb:hover {
  background: #3a4a5a;
}

#dci5g-container #dci5gCanvas {
  display: block;
  max-width: 100%;
  background: #000;
  box-sizing: border-box;
}

#dci5g-container .dci5g-progress-wrap {
  margin: 8px 0;
}

#dci5g-container .dci5g-progress-bar {
  background: #1a2634;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
}

#dci5g-container .dci5g-progress-fill {
  width: 0%;
  height: 100%;
  background: #00f2ff;
  transition: width 0.3s;
}

#dci5g-container .dci5g-progress-text {
  color: #fff;
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

#dci5g-container .dci5g-progress-alcand {
  color: #00f2ff;
  font-size: 12px;
  display: block;
  margin-top: 2px;
  font-family: 'Courier New', monospace;
}

#dci5g-container .dci5g-legend {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  font-size: 11px;
  flex-wrap: wrap;
}

#dci5g-container .dci5g-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

#dci5g-container .dci5g-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid #333;
}

#dci5g-container .dci5g-cce-calc {
  margin-top: 12px;
  border: 1px solid #1a2634;
  background: rgba(0, 0, 0, 0.5);
  padding: 12px;
  font-size: 11px;
}

#dci5g-container .dci5g-cce-calc h4 {
  margin: 0 0 10px 0;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #00f2ff;
}

#dci5g-container .dci5g-cce-step {
  margin: 6px 0;
}

#dci5g-container .dci5g-cce-label {
  color: #fff;
  margin-bottom: 2px;
}

#dci5g-container .dci5g-cce-subsection {
  margin-bottom: 12px;
}

#dci5g-container .dci5g-cce-subsection:last-child {
  margin-bottom: 0;
}

#dci5g-container .dci5g-cce-subtitle {
  color: #00f2ff;
  font-weight: bold;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #1a2634;
}

#dci5g-container .dci5g-cce-expr {
  color: #00f2ff;
  font-family: 'Courier New', monospace;
  padding-left: 8px;
}

#dci5g-container #dci5gLog {
  background: #000;
  border: 1px solid #1a2634;
  font-size: 11px;
  padding: 8px;
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a3a4a #0b0e14;
}
#dci5g-container #dci5gLog::-webkit-scrollbar {
  width: 8px;
}
#dci5g-container #dci5gLog::-webkit-scrollbar-track {
  background: #0b0e14;
}
#dci5g-container #dci5gLog::-webkit-scrollbar-thumb {
  background: #2a3a4a;
  border-radius: 4px;
}
#dci5g-container #dci5gLog::-webkit-scrollbar-thumb:hover {
  background: #3a4a5a;
}

#dci5g-container #dci5gLog .log-success { color: #39ff14; font-weight: bold; }
#dci5g-container #dci5gLog .log-fail { color: #ff3e3e; opacity: 0.8; }

#dci5g-container .dci5g-btn-step {
  background: #333;
  color: #00f2ff;
  padding: 8px 12px;
  cursor: pointer;
  border: 1px solid #1a2634;
  font-family: 'Courier New', monospace;
  font-size: 11px;
}

#dci5g-container .dci5g-btn-step:hover {
  background: #444;
  border-color: #00f2ff;
}

#dci5g-container .dci5g-btn-step:disabled {
  background: #222;
  color: #fff;
  cursor: not-allowed;
}

#dci5g-container #dci5gBtnScan {
  background: #00f2ff;
  color: #000;
  font-weight: bold;
  padding: 10px 16px;
  cursor: pointer;
  border: none;
  font-family: 'Courier New', monospace;
}

#dci5g-container #dci5gBtnScan:hover {
  background: #fff;
  box-shadow: 0 0 12px #00f2ff;
}

#dci5g-container #dci5gBtnScan:disabled {
  background: #444;
  color: #fff;
  cursor: not-allowed;
}
