.srvnav-filterPanel {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.srvnav-filterGroup {
  margin-bottom: 8px;
}
.srvnav-filterGroup__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
  font-weight: 500;
}
.srvnav-filterGroup__chipRow {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.srvnav-chip {
  padding: 3px 10px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 140ms, border-color 140ms, color 140ms;
  position: relative;
  z-index: 2;
}
.srvnav-chip:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.srvnav-chip--active {
  background: rgba(192, 57, 43, 0.2);
  border-color: #c0392b;
  color: #fff;
  font-weight: 500;
}
.srvnav-chip--dead,
.srvnav-chip--dead.srvnav-chip--active {
  background: #000;
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  font-weight: normal;
  cursor: not-allowed;
}
.srvnav-chip--dead:hover {
  background: #000;
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.4);
}
.srvnav-chip > * {
  pointer-events: none;
}
.srvnav-chip__flag {
  width: 16px;
  height: 12px;
  display: block;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}
.srvnav-filterStatus {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.srvnav-filterStatus__resetBtn {
  padding: 2px 8px;
  font-size: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.srvnav-filterStatus__resetBtn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.srvnav-serverItem__flag {
  width: 18px;
  height: 13px;
  display: inline-block;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 8px;
  vertical-align: middle;
}
.srvnav-serverItem.srvnav-hidden {
  display: none !important;
}
.btn-server.srvnav-serverItem {
  transform-origin: top left;
  opacity: 0;
  animation: srvnavCardFanIn 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--srvnav-index, 0) * 45ms);
}
@keyframes srvnavCardFanIn {
  0% { opacity: 0; transform: translateY(-22px) translateX(-8px) rotate(-7deg) scale(0.96); }
  60% { opacity: 1; transform: translateY(2px) translateX(1px) rotate(0.5deg) scale(1.005); }
  100% { opacity: 1; transform: translateY(0) translateX(0) rotate(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-server.srvnav-serverItem {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.dropdown-submenu {
  position: relative;
}
.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}
.dropdown-submenu > a:after {
  display: block;
  content: ' ';
  float: right;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
  border-width: 5px 0 5px 5px;
  border-left-color: #cccccc;
  margin-top: 5px;
  margin-right: -10px;
}
.dropdown-submenu:hover > a:after {
  border-left-color: #999999;
}
.dropdown-submenu > .dropdown-item:focus {
  background-color: rgba(0, 0, 0, 0);
  color: white;
}
.dropdown-submenu > .dropdown-item:focus:hover {
  background-color: rgba(0, 0, 0, 0);
  color: red;
}
.dropdown-item-text {
  display: block;
  padding: 0.375rem 1.5rem;
  margin-bottom: 0;
  font-size: 0.875rem;
  color: #6c757d;
  white-space: nowrap;
}

#tableItem.statusAdmin { color: #df0101; }
#tableItem.statusMain { color: #6498e1; }
#tableItem.statusFree { color: #ffffff; }

#servercards-ranking {
  max-width: 208px;
  margin: 0 auto;
}
/* One card in the 286px strip: cards.css forces four columns (three, two, one by viewport) on every
   .wsc-cards .wsc-grid for the servers page; the strip carries .wsc-cards only for the theme variables. */
#servercards-ranking.wsc-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}
#servercards-ranking .wsc-card,
#servercards-ranking .wsc-card:hover,
#servercards-ranking .wsc-card:focus-within {
  border-width: 2px;
  border-color: rgba(0, 0, 0, 0.9);
  box-shadow: none;
}
#servercards-ranking .wsc-actions--primary {
  order: 99;
}

.medal-wrap-panel {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  padding: 0 100px 100px 50px;
}
.medal-wrap-panel .medal-wrap-item {
  flex: 0 1 auto;
  position: relative;
}
.hover-box {
  text-decoration: none;
  color: black;
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  border: 5px solid black;
  background-color: black;
  transition: border-color 1s, background-color 0.5s;
}
.hover-box img {
  height: auto;
  display: block;
}
.hover-box:hover {
  z-index: 10;
  border-radius: 50%;
  border: 5px solid white;
  background-color: white;
  transition: border-color 1s, background-color 0.5s;
}
.hover-box::after {
  content: attr(data-text);
  position: absolute;
  display: none;
  background-color: black;
  border: 5px solid white;
  color: white;
  padding: 10px;
  white-space: pre;
  left: 90%;
  top: 20%;
  transform: translateY(-50%);
  z-index: 1;
  min-width: 200px;
}
.hover-box:hover::after {
  display: block;
}
.bigranking-heading {
  padding: 20px;
}
.bigranking-name {
  padding: 20px;
  text-align: left;
}
.bigranking-spacer {
  color: rgba(255, 255, 255, 0.01);
}
.bigranking-spacer--dark {
  color: rgba(0, 0, 0, 0.01);
}
.bigranking-tag {
  color: white;
}
.bigranking-tag img {
  height: 96px;
}
.bigranking-for {
  position: relative;
  font-style: italic;
  font-size: smaller;
  color: rgba(255, 255, 255, 0.5);
}
.bigranking-link:hover {
  border: 5px solid white;
  transition: border-color 1s, background-color 0.5s;
}
.absolute-heading {
  padding: 20px 50px;
  font-size: 3em;
  color: white;
  z-index: 10;
}
.history-empty {
  font-size: 1.2em;
  font-style: italic;
}
#main.history-main {
  min-width: 1140px;
}
.history-box {
  background: var(--backgroundcolor);
  border-radius: 20px;
  margin-top: 40px;
  color: white;
}

.medals-per-line {
  position: absolute;
  right: 200px;
  top: 80px;
  z-index: 20;
  text-align: center;
  white-space: nowrap;
  padding: 10px;
}
.medals-per-line label,
.medals-per-line input {
  display: block;
  margin: 0 auto 10px;
  text-align: center;
}
.medalslider {
  -webkit-appearance: none;
  width: 100%;
  height: 15px;
  border-radius: 5px;
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.medalslider:hover {
  opacity: 1;
}
.medalslider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #4caf50;
  cursor: pointer;
}
.medalslider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #4caf50;
  cursor: pointer;
}

/* phones: the history page in the width of the phone; heading and name wrap, the medal control under the name */
@media (max-width: 575.98px) {
  #main.history-main {
    min-width: 0;
  }
  .bigranking-heading {
    font-size: 1.6rem;
    padding: 15px;
  }
  .bigranking-name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.4em;
    padding: 15px;
    font-size: 1.6rem;
  }
  .bigranking-spacer {
    display: none;
  }
  .bigranking-for {
    order: -1;
    position: static;
  }
  .bigranking-name > a:last-child {
    flex-basis: 100%;
  }
  .bigranking-tag img {
    height: 64px;
  }
  .medals-per-line {
    position: static;
    padding: 0 15px 15px;
  }
  .absolute-heading {
    padding: 15px;
    font-size: 1.6em;
  }
  .medal-wrap-panel {
    padding: 0 15px 30px;
  }
  .medal-wrap-panel .medal-wrap-item {
    max-width: 100%;
  }
}
