/*------------------------------*/
/* --- GENERAL TAGS CLASSES --- */
/*------------------------------*/

:root {
  --livered: #F1592A;
  --bkgray: #E6E6E6;
  --bkdark: #555555;
}

body,
body.iframed,
td,
textarea,
select,
input,
table,
button {
  font-family: roboto, arial, helvetica, verdana, geneva, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 1em;
}

body {
  background: #FFF;
  margin: 0;
  font-size: 75%;
  -webkit-text-size-adjust: none;
}

body.iframed {
  font-size: 80%;
}

button {
  font-size: .8em;
  padding: 0;
}

td {
  line-height: 1.4em;
  white-space: nowrap;
}

.wrapok,
th {
  white-space: normal;
}

#tblLiveComps td {
  padding: 0 5px 0 0;
}

a:link,
a:visited {
  font-size: 1em;
  color: var(--livered);
  text-decoration: none;
}

a:hover {
  color: #FFA02B;
  text-decoration: underline;
}

textarea {
  font-size: 1.1em;
}

input,
select,
textarea {
  box-sizing: border-box;
}

h1,
h3 {
  font-size: 1em;
  font-weight: normal;
  margin-bottom: 0;
}

h2 {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 0;
}

.firstnonqualifier>td {
  border-top: 3px solid gray !important;
}

.firststarter>td {
  border-top: 5px solid black !important;
}

.pre_post_start>td {
  background: #DFDFDF !important;
  box-shadow: none !important;
}

.dns {
  text-decoration: line-through;
}

td.submenu {
  background: #555;
}

td.submenu table tr td {
  color: #DDD;
  padding: 3px 9px;
  font-weight: bold;
}

td.submenu a:link,
td.submenu a:visited {
  color: #FFF;
  text-decoration: none;
}

td.submenu a:hover {
  color: var(--livered);
  text-decoration: underline;
}

td.searchmenu {
  padding-left: 5px;
}

/* Red / highlight rows */
tr.red_row>td,
tr.new_fnq>td {
  color: #ffffff;
  background: var(--livered) !important;
  box-shadow: none !important;
}

tr.red_row a,
tr.new_fnq a {
  color: #FFF;
}

tr.red_row td.sorting_1,
tr.red_row td.sorting_2,
tr.new_fnq td.sorting_1,
tr.new_fnq td.sorting_2 {
  background: #F9B7A4 !important;
}

tr.new_fnq>td {
  border-top: 3px solid grey !important;
}

/* Text inside red/new rows */
tr.red_row .plustime,
tr.red_row .besttime,
tr.red_row .legtime,
tr.red_row .estimate,
tr.red_row .place,
tr.red_row .bestplace,
tr.red_row td i,
tr.red_row .bib,
tr.red_row .club,
tr.red_row .relayclub,
tr.new_fnq .plustime,
tr.new_fnq .besttime,
tr.new_fnq .legtime,
tr.new_fnq .estimate,
tr.new_fnq .place,
tr.new_fnq .bestplace,
tr.new_fnq td i,
tr.new_fnq .bib,
tr.new_fnq .club,
tr.new_fnq .relayclub {
  color: #FFF;
}

/* Red cells */
.red_cell,
.red_cell_sqr {
  color: #FFF;
  background: var(--livered) !important;
  box-shadow: none !important;
}

.red_cell .plustime,
.red_cell .legtime,
.red_cell .besttime,
.red_cell .place,
.red_cell .bestplace,
.red_cell i,
.red_cell_sqr .plustime,
.red_cell_sqr .legtime,
.red_cell_sqr .besttime,
.red_cell_sqr .place,
.red_cell_sqr .bestplace,
.red_cell_sqr i {
  color: #FFF;
}

.red_cell .besttime,
.red_cell_sqr .besttime {
  text-decoration-color: #FFF;
}

/* Green rows */
tr.green_row>td,
tr.green_row_new>td,
tr.green_row_firststarter>td {
  color: #000;
  background: #0F0 !important;
}

