/**
 * 5G PUCCH Resource Grid Visualizer - local styles
 * Max width 800px, Courier New, black background
 */
#pucchContainer {
  max-width: 800px;
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  background: #000;
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  position: relative;
}

#pucchContainer .pucch-constellation-wrap {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 6px;
}

#pucchContainer .pucch-constellation-wrap .pucch-constellation-label {
  font-size: 9px;
  color: #fff;
  text-align: center;
  margin-top: 4px;
}

#pucchContainer #pucchConstellationCanvas {
  display: block;
  background: #111;
  border-radius: 2px;
}

#content_sim {
  max-width: 800px;
  box-sizing: border-box;
}

#pucchContainer .pucch-control-panel {
  margin-bottom: 12px;
  padding: 8px;
  background: #111;
  border: 1px solid #333;
  border-radius: 4px;
}

#pucchContainer .pucch-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  font-size: 11px;
  flex-wrap: wrap;
}

#pucchContainer .pucch-control-row label {
  min-width: 60px;
  color: #fff;
}

#pucchContainer select {
  font-family: 'Courier New', monospace;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  outline: none;
}

#pucchContainer select:hover {
  background: #222;
  border-color: #444;
  color: #fff;
}

#pucchContainer select:focus {
  border-color: #555;
  background: #222;
}

#pucchContainer .pucch-control-row input[type="range"] {
  flex: 1;
  max-width: 100px;
}

#pucchContainer .pucch-value-display {
  min-width: 30px;
  color: #0f0;
  font-size: 11px;
}

#pucchContainer .pucch-param-group {
  display: none;
}

#pucchContainer .pucch-param-group.visible {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
}

#pucchContainer .pucch-param-group-global {
  display: flex !important;
}

#pucchContainer .pucch-timeline-wrap {
  margin: 10px 0;
  overflow-x: auto;
  max-height: 420px;
  scrollbar-width: thin;
  scrollbar-color: #444 #1a1a1a;
  display: flex;
  justify-content: center;
}

#pucchContainer .pucch-timeline-container {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
}

#pucchContainer .pucch-slot-block {
  flex-shrink: 0;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 6px;
}

#pucchContainer .pucch-slot-block .pucch-slot-label {
  font-size: 10px;
  color: #fff;
  margin-bottom: 4px;
  text-align: center;
}

#pucchContainer .pucch-slot-block .pucch-slot-grid {
  display: grid;
  border: 2px solid #333;
  border-radius: 2px;
  overflow: auto;
  max-height: 360px;
  scrollbar-width: thin;
  scrollbar-color: #444 #1a1a1a;
}

#pucchContainer .pucch-slot-block .pucch-slot-re {
  border: 0.5px solid #333;
  background: #1a1a1a;
  font-size: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

#pucchContainer .pucch-slot-block .pucch-slot-re.uci-active {
  background: #3498db;
  border-color: #2980b9;
}

#pucchContainer .pucch-slot-block .pucch-slot-re.dmrs-active {
  background: #e74c3c;
  border-color: #c0392b;
}

#pucchContainer .pucch-slot-block .pucch-slot-re.hop2 {
  border-left: 2px dashed #8f8;
}

#pucchContainer .pucch-slot-block .pucch-slot-re.prb-active {
  box-shadow: inset 0 0 0 1px #8f8;
}

#pucchContainer .pucch-timeline-arrow {
  align-self: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

#pucchContainer .pucch-format-desc {
  margin: 8px 0;
  padding: 6px 10px;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  font-size: 10px;
  color: #fff;
}

#pucchContainer .pucch-grid-wrap {
  margin: 10px 0;
  padding: 6px;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 4px;
  overflow: auto;
  text-align: center;
  max-height: 400px;
  scrollbar-width: thin;
  scrollbar-color: #444 #1a1a1a;
}

#pucchContainer .pucch-grid-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

#pucchContainer .pucch-grid-wrap::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

#pucchContainer .pucch-grid-wrap::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

#pucchContainer .pucch-grid-wrap::-webkit-scrollbar-thumb:hover {
  background: #555;
}

#pucchContainer .pucch-grid-wrap .pucch-grid {
  display: inline-grid;
  grid-template-columns: repeat(14, 18px);
  grid-template-rows: repeat(12, 6px);
  border: 2px solid #333;
  border-radius: 2px;
  gap: 0;
}

#pucchContainer .pucch-grid-wrap .pucch-re[data-prb-sep="1"] {
  border-bottom: 2px solid #555;
}

#pucchContainer .pucch-grid-wrap .pucch-re[data-slot-sep="1"] {
  border-left: 2px solid #555;
}

#pucchContainer .pucch-grid-wrap .pucch-re {
  border: 0.5px solid #333;
  width: 18px;
  height: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

#pucchContainer .pucch-grid-wrap .pucch-re.uci-active {
  background: #3498db;
  border-color: #2980b9;
}

#pucchContainer .pucch-grid-wrap .pucch-re.dmrs-active {
  background: #e74c3c;
  border-color: #c0392b;
}

#pucchContainer .pucch-grid-wrap .pucch-re.hop2 {
  border-left: 2px dashed #8f8;
}

