/* Shared score UI: keep identical in hdtforum/scores and indoordriving.
   Project-wide styling stays in each site's own stylesheet. */
/* Row tint overrides ordinary total/place backgrounds, but best-score colours below take precedence. */
.itab .clsRowHighlight td:not(.clsBestClass):not(.clsBestEvent),
.clsRowHighlightStatus:not(:empty),
.clsRowHighlightLabel {
  background-color: #dceefa;
  color: #202020;
}

/* Link the active rule and help label to the row tint without filling the page width. */
.clsRowHighlightStatus:not(:empty) {
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  margin: 4px 0;
  padding: 4px 8px;
  border-radius: 3px;
}

.clsRowHighlightLabel {
  padding: 1px 3px;
  border-radius: 3px;
}

/* Best-score colours must win when a score is also a total/subtotal cell. */
.itab td.clsBestClass {
  background-color: yellow;
}

.itab td.clsBestEvent {
  background-color: pink;
}

/* Two explicit actions for dressage totals, with comfortable touch targets. */
.clsCellActions {
  position: fixed;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  padding: 6px;
  background: white;
  border: 1px solid #aaa;
  border-radius: 4px;
  box-shadow: 0 2px 8px #0003;
}

.clsCellActions button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f3f5f7;
  color: #202020;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.clsCellActions button:hover {
  background: #e9edf2;
}

.clsCellActions button:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

.clsHighlightClear {
  margin: 2px;
  padding: 3px 6px;
  border: 1px solid #999;
  background: #eeeded;
  color: #202020;
  font: inherit;
  cursor: pointer;
}

@media print {
  .clsCellActions, .clsRowHighlightStatus { display: none; }
}
