/* modules/threat_tracker/threat_tracker.css */

#threat_tracker {
  width: fit-content;
  font-family: Arial, sans-serif;
  color: #eee;
}

/* overall layout */
#threat_layout {
  width: fit-content;
}

/* top label */
#current_threat {
  min-width: 160px;
  text-align: center;
  font-weight: bold;
  padding: 8px;
  margin-bottom: 6px;
  border: 1px solid #666;
  background: #111;
  color: #eee;
}

/* body: tracker on left, buttons on right */
#threat_body {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 6px;
  align-items: start;
}

/* buttons column */
#threat_buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#threat_buttons button {
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
  background: #222;
  color: #eee;
  border: 1px solid #666;
}

#threat_buttons button:hover {
  background: #444;
}

/* table styling */
#threat_tracker table {
  border-collapse: collapse;
}

#threat_tracker td {
  border: 1px solid #666;
}

/* numeric cells */
#threat_tracker .threat_num {
  width: 25px;
  height: 25px;
  text-align: center;
  vertical-align: middle;
  font-weight: bold;
}

/* band label cells */
#threat_tracker .threat_level {
  width: 60px;
  position: relative;
}

#threat_tracker .threat_level span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  font-weight: bold;
  white-space: nowrap;
}

/* band background colors */
#threat_tracker .high   { background-color: #c62828; color: #fff; }
#threat_tracker .medium { background-color: #ef6c00; color: #000; }
#threat_tracker .low    { background-color: #fdd835; color: #000; }
#threat_tracker .quiet  { background-color: #2e7d32; color: #fff; }

/* active column highlighting */
#threat_tracker .cell-high   { background-color: #c62828; color: #fff; }
#threat_tracker .cell-medium { background-color: #ef6c00; color: #000; }
#threat_tracker .cell-low    { background-color: #fdd835; color: #000; }
#threat_tracker .cell-quiet  { background-color: #2e7d32; color: #fff; }