#pucchContainer .pucch-legend {
  font-size: 10px;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

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

#pucchContainer .pucch-legend .pucch-legend-uci {
  width: 12px;
  height: 12px;
  background: #3498db;
  border: 1px solid #2980b9;
}

#pucchContainer .pucch-legend .pucch-legend-dmrs {
  width: 12px;
  height: 12px;
  background: #e74c3c;
  border: 1px solid #c0392b;
}

#pucchContainer .pucch-legend .pucch-legend-prb {
  width: 12px;
  height: 12px;
  background: #1a1a1a;
  border: 1px solid #8f8;
  box-sizing: border-box;
}

#pucchContainer .pucch-tooltip {
  position: fixed;
  background: #222;
  border: 1px solid #444;
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

#pucchContainer .pucch-tooltip.visible {
  display: block;
}

#pucchContainer .pucch-fmt1-frames {
  margin-top: 12px;
  padding: 10px;
  background: #0d0d0d;
  border: 1px solid #333;
  border-radius: 4px;
  display: none;
}

#pucchContainer .pucch-fmt1-frames.visible {
  display: block;
}

#pucchContainer .pucch-fmt1-intro {
  font-size: 10px;
  color: #fff;
  margin-bottom: 8px;
}

#pucchContainer .pucch-fmt1-tables {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

#pucchContainer .pucch-fmt1-occ-table td {
  font-size: 9px;
  max-width: 120px;
}

#pucchContainer .pucch-fmt1-cell,
#pucchContainer .pucch-fmt1-param-cell,
#pucchContainer .pucch-fmt1-occ-cell {
  cursor: pointer;
}

#pucchContainer .pucch-fmt1-cell:hover,
#pucchContainer .pucch-fmt1-param-cell:hover,
#pucchContainer .pucch-fmt1-occ-cell:hover {
  background: #2a2a2a;
}

#pucchContainer .pucch-fmt1-cell.pucch-fmt1-selected,
#pucchContainer .pucch-fmt1-param-cell.pucch-fmt1-selected,
#pucchContainer .pucch-fmt1-occ-cell.pucch-fmt1-selected {
  background: #1a4a6e;
  outline: 2px solid #5dade2;
}

#pucchContainer .pucch-fmt4-frames {
  margin-top: 12px;
  padding: 10px;
  background: #0d0d0d;
  border: 1px solid #333;
  border-radius: 4px;
  display: none;
}

#pucchContainer .pucch-fmt4-frames.visible {
  display: block;
}

#pucchContainer .pucch-fmt4-intro {
  font-size: 10px;
  color: #fff;
  margin-bottom: 8px;
}

#pucchContainer .pucch-fmt4-tables {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

#pucchContainer .pucch-fmt4-occ-table td {
  font-size: 9px;
  max-width: 200px;
}

#pucchContainer .pucch-fmt4-occ-cell {
  cursor: pointer;
}

#pucchContainer .pucch-fmt4-occ-cell:hover {
  background: #2a2a2a;
}

#pucchContainer .pucch-fmt4-occ-row.pucch-fmt4-selected td {
  background: #1a4a6e;
  outline: 2px solid #5dade2;
}

#pucchContainer .pucch-harq-frames {
  margin-top: 12px;
  padding: 10px;
  background: #0d0d0d;
  border: 1px solid #333;
  border-radius: 4px;
  display: none;
}

#pucchContainer .pucch-harq-frames.visible {
  display: block;
}

#pucchContainer .pucch-harq-intro {
  font-size: 10px;
  color: #fff;
  margin-bottom: 8px;
}

#pucchContainer .pucch-harq-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
  font-size: 11px;
}

#pucchContainer .pucch-harq-hint {
  width: 100%;
  font-size: 10px;
  color: #fff;
  margin-bottom: 4px;
}

#pucchContainer .pucch-harq-controls label {
  color: #fff;
}

#pucchContainer .pucch-harq-select {
  font-family: 'Courier New', monospace;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
}

#pucchContainer .pucch-harq-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#pucchContainer .pucch-harq-result {
  color: #5dade2;
  font-size: 11px;
}

#pucchContainer .pucch-harq-tables {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

#pucchContainer .pucch-harq-table-frame {
  background: #111;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 8px;
  text-align: center;
}

#pucchContainer .pucch-harq-table-frame .pucch-harq-table {
  margin: 0 auto;
}

#pucchContainer .pucch-harq-table-caption {
  font-size: 9px;
  color: #fff;
  margin-bottom: 6px;
}

#pucchContainer .pucch-harq-table {
  border-collapse: collapse;
  font-size: 11px;
}

#pucchContainer .pucch-harq-table th,
#pucchContainer .pucch-harq-table td {
  border: 1px solid #444;
  padding: 4px 10px;
  color: #fff;
}

#pucchContainer .pucch-harq-table th {
  background: #1a1a1a;
  color: #fff;
}

#pucchContainer .pucch-harq-table tr[data-mcs].pucch-harq-row-highlight td {
  background: #2a4a6a;
  color: #fff;
}