tr.green_row_new>td {
  border-top: 2px solid grey !important;
}

tr.green_row_firststarter>td {
  border-top: 5px solid black !important;
}

/* Yellow rows */
tr.yellow_row>td,
tr.yellow_row_new>td,
tr.yellow_row_fnq>td {
  color: #000;
  background: #FF0 !important;
  box-shadow: none !important;
}

tr.yellow_row_new>td {
  border-top: 2px solid grey !important;
}

tr.yellow_row_fnq>td {
  border-top: 3px solid grey !important;
}

tr.yellow_row .plustime,
tr.yellow_row .besttime,
tr.yellow_row .legtime,
tr.yellow_row .estimate,
tr.yellow_row .place,
tr.yellow_row .bestplace,
tr.yellow_row td i,
tr.yellow_row .bib,
tr.yellow_row .club,
tr.yellow_row .relayclub,
tr.yellow_row_fnq .plustime,
tr.yellow_row_fnq .besttime,
tr.yellow_row_fnq .legtime,
tr.yellow_row_fnq .estimate,
tr.yellow_row_fnq .place,
tr.yellow_row_fnq .bestplace,
tr.yellow_row_fnq td i,
tr.yellow_row_fnq .bib,
tr.yellow_row_fnq .club,
tr.yellow_row_fnq .relayclub {
  color: #000
}

.yellow_row .besttime,
.yellow_row_fnq .besttime {
  text-decoration-color: red;
}

/* Standalone colored cells */
.yellow_cell {
  color: #000;
  background: #FF0 !important;
  box-shadow: none !important;
}

.green_cell {
  color: #000;
  background: #0F0 !important;
  box-shadow: none !important;
}

/* Pulsing / live indicators */
@keyframes blinker {

  0%,
  100% {
    opacity: 0
  }

  50% {
    opacity: 1
  }
}

@keyframes blinkerCom {

  0%,
  100% {
    color: #51FF00;
    opacity: 0
  }

  50% {
    color: #51FF00;
    opacity: 1
  }
}

.pulsing {
  animation: blinker 1s ease-in-out infinite;
  color: var(--livered);
}

.pulsingLive {
  animation: blinkerCom 1s ease-in-out 30;
  color: gray;
}

.liveClient {
  animation: blinker 1s ease-in-out infinite;
  color: #51ff00;
}

.notLiveClient {
  color: gray;
}

/* Timing / place formatting */
.besttime {
  color: #000;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: red;
}

.bestplace,
.place,
.plustime,
.legtime,
.bib,
.estimate,
.estimatebest {
  color: dimgrey;
}

.time1,
.place1 {
  color: red;
}

.time23,
.place23 {
  color: blue;
}

.bib {
  font-style: normal;
}

.estimate,
.estimatebest {
  font-style: italic;
}

.estimatebest {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: red;
}

.gained,
.lost {
  color: #000;
}

a.club,
a.relayclub {
  color: var(--livered);
}

td i {
  color: var(--livered);
  font-style: normal;
}

.timeWidth,
.timePlaceWidth {
  min-width: 3em;
}

.hideplace {
  opacity: 0;
}

/* Scrolling info text */
#divInfoText {
  transform: translateX(100%);
  animation: scroll-animation 20s linear infinite;
}

@keyframes scroll-animation {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(-100%);
  }
}

/* Utility classes */
.maindiv {
  width: 100%;
  display: block;
}

.small {
  font-size: .8em;
}

.large {
  font-size: 1.167em;
}

.bold {
  font-weight: bold;
}

.red {
  color: #be0101;
}

.green {
  color: #2e8d03;
}

.darkblue {
  color: #3A5C9C;
}

.grey {
  color: #666;
}

/* Menu */
.mttop {
  display: block;
  background: #ABC9EF;
  height: 1px;
  margin: 0 1px;
}

