
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');
* {
  font-family: 'Noto Sans', Arial, sans-serif;
  box-sizing: border-box;
}
:root {
  --grayish: #c0c2ab;
  --corner-radius: 0.8rem;
  --ihsgca-gold: #cebd51;
  --ihsgca-green: #71734e;
  --ihsgca-light-gold: #f2eab6;
  --ihsgca-dark-green: #5e613d;
  --error-red: #d1626d;
}
body, html {
  height: 100%;
  width: 100vw;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: #f0f0f0;
  background: linear-gradient(to bottom, rgba(225, 235, 245, 0.5), transparent),
              radial-gradient(circle, #f0f0f0, #dedcd3);
}
body > header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background-color: #fff; 
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
body > main {
  flex-grow: 1;
  width: 100%;
  overflow: auto;
}
.site-header .logo {
  font-family: "Bebas Neue", sans-serif;
  font-size: 3em;
  text-decoration: none;
  letter-spacing: 0.02em;
  color: var(--ihsgca-green);
  text-shadow: -0.01em 0.02em 0 white, -0.03em 0.03em 0 var(--ihsgca-gold);
}
.main-nav a {
  color: var(--ihsgca-green);
  text-decoration: none;
  margin-left: 1.5em;
  font-size: 1.1em;
  position: relative;
}
main.full {
  width: 26em;
  max-width: 90vw;
  padding: 2em;
  background-color: white;
  border-radius: var(--corner-radius);
  box-shadow: 0 0.3em 0.8em rgba(0, 0, 0, 0.1);
  text-align: center; /* Center text/headings inside the form */
  flex-grow: revert;
}
.alert.alert-success,
.alert.alert-info {
    color: var(--ihsgca-green);
    background-color: var(--ihsgca-light-gold);
    padding: 0.5em 2em 0.5em 1em;
    font-style: italic;
    text-align: left;
    position: relative;
}
.alert .close {
    background: none;
    border: none;
    font-size: 1.2em;
    position: absolute;
    top: 0.2em;
    right: 0.5em;
    cursor: pointer;
}
.form .logo {
  width: 100%;
  margin-bottom: 2em;
}
.input-group {
  margin-bottom: 1.2em;
  position: relative;
}

.input-group label {
  position: absolute;
  display: block;
  color: var(--grayish);
  top: 1em;
  left: 1em;
  font-size: 1em;
  padding: 0 0.5em;
  background: white;
}

.input-group input {
    width: 100%;
    font-size: 1em;
    padding: 1em;
    box-sizing: border-box;
  color: var(--ihsgca-green);
    border: 1px solid var(--grayish);
    border-radius: var(--corner-radius);
}
.input-group input,
.input-group label {
  transition: all 0.3s ease;
}
.input-group input:focus,
.input-group input:not(:placeholder-shown) {
  outline: none;
    border: 1px solid var(--ihsgca-gold);
}
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
  color: var(--ihsgca-gold);
  font-size: 0.65em;
  top: -0.6em;
  left: 2em;
}
.input-group input:not(:placeholder-shown):not(:focus):invalid + label,
p.error {
  color: var(--error-red);
}
p.error {
  font-size: 0.8em;
  font-size: 0.8em;
  font-style: italic;
  text-align: left;
  margin: 0.2em 1em;
}
.input-actions {
  color: var(--ihsgca-green);
}
.input-actions input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}
.input-actions input[type="checkbox"] + label {
  position: relative;
  cursor: pointer;
}
.input-actions input[type="checkbox"] + label:before {
    content: '';
    border: 1px solid var(--ihsgca-gold);
    border-radius: 0.3em;
    margin: 0.2em 0.5em 0.2em 0;
    display: inline-block;
    vertical-align: text-top;
    width: 1em;
    height: 1em;
    background: white;
  transition: background 0.3s ease;
}
.input-actions input[type="checkbox"]:hover + label:before {
  background: var(--ihsgca-light-gold);
}
.input-actions input[type="checkbox"]:checked + label:before {
  background: var(--ihsgca-gold);
}
.input-actions input[type="checkbox"]:checked + label:after {
    content:  "\2713";
    position: absolute;
    font-size: 1.6em;
    left: 0.05em;
    top: -0.4em;
}
.input-actions a {
  color: var(--ihsgca-gold);
  text-decoration: none;
}
.input-actions a:hover {
  text-decoration: underline;
}
.input-actions .flex-row {
  display: flex;
  justify-content: space-between;
}
.input-actions button {
  width: 100%;
  font-size: 1.6em;
  margin-top: 1em;
  padding: 0.4em;
  color: white;
  border: none;
  border-radius: var(--corner-radius);
  cursor: pointer;
  background: #5E613D;
  background: radial-gradient(circle,rgba(94, 97, 61, 1) 0%, rgba(206, 189, 81, 1) 100%);
  background-size: 160% 130%;
  background-position: 30% 1em;
  transition: all 0.6s ease;
  box-shadow: inset -0.2em 0 1em -0.2em var(--ihsgca-green);
  text-shadow: 0 0 0.1em var(--ihsgca-dark-green);
}

