* {
  font-family: arial;
  --color1: #ffffff;
  --color2: #fcc79c;
}

#map {
  height: 100%;
}

img {
  -webkit-user-drag: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: rgb(225, 225, 225);
}


@keyframes hoverHazard {
  0% {
    background-position: 28px 0px;
  }
}

@keyframes diagonalUp {
  0% {
    background-position: 0px 0px;
  }
  100% {
    background-position: 36px -24px;
  }
}

@keyframes slideRight {
  0% {
    background-position: 0px 0px;
  }
  100% {
    background-position: 20px 0px;
  }
}

.hazard-hover {
  background-size: calc(20px/sin(45deg)) 100%;
  background-image: repeating-linear-gradient(45deg, var(--color1), var(--color1) 10px, var(--color2) 10px, var(--color2) 20px);
  animation: hoverHazard 1.0s linear 0.0s infinite;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  flex-direction: row;
  pointer-events: none;

  & .searchbar {
    float: left;
    width: 0px;
    display: none;
    
    & .searchbox {
      width: 390px;
      height: 500px;
      margin: 5px;
      background-color: white;
      position: absolute;
      bottom: 0;
      pointer-events: all;
      min-width: 390px;
      overflow-y: scroll;

      & .search-result-holder {
        /* width: calc(100% - 20px); */
        height: 430px;
        margin: 10px;
        /* padding-bottom: 100px; */
      }

      & .search-bobber {
        height: 80px;
      }

      & .search-result {
        display: flex;
        cursor: pointer;

        &:hover {
          color: white;
          text-shadow: 1px 1px 2px black, 1px 1px 2px black;
          outline-style:inset;
          outline-color: #fcc79c;
          outline-offset: -3px;
          outline-width: 3px;
        }

        & .text {
          display: flex;
          margin: 3px;
          align-items: center;
        }

        & img {
          width: 30px;
          height: 40px;
          margin: 5px;
          object-fit: cover;
          position: relative;
        }
      }

      & .search-input {
        width: 370px;
        height: 30px;
        margin: 10px;
        bottom: 0;
        position: fixed;
        

        & input {
          height: 20px;
          width: 343px;
        }
      }

      & .search-filter {
        display: flex;
        align-items: center;
        cursor: pointer;

        &:hover {
          outline-style:inset;
          outline-color: #fcc79c;
          outline-offset: -3px;
          outline-width: 3px;
        }

        & .text {
          max-width: 250px;
          user-select: none;
        }

        & .checkbox {
          width: 15px;
          height: 15px;
          filter: brightness(0);
          content: url("images/CheckboxInactive.png");
          padding: 8px;
        }

        &:hover .checkbox {
          filter: brightness(1.0) drop-shadow(3px 3px 3px black);
        }

        &[data-filterset="true"] .checkbox {
          content: url("images/CheckboxActive.png");
          filter: drop-shadow(0px 0px 5px rgb(0, 0, 0, 1)) brightness(0) saturate(100%) invert(58%) sepia(28%) saturate(5830%) hue-rotate(354deg) brightness(105%) contrast(102%);
        }

        &:hover[data-filterset="false"] .text {
          color: white;
          text-shadow: 1px 1px 2px black, 1px 1px 2px black;
        }

        &[data-filterset="true"] .text {
          filter: drop-shadow(0px 0px 5px rgb(0, 0, 0, 1)) brightness(0) saturate(100%) invert(58%) sepia(28%) saturate(5830%) hue-rotate(354deg) brightness(105%) contrast(102%);
        }

        &:hover {
          & .close {
            outline-style: solid;
            outline-color: grey;
            outline-offset: -1px;
            outline-width: 1px;
          }
        }

        & .close {
          cursor: pointer;
          padding: 4px;
          margin: 8px;
          position:absolute;
          right: 0px;
          height: 25px;

          &:hover {
            outline-style: solid;
            outline-color: #fcc79c;
            outline-offset: -2px;
            outline-width: 2px;
          }

          & img {
            filter: brightness(0.3);
            width: 25px;
            height: 25px;
          }
        }

        & .game-image {
          width: 30px;
          height: 40px;
          padding: 4px;
          object-fit: cover;
        }
      }
    }

    &.active {
      width: 400px;
      display: flex;
    }
  }

  .filterbar {
    float: left;
    position: relative;
    width: 90px;
    height: 100%;
    background: var(--color1);
    /* background: repeating-linear-gradient(30deg, var(--color1), var(--color1) 3px, var(--color2) 3px, var(--color2) 20px); */
    /* background-color: linear-gradient() */
    flex-direction: column;
    pointer-events: all;
    box-shadow: 5px 0px 5px rgba(0, 0, 0, 0.1);
    z-index: 3;
    overflow: hidden;

    .filter-title {
      margin: 0px;
      margin-top: 5px;
      margin-bottom: 5px;
      letter-spacing: 3px;
      color: rgb(121, 120, 120);
      font-size: 18px;
      font-weight: bolder;
      text-align: center;
      user-select: none;

      &.active {
        filter: drop-shadow(0px 0px 10px rgb(0, 0, 0, 1)) brightness(0) saturate(100%) invert(58%) sepia(28%) saturate(5830%) hue-rotate(354deg) brightness(105%) contrast(102%);
      }
    }

    & .filter-button {
      display: flex;
      width: 80px;
      height: 60px;
      padding: 5px;
      align-items: center;
      cursor: pointer;

      &:hover {
        /* background-size: calc(20px/sin(45deg)) 100%;
        background-image: repeating-linear-gradient(45deg, var(--color1), var(--color1) 10px, var(--color2) 10px, var(--color2) 20px);
        animation: hoverHazard 1.0s linear 0.0s infinite; */
        outline-width: 5px;
        outline-color: #fcc79c;
        outline-style: inset;
        outline-offset: -5px;
      }

      & .icon {
        width: 60px;
        height: 60px;
        filter: brightness(0.5);
        object-fit:contain;
      }

      &:hover .icon {
        filter: brightness(1.0) drop-shadow(3px 3px 3px black);
      }

      & .checkbox {
        width: 15px;
        height: 15px;
        filter: brightness(0.5);
        content: url("images/CheckboxInactive.png");
      }
      &:hover .checkbox {
        filter: brightness(1.0) drop-shadow(3px 3px 3px black);
      }

      &[data-filterset="true"] .checkbox {
        content: url("images/CheckboxActive.png");
      }
      
      &[data-filterset="true"] {
        &:nth-child(2n + 1) {
          & .icon {
            filter: drop-shadow(0px 0px 10px rgb(0, 0, 0, 1)) brightness(0) saturate(100%) invert(58%) sepia(28%) saturate(5830%) hue-rotate(354deg) brightness(105%) contrast(102%);
          }

          & .checkbox {
            filter: drop-shadow(0px 0px 2px rgb(0, 0, 0, 1)) brightness(0) saturate(100%) invert(58%) sepia(28%) saturate(5830%) hue-rotate(354deg) brightness(105%) contrast(102%);
          }
        }
        &:nth-child(2n) {
          & .icon {
            filter: drop-shadow(0px 0px 10px rgb(0, 0, 0, 1)) brightness(0) saturate(100%) invert(78%) sepia(51%) saturate(4044%) hue-rotate(352deg) brightness(101%) contrast(102%);
          }

          & .checkbox {
            filter: drop-shadow(0px 0px 2px rgb(0, 0, 0, 1)) brightness(0) saturate(100%) invert(78%) sepia(51%) saturate(4044%) hue-rotate(352deg) brightness(101%) contrast(102%);
          }
        }
      }


      &[data-filterid="33945"] .icon {
        width: 50px;
        height: 50px;
        padding: 5px;
      }
    }
    
    .search-button {
      bottom: 0;
      position: absolute;
      display: flex;
      padding: 5px;
      padding-top: 10px;
      padding-bottom: 10px;
      width: 80px;
      cursor: pointer;
      box-shadow: 0px 10px 10px 10px rgba(0, 0, 0, 0.302);
      background-color: white;


      &.active img {
        filter: drop-shadow(0px 0px 10px rgb(0, 0, 0, 1)) brightness(0) saturate(100%) invert(78%) sepia(51%) saturate(4044%) hue-rotate(352deg) brightness(101%) contrast(102%);
      }

      &:hover {
        background-size: 20px 24px;
        background-image: url("images/ExpandArrow.png");
        animation: slideRight 12.0s linear 0.0s infinite;
        color: white;
        text-shadow: 1px 1px 2px black, 1px 1px 2px black;
        outline-style:inset;
        outline-color: #fcc79c;
        outline-offset: -3px;
        outline-width: 3px;
      }

      &.extended:hover {
        background-size: 20px 20px;
        background-image: url("images/CloseArrow.png");
        animation: none;
      }

      img {
        width: 60px;
        height: 60px;
        outline-width: 10px;
        display: flex;
        filter: brightness(0.4);
        margin: 0px 10px;
      }
      &:hover img {
        filter: brightness(1.0) drop-shadow(1px 1px 3px black);
      }
    }
  }

  .infobar {
    float: left;
    position: relative;
    width: 420px;
    height: 100%;
    background-color: rgb(250, 250, 250);
    flex-direction: column;
    transition: all 0.3s ease-out;
    display: none;
    pointer-events: all;
    

    &.active {
      display: flex;
    }

    & .banner img {
      display: flex;
      width: 420px;
      height: 210px;
      object-fit: cover;
    }

    & .moneyshot {
      display: flex;
      cursor: pointer;

      &:hover {
        background-size: 12px 12px;
        background-image: url("images/LinkArrow2.png");
        animation: diagonalUp 12.0s linear 0.0s infinite;
        color: white;
        text-shadow: 1px 1px 2px black, 1px 1px 2px black;
        outline-style:inset;
        outline-color: #fcc79c;
        outline-offset: -3px;
        outline-width: 3px;
      }

      & .profile {
        display: flex;
        align-items: center;

        & img {
          width: 100px;
          height: 100px;
          border-radius: 3px;
          margin: 10px; 
          object-fit:cover;
        }
      }

      & .title {
        margin: 10px;
        font-size: 20px;
        display: flex;
        align-items: center;

        img {
          width: 15px;
          height: 15px;
          margin: 4px;
        }
      }
    }

    & .address {
      display: flex;
      align-items: center;
      font-size: 15px;
      padding: 4px;
      margin-left: 0px;
      cursor: pointer;

      &:hover {
        background-size: 12px 12px;
        background-image: url("images/LinkArrow2.png");
        animation: diagonalUp 12.0s linear 0.0s infinite;
        color: white;
        text-shadow: 1px 1px 2px black, 1px 1px 2px black;
        outline-style:inset;
        outline-color: #fcc79c;
        outline-offset: -3px;
        outline-width: 3px;
      }

      & img {
        width: 15px;
        height: 15px;
        margin: 4px;
      }
    }

    & .date {
      display: flex;
      align-items: center;
      font-size: 15px;
      padding: 4px;
      margin-left: 0px;
      padding-bottom: 12px;

      & .text {
        transform: translateY(1.5px);
      }

      & img {
        width: 15px;
        height: 15px;
        margin: 4px;
      } 
    }

    & .events-label {
      display: flex;
      align-items: center;
      flex-direction: row;
      width: 400px;
      padding: 10px;
      /* padding-top: 15px; */
      border-top: 1px solid black;
      border-bottom: 1px solid grey;
      cursor: pointer;

      &:hover {
        background-size: 12px 12px;
        background-image: url("images/LinkArrow2.png");
        animation: diagonalUp 12.0s linear 0.0s infinite;
        color: white;
        text-shadow: 1px 1px 2px black, 1px 1px 2px black;
        outline-style:inset;
        outline-color: #fcc79c;
        outline-offset: -3px;
        outline-width: 3px;
      }

      &:hover .entrant-count {
        outline-width: 1px;
        outline-offset: -1px;
        outline-color: rgb(197, 197, 197);
        outline-style: solid;
        background-color: white;
      }

      & .entrant-count {
        position: absolute;
        right: 0px;
        padding: 5px;
        margin: 5px;
        /* border-radius: 3px; */
        cursor: pointer;
        align-items: center;
        text-shadow: none;
        color: black;
        display: flex;

        &:hover {
          color: white;
          text-shadow: 1px 1px 2px black, 1px 1px 2px black;
          outline-color: #fcc79c;
          outline-width: 2px;
          outline-style: solid;
          outline-offset: -2px;
          /* background-color: lightgray; */
        }


        & img {
          filter: brightness(0.6);
          width: 12px;
          margin-right: 10px;
        }

        &:hover img {
          filter: brightness(0.3);
        }
      }
    }

    & .events-holder {
      overflow-x: hidden;
      overflow-y: auto;
      scrollbar-width: thin;
      & .event {
        align-items: center;
        display: flex;
        cursor: pointer;
        padding: 3px;

        &:hover {
          background-size: 12px 12px;
          background-image: url("images/LinkArrow2.png");
          animation: diagonalUp 12.0s linear 0.0s infinite;
          color: white;
          text-shadow: 1px 1px 2px black, 1px 1px 2px black;
          outline-style:inset;
          outline-color: #fcc79c;
          outline-offset: -3px;
          outline-width: 3px;
        }

        & img {
          width: 30px;
          height: 40px;
          padding: 5px;
          object-fit: cover;
        }
      }

      & .info {
        flex-direction: column;
      }

      & .game {
        font-size: 12px;
      }
    }

    & > .title {
      padding: 10px;
      padding-left: 5px;
      font-size: 30px;
    }

    & .tournament {
      display: flex;
      align-items: center;
      padding-left: 3px;
      height: 36px;
      cursor: pointer;

      &:hover {
        background-size: 20px 24px;
        background-image: url("images/ExpandArrow.png");
        animation: slideRight 12.0s linear 0.0s infinite;
        color: white;
        text-shadow: 1px 1px 2px black, 1px 1px 2px black;
        outline-style:inset;
        outline-color: #fcc79c;
        outline-offset: -3px;
        outline-width: 3px;
      }

      & img {
        padding: 3px;
        width: 30px;
        height: 30px;
      }

      & .title {
        font-size: 15px;
        padding: 5px;
      }
    }
  }
}