td.menuchosen,
td.menu {
  padding: 2px 9px 4px;
  color: #FFF;
  font-weight: bold;
  border-left: 1px solid #ABC9EF;
  border-right: 1px solid #0B5280;
}

td.menuchosen {
  background: #3A5C9C;
}

td.menu {
  background: #6C95CD;
}

td.menu a:link,
td.menu a:visited,
td.menuchosen a:link,
td.menuchosen a:visited {
  color: #FFF;
  text-decoration: none;
}

td.menuchosen a:hover {
  color: #C0D6FF;
}

/* Categories */
.categories {
  background: #F4F8FD;
  border: 1px solid #ABC9EF;
}

.categoriesheader {
  color: #FFA02B;
  font-size: 1.27em;
  font-weight: bold;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  background: var(--bkdark);
  color: #FFF;
  text-align: center;
  border-radius: 5px;
  padding: .1em .5em;
  position: absolute;
  bottom: 0;
  right: 5em;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  bottom: .4em;
  right: -.7em;
  border: .4em solid transparent;
  border-left-color: var(--bkdark);
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: .9;
}

/* Split chooser / menu */
.noUnderline a,
.splitChooser a {
  text-decoration: none;
  color: #FFF;
}

.noUnderline a {
  font-size: 1.3em;
}

.menuicon {
  display: inline-block;
  cursor: pointer;
}

.dropbtn,
.dropbtnClass {
  background: var(--bkdark);
  color: #FFF;
  font-size: 1.3em;
  padding: 0;
  border: none;
  cursor: pointer;
}

.dropbtn {
  font-size: 1em;
  opacity: .9;
  text-align: right;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  right: 4px;
  display: none;
  position: absolute;
  background: var(--bkdark);
  color: #FFF;
  overflow: hidden;
  z-index: 1;
}

.dropdown-content a {
  color: #FFF;
  padding: 5px;
  display: block;
  text-decoration: none;
}

.show {
  display: block;
}

/* Split miss */
.splitMiss {
  background: #FFCCCC !important;
}

/* Buttons */
.navbtn,
div.dt-buttons>.dt-button {
  border: none;
  background: #000;
  font-size: 1.3em;
  cursor: pointer;
  display: inline-block;
  color: #FFF;
  width: 1.5em;
  height: 1.5em;
  border-radius: .3em;
  padding: 0;
  text-align: center;
  line-height: normal;
}

.navbtn:hover,
div.dt-buttons>.dt-button:hover {
  background: gray;
}

/* Misc */
.selectControl {
  cursor: pointer;
}

.numrunners {
  border-spacing: 10px 0;
  text-align: left;
}

.numrunners td {
  font-size: .7em;
  color: gray;
}

/* Info modal */
.info-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 8px;
  pointer-events: none;
}

.info-modal-content {
  background: var(--bkdark, #444);
  color: #ddd;
  border-radius: 6px;
  padding: 12px 14px 10px 14px;
  max-width: min(420px, 96vw);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  pointer-events: all;
  position: relative;
}

.info-modal-content a {
  color: #8cf;
}

.info-modal-close {
  position: absolute;
  top: 6px;
  right: 6px;
}

/* Runner count in class header */
#classRunnerCount {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  font-size: 0.8em;
  color: white;
}

/* Competition name */
.text-truncate {
  display: inline-block;
  vertical-align: middle;
  max-width: calc(100vw - 20em);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .text-truncate {
    max-width: calc(100vw - 16em);
  }

  .topbar-image {
    display: none;
  }
}

/* Last passings topBar */
.lastpassings-cell {
  max-width: 1px;
  width: 100%;
}

.passings-container {
  overflow: hidden;
  max-width: 100%;
  max-height: 4.2em;
  line-height: 1.4em;
}

.passing-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: block;
}

/* Class/results layout */
.container {
  display: flex;
}

.class-column {
  flex: 1;
  position: relative;
  display: inline-block;
  z-index: 100;
  line-height: 1.4em;
  font-size: 1.3em;
  max-width: 8em;
  min-width: 8em;
}