.input-actions button:hover {
  text-shadow: 0 0.1em 0.025em var(--ihsgca-dark-green);
  background-position: -6em 6em;
  box-shadow: inset 0.2em 0.1em 2em 0.2em var(--ihsgca-green), 0 0 0 0.1em white, 0 0 0 0.125em var(--ihsgca-green);
}


/* ========================
   ======= TABLES
   ======================== */


main > table.ranking {
  margin: 2em auto 0;
}
table.ranking {
  border-collapse: collapse;
  counter-reset: rank;
  max-width: 96vw;
  min-width: 22em;
  color: #222;
}
table.ranking thead {
  position: sticky;
  top: 0;
  backdrop-filter: blur(0.3em);
}
table.ranking tr.table-title th{
  font-size: 2em;
  font-family: 'Bebas Neue';
}
table.ranking tr.table-title th,
table.ranking th select {
  letter-spacing: 0.02em;
  color: var(--ihsgca-green);
  text-shadow: -0.03em 0.04em 0.1em white;
}

table.ranking th a {
  color: inherit;
  text-decoration: none;
}

table.ranking th select {
  appearance: none;
  background: none;
  border:  none;
  font-family: inherit;
  font-size: inherit !important;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
}
table.ranking tr:hover th select {
  text-shadow: -0.03em 0.04em 0.15em var(--ihsgca-gold);
  color: var(--ihsgca-dark-green)
}
table.ranking tr.table-label th {
  color: var(--ihsgca-dark-green);
  padding-bottom: 1em;
  font-weight: 600;
}
table.ranking.results tr.table-title th {
  text-align: left;
  padding-left: 0.5em;
}
table.ranking:not(.results) thead tr.col-heads {
  background: radial-gradient(circle,var(--ihsgca-green) 20%, var(--ihsgca-gold) 100%);
  background-size: 240% 10%;
  background-position: 40% 10%;
}
table.ranking tr.col-heads th {
  color: white;
  font-size: 0.6em;
  font-weight: 300;
  text-transform: uppercase;
}
table.ranking:not(.vote) tr.col-heads th {
  background: var(--ihsgca-green);
  padding: 0.8em 0;
}
table.ranking.vote {
  height: 100%;
}
table.ranking.vote th.team-col {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.05em;
  font-size: 1.4em;
  text-align: center;
  line-height: 1.8em;
}
table.ranking.vote th.team-col span {
  font-size: 0.8em;
  cursor: pointer;
}
table.ranking th.rank-col {
  border-top-left-radius: var(--corner-radius);
}
table.ranking th.prev-col {
  border-top-right-radius: var(--corner-radius);
}
table.ranking tr.col-heads th.voter-col {
  text-transform: none;
  background: none;
  color: #222;
  position: relative;
  font-size: 0.7em;
  font-weight: 600;
}
table.ranking tr.col-heads th.voter-col span {
  position: absolute;
      left: 1em;
    bottom: -0.4em;
  transform: rotate(290deg);
  transform-origin: left;
  display: block;
  width: 8em;
  height: 1.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
table.ranking tbody {
  box-shadow: 0 0.6em 1.2em -0.2em rgba(0, 0, 0, 0.2);
}
table.ranking tbody td {
  background: #fff;
  padding: 0.1em 0.5em;
  border-bottom: 0.1rem solid #ccc;
  text-align: center;
  width: 2.5em;
}
table.ranking tbody tr:last-child td {
  border-bottom: none;
}
table.ranking tr {
  scroll-margin-bottom: 6em;
}
table.ranking tr .team-col {
    text-align: left;
    width: auto;
    white-space: nowrap;
}
table.vote td.rank-col:before {
    content: counter(rank);
    counter-increment: rank;
}
table.vote tr:nth-child(n+21) td.rank-col:before {
  content: '--';
}
td.team-col span.grab {
  color: #ccc;
}
td.team-col img,
td.logo-col img {
    height: 2em;
    width: 2em;
    margin: 0 0.5em;
    object-fit: contain;
    vertical-align: middle;
}
table.ranking.vote tfoot {
  position: sticky;
  bottom: 0;
}
table.ranking.vote tbody tr:hover {
  cursor: grab;
}

.prev-col.change-same {color: #aecdcd;}
.prev-col.change-up   {color: #4fa843;}
.prev-col.change-down {color: #b35570;}
.prev-col.change-new  {color: #e6c273;}

td.firsts-col,
td.points-col,
td.prev-col,
td.voter-col  {
    font-size: 0.8em;
}
:not(td.voter-col) + td.voter-col {
    box-shadow: inset 0.8em 0 1em -1.4em;
  border-left: 0;
}
td.voter-col {
    background-color: #f8f8f8;
  border-left: 1px solid #e6e6e6;
}
table.ranking tr:nth-child(n+21) td.voter-col {
    background-color: #ededed;
}
table.ranking tbody tr td {
  transition: background-position 0.2s;
  background-color: white;
  background-image: linear-gradient(white 50%, var(--ihsgca-light-gold));
  background-size: 100% 200%;
  background-position: 0 0;
}
table.ranking tbody tr:nth-child(n+21) td {
  border-bottom: 1px solid #c9C9C9;
  background-color: #f2f2f2;
  background-image: linear-gradient(#f2f2f2 50%, var(--ihsgca-light-gold));
}
table.ranking tbody tr:hover td,
table.ranking tbody tr:focus td {
  background-position: 0 55%;
}
table.ranking tbody tr.sortable-ghost td {
  background: none;
}

#ballot-trash.drag-target {
  background-color: var(--ihsgca-light-gold);
}
#ballot-trash.drag-over {
  color: white;
  background-color: var(--error-red);
}
#ballot-trash tr {
  display:none !important;
}



#ballot-placeholder svg {
  vertical-align: middle;
}
#ballot-placeholder td {
  font-style: italic;
  padding: 1em;
  text-align: left;
  vertical-align: top;
  color: var(--ihsgca-green);
}


table.ranking.vote tfoot td div {
  border-top: 1px solid var(--ihsgca-green);
  background-color: white;
  display: flex;
  padding: 1em 0.5em;
  gap: 0.6em;
}
table.ranking.vote tfoot button{
  border-width: 0;
  outline: none;
  border-radius: 0.6em;
  padding: 0.6em 1em;
  box-shadow: 0 0.05em 0.2em rgba(100, 100, 100, 0.4);
  overflow: hidden;
  color: var(--ihsgca-green);
  background-color: #f9f9f9;
  transition: all .3s;
  position: relative;
}
table.ranking.vote tfoot button.main-cta{
  flex-grow: 1;
  padding: 0.6em 2em;
  color: #f9f9f9;
  background-color: var(--ihsgca-green);
  display: flex;
  align-items: center;
  justify-content: space-around;
}
table.ranking.vote tfoot button.main-cta:hover {
  background-color: var(--ihsgca-dark-green);
}
table.ranking.vote tfoot button:hover,
table.ranking.vote tfoot button:focus {
  background-color: #e6e6e6;
}




dialog {
  opacity: 0;
  margin-top: 20vh;
  margin-inline: auto;
  transform: translateY(-20vh);
  max-height: 70vh;
  transition: all 0.3s;
  border: 0;
  position: relative;
  border-radius: 0.8em
}
dialog > span {
  cursor: pointer;
  position: absolute;
  top: 0.25em;
  right: 0.25em;
  transition: transform 0.3s;
}
#search-modal {
  background-color: transparent;
  padding-top: 2.5em;
  height: 70vh;
}
#search-modal > span {
  color: white;
}
dialog > span:hover {
  transform: scale(1.4);
}
dialog[open] {
  opacity: 1;
  transform: translateY(0);
  @starting-style {
    opacity: 0;
    transform: translateY(-20vh);
  }
}
dialog::backdrop {
  transition: all 0.3s;
  background-color: rgba(0, 0, 0, 0);
}
dialog[open]::backdrop {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(0.2em);
  @starting-style {
    background-color: rgba(0, 0, 0, 0);
  }
}
#team-search {
  padding: 1em;
  height: 2em;
  max-width: 30em;
  font-size: 1.4em;
  font-weight: 300;
  border: none;
  border-bottom: solid 0.25em white;
  transition: border 0.3s;
  border-radius: 0.5em;
}
#team-search,
.autoComplete_wrapper > ul {
  box-shadow: 0 0.1em 0.2em rgba(0, 0, 0, 0.8);
}
#team-search:focus {
  outline: none;
  border-bottom-color: var(--ihsgca-green);
}
.autoComplete_wrapper > ul {
  max-height: 50vh;
  overflow-y: scroll;
  padding: 0;
  list-style: none;
  border-radius: 0.6em;
  background-color: #fff;
  outline: none;
  transition: opacity 0.15s ease-in-out;
}
.autoComplete_wrapper > ul[hidden],
.autoComplete_wrapper > ul:empty {
  display: block;
  opacity: 0;
  transform: scale(0);
}
.autoComplete_wrapper > ul > p{
  margin: 0.5em 1em;
  font-size: 0.8em;
  color: var(--ihsgca-green);
}
.autoComplete_wrapper > ul > li {
  margin: 0.3em;
  padding: 0.3em 0.5em;
  text-align: left;
  border-radius: 0.4em;
  background-color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
}

.autoComplete_wrapper > ul > li mark {
  background-color: transparent;
  color: var(--ihsgca-gold);
  font-weight: bold;
}

.autoComplete_wrapper > ul > li:hover {
  cursor: pointer;
  background-color: var(--ihsgca-light-gold);
}

.autoComplete_wrapper > ul > li:hover mark{
  color: var(--ihsgca-green);
}

.autoComplete_wrapper > ul > li[aria-selected="true"] {
  background-color: #eaeaea;
}

#info-modal ul{
  margin: 0;
  list-style-type: none;
  padding: 0;
}


#info-modal li {
  margin-bottom: 2em;
}
#info-modal li i {
  padding-left: 4em;
}
#info-modal li span.material-symbols-outlined {
    vertical-align: middle;
    font-size: 2em;
    color: var(--ihsgca-green);
    border: 1px solid;
    padding: 0.2em;
}