.marker {
  --angle: 0deg;
  --icon-x: 0px;
  --icon-y: -17px;
  --text-x: 13px;
  --text-y: -13px;
  --text-highlighted-x: 13px;
  --text-highlighted-y: -17px;
  --text-x-percent: 0%;
  --text-y-percent: 50%;
  --pin-width: 25px;


  & .pin {
    transform-origin: 50% 100%;
    transform: translate(-50%, -100%) rotate(var(--angle));
    position: absolute;

    &.hidden {
      display: none;
    }

    &.hidden.highlight {
      display: flex;
    }

    & .background {
      content: url("images/PinSmall.png");
      width: var(--pin-width);
      display: flex;
    }
  }

  &:hover {
    filter: brightness(0.8);
  }

  &.highlight .pin .background {
    content: url("images/PinSelected2.png");
    width: 22px;
  }

  & .icon {
    width: 22px;
    position: absolute;
    transform: translate(-50%, -50%) translate(var(--icon-x), var(--icon-y)) translateX(-0.1px); /* I STG it makes a difference */
    /* filter: brightness(0%); */
  }   


  &.highlight .icon {
    display: none;
  }

  & .nametag {
    position: absolute;
    transform: translate(var(--text-x-percent), var(--text-y-percent)) translate(var(--text-x), var(--text-y));
    color: #c98d01;
    text-wrap: nowrap;
    text-shadow: 1px 0 #fff, -1px 0 #fff, 0 1px #fff, 0 -1px #fff,
             1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
  }

  &.highlight .nametag {
    transform: translate(var(--text-x-percent), var(--text-y-percent)) translate(var(--text-highlighted-x), var(--text-highlighted-y));
  }

  & .pingroup {
    position: absolute;
    background-color: #e46c3488;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.501);
    color: white;
    width: 25px;
    height: 25px;
    translate: -50% -50%;
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center;
    font-weight: bold;

    &:hover {
      background-color: #e46c34FF;
      width: 30px;
      height: 30px;
      border-color: white;
    }

    &.precise {
      border-radius: 0px;
    }

    & .indicator {
      display: none;
    }

    &.contains-selected .indicator {
      display: inline;
      position: absolute;
      width: 40px;
      height: 40px;
    }

    &:hover.contains-selected .indicator {
      width: 45px;
      height: 45px;
    }

    & .count {
      position: absolute;
      transform: translate(-50%, -50%) translate(-5px, 0px);
      color: white;
      font-size: 10px;
      letter-spacing: 3px;
    }
  }
}

.map-buttons {
  position: absolute;
  right: 0;


}

.se {
  display: none;
}

.about-doc {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;

  & .center-bar {
    width: 700px;
    background-color: white;
    justify-content: center;
    margin: 50px;
    display: grid;
    box-shadow: 2px 7px 10px rgba(0, 0, 0, 0.551);

    & .header {
      width: 100%;
      display: flex;
      align-items: center;
      background: linear-gradient(90deg, rgb(192, 192, 242), rgb(142, 142, 234));
      padding-top: 20px;
      padding-bottom: 20px;
      
      & .text {
        font-weight: bold;
        font-size: 65px;
        margin: 15px;
        color: white;
        -webkit-text-stroke: 3px #ea9800;
      }

      & .icon {
        width: 80px;
      }
    }

    & h1 {
      margin: 15px;
      margin-bottom: 0px;
      color: rgb(45, 45, 45);
    }

    & p {
      margin: 15px;
      color: rgb(96, 96, 96);
    }
  }
}