.class-column.unpinned {
  max-width: 0 !important;
  min-width: 0 !important;
}

.class-column-content {
  box-sizing: border-box;
  position: relative;
  top: 3px;
  left: 0;
  color: #FFF;
  background: var(--bkdark);
  overflow-y: scroll;
  overflow-x: hidden;
  z-index: 101;
  padding: 3px 3px 3px 10px;
  min-width: 8em;
  max-width: 8em;
}

.class-column-content a {
  color: #FFF;
}

.class-column-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.class-column-content.unpinned {
  opacity: .9;
  box-shadow: 4px 8px 16px rgba(0, 0, 0, .3);
}

.class-column-content.unpinned.closed {
  display: none;
}

.class-column-content.unpinned.open {
  display: block;
}

.lock {
  position: absolute;
  top: 3px;
  right: 3px;
  color: #FFF;
  font-size: 1em;
  cursor: pointer;
  z-index: 102;
}

.lockunpinned {
  color: lightgrey;
}

.result-column {
  flex: 2;
  display: inline-block;
  padding-left: 3px;
  width: calc(100vw - 15em);
  box-sizing: border-box;
  overflow-x: auto;
}

/*-----------------------------------*/
/*---  Mofification of DataTables ---*/
/*-----------------------------------*/
table.dataTable>thead>tr>th,
table.dataTable>thead>tr>td {
  padding: 3px 7px 3px 3px;
  cursor: pointer;
  white-space: nowrap;
  background-color: white;
  border-bottom: black 1px solid;
}

table.dataTable thead tr>.dtfc-fixed-start,
table.dataTable thead tr>.dtfc-fixed-end,
table.dataTable tfoot tr>.dtfc-fixed-start,
table.dataTable tfoot tr>.dtfc-fixed-end {
  background-color: white;
}

table.dataTable tbody tr>.dtfc-fixed-start,
table.dataTable tbody tr>.dtfc-fixed-end {
  background-color: white;
}

table.dataTable>tbody>tr>th,
table.dataTable>tbody>tr>td {
  padding: 3px 7px 3px 3px;
  background-color: white;
}

table.dataTable>tbody>tr:nth-child(odd)>* {
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.08);
  border-top: 1px solid rgb(220, 220, 220)
}

table.dataTable>tbody>tr:nth-child(even)>* {
  box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0);
  border-top: 1px solid white;
}

div.dt-container div.dt-layout-row {
  margin: 0 0;
}

table.dataTable tbody td {
  vertical-align: top;
}

table.dataTable tbody tr>.sorting_1,
table.dataTable tbody tr>.sorting_2,
table.dataTable tbody tr>.sorting_3 {
  background-color: #fff8e3;
}

table.dataTable thead>tr>th.dt-orderable-asc,
table.dataTable thead>tr>th.dt-orderable-desc,
table.dataTable thead>tr>th.dt-ordering-asc,
table.dataTable thead>tr>th.dt-ordering-desc,
table.dataTable thead>tr>td.dt-orderable-asc,
table.dataTable thead>tr>td.dt-orderable-desc,
table.dataTable thead>tr>td.dt-ordering-asc,
table.dataTable thead>tr>td.dt-ordering-desc {
  color: var(--livered);
}

/*---  Mofification of DataTables Button ---*/
div.dt-button-collection {
  background-color: var(--bkdark);
  font-size: 1.3em;
  line-height: 1.4em;
  width: 8em;
}

div.dt-buttons>.dt-button {
  border: none;
  background-color: black;
  font-size: 1.3em;
  cursor: pointer;
  display: inline-block;
  color: white;
  width: 1.5em;
  height: 1.5em;
  border-radius: 0.3em;
  padding: 0;
  margin-right: auto;
  margin-bottom: 0;
  line-height: normal;
}

div.dt-buttons>.dt-button:hover {
  background: gray;
}