:root {
    --primary: hsl(244, 29%, 10%);
    /* hsl(245, 30%, 10%); */
    --secondary: hsl(245, 30%, 20%);
    --tertiary: hsl(245, 30%, 34%);
    --highlights: hsl(245, 80%, 70%);
  
    --buttons: hsl(245, 15%, 40%);
    --buttons-hover: hsl(245, 13%, 50%);
    --buttons-active: hsl(245, 13%, 55%);
  
    --text: hsl(245, 2%, 80%);

    /* --card-hover-color: hsla(0, 0, 100%, 100%); */
    --card-hover-color: hsl(0, 0, 100%);
  
    --card-width: 5.5rem;
    --card-height: 6.8rem;
    --bust-size: var(--card-width);
    --icon-size: 1.5rem;
    --icon-size-small: 1rem;
  
    --card-count-x: 9;
  
    --filter-btn-size: 2rem;
  
    --content-height: calc(100vh - 7.5rem);
    --wheel-size: 60%;
    --wheel-center-size: 10%;
    --wheel-clicker-size: 14%;
    --wheel-clicker-offset: 2%;

    --mobile: 0;
  }
  
  * {
    -webkit-user-drag: none;
    user-select: none;
  
  }

  #select-reset {background-image: url("/assets/img/filter/reset.webp");}
  
  html {
    font-size: 14px;
    overflow: hidden;
  }
  
  @media (min-width: 768px) {
    html {
      font-size: 16px;
    }
  }
  
  html {
    position: relative;
    min-height: 100%;
  }
  
  body {
    margin-bottom: 60px;
    background-color: var(--primary);
    color: var(--text);
  }
  
  header nav {
    background-color: var(--secondary);
  }
  
  a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
    font-weight: bold;
  }
  
  a {
    color: #0077cc;
  }
  
  .btn-primary {
    color: var(--highlights);
    background-color: #1b6ec2;
    border-color: #1861ac;
  }
  
  .nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: var(--highlights);
    background-color: #1b6ec2;
    border-color: #1861ac;
  }
  
  .border-bottom.navbar-dark{
      border-bottom: 1px solid var(--highlights)!important;
  }
  
  .box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
  }
  
  button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
  }
  
  .footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
  }
  
  .hidden {
    display: none!important;
  }
  
  main {
    display: flex;
  }
  
  #character-form {
    width: min-content;
  }
  
  #character-filter {
    flex-direction: column;
    display: flex;
    background-color: var(--secondary);
    margin: 2rem;
    margin-right: 0;
    padding: 1rem;
    padding-right: .5rem;
    border-radius: 16px;
    overflow: hidden;
    height: var(--content-height);
  }
  
  .wheel-container {
    flex-grow: .5;
    width: 25%;
    max-width: 800px;
    height: auto;
    align-content: center;
    margin: 0 auto;
  }
  
  #wheel-wrapper {
    position: relative;
    top: 0;
    left: 0;
    aspect-ratio: 1;
  }
  
  #wheel-center {
    display: none;
    position: absolute;
    top: calc((var(--wheel-center-size) / 2) * -1);
    bottom: 0;
    right: 0;
    left: 0;
    width: var(--wheel-center-size);
    height: var(--wheel-center-size);
    /* margin-inline: auto; */
    /* align-self: center; */
    aspect-ratio: 1;
    background-color: magenta;
    border-radius: 50%;
    pointer-events: none;
    
  }
  
  #wheel-clicker {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    margin-inline: auto;
    height: var(--wheel-clicker-size);
    margin-top: calc(var(--wheel-clicker-offset) - var(--wheel-clicker-size));
    aspect-ratio: .25;
    pointer-events: none;
    background-color: var(--tertiary);
    clip-path: polygon(50% 100%, 0 50%, 100% 50%);
  }
  
  #victory {
    cursor:default;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    margin-inline: auto;
    align-self: center;
    width: 24rem;
    aspect-ratio: 2;
    background-color: var(--secondary);
    border: 4px solid var(--highlights);
    border-radius: 18px;
    text-align: center;
    align-content: center;
    font-size: 24px;
  }
  
  #victory .icon-bust {
    background-color: transparent;
    filter: drop-shadow(0 0 1.4rem var(--highlights));
  }
  
  #character-wheel {
    cursor: pointer;
    display: inline-block;
    position: relative;
    height: 100%;
    width: min-content;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 50%;
    filter: blur(.25px);
  }
  
  .btn {
      background-size:80%;
      background-position: center;
      background-repeat: no-repeat;
  
      height: var(--filter-btn-size);
      width: var(--filter-btn-size);
      outline: none;
      border: none;

      margin-right: 1px;
      background-color: var(--buttons)!important;
      transition: none;
  
      opacity: 1;
  }
  
  .btn:hover {
      background-color: var(--buttons-hover)!important;
      color: white;
  }
  .btn:active {
    background-color: var(--buttons-active) !important;
    color: var(--text);
  }
  
  .btn input {
      cursor: pointer;
      display: none;
  }
  
  .btn:has(input[type="checkbox"]:not(:checked)) {
      opacity: 0.25;
  }
  
  .filter-options {
      justify-content: center;
      margin-bottom: .5rem;
  }
  
  .btn-spacer {
      width: 1px;
      height: var(--filter-btn-size);
      margin: 0 .75rem;
      border-left: 1px solid var(--highlights);
  }
  
  .btn-text {
      opacity: 1;
      color: var(--text);
      width: auto;
      line-height: 1rem;
      text-align: center;
  }
  
  .btn-text:active {
      opacity: .25;
  }
  
  #selection-view {
      display: grid;
      overflow-x: hidden;
      overflow-y: scroll;
      height: calc(100% - 2rem);
      max-height: calc(100% - 3rem);
      min-width: calc(var(--card-count-x) * (var(--card-width) + 10px) + .5rem);
      min-height: 0;
      padding-right: .5rem;
      grid-template-columns: repeat(var(--card-count-x), 1fr);
      /* grid-template-rows: repeat(auto, 1fr); */
      /* grid-template-rows: 1fr min-content; */
      grid-auto-rows: min-content;
      grid-column-gap: 5px;
      grid-row-gap: 5px;
  }
  
  .character-card {
      display: inline;
      width: var(--card-width);
      height: var(--card-height);
      border-radius: 6px;
      cursor: pointer;
      transition: opacity 0.05s linear;
      overflow: hidden;
  }
  
  .character-card input {
      display: none;
  }
  
  
  .character-card:has(input:not(:checked)) {
      opacity: 0.25;
  }
  
  .icon-bust {
      width: var(--bust-size);
      height: var(--bust-size);
  }
  
  .character-icons {
      display: inline;
      position: relative;
      width: var(--bust-size);
      height: var(--bust-size);
  }

  .small-icon {
    display: block;
    /* float:left; */
    float:inline-start;
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: 2rem;
    padding: .1rem;
    background-color: var(--secondary);
    margin-top: calc(var(--bust-size) * -1);
  }
  
  .icon-element {
    margin-left: calc(var(--bust-size) - var(--icon-size));
    width: var(--icon-size);
    height: var(--icon-size);
  }

  .element-list {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: var(--icon-size-small);
    margin-left: calc(var(--bust-size) - var(--icon-size-small));
    padding: 0;
    height: auto;
    list-style: none;
    justify-content: center;
  }

  .element-icon {
    margin: none!important;
    display: flex;
    padding: .1rem;
    width: var(--icon-size-small);
    height: var(--icon-size-small);
  }
  
  .icon-weapon {
    margin-top: calc(var(--icon-size) * -1);
  }
  
  .character-title {
    /* display: ; */
    color: white;
    position: relative;
    font-size: .85rem;
    width: calc(var(--card-width) - .1rem);
    --calc-card-height-min-card-width: calc(var(--card-height) - var(--card-width));
    height: var(--calc-card-height-min-card-width);
    line-height: var(--calc-card-height-min-card-width);
    overflow: hidden;
    padding: 0 .2rem;
    text-wrap: nowrap;
    text-align: center;
    text-decoration: none;
    text-overflow:ellipsis;
  }
  
  .disabled {
    opacity: .5;
  }
  
  ::-webkit-scrollbar-track {
    border-radius: 10px;
    background-color: #0003;
  }
  
  ::-webkit-scrollbar {
    position: absolute;
    margin: 10px;
    width: 8px;
  }
  
  ::-webkit-scrollbar-thumb {
    background-color: #0007;
    border-radius: 10rem;
  }
  
  .grow {
    transition: transform 500ms ease-in-out;
  }
  
  .btn-tooltip {
    position: absolute;
    top: -4px;
    width: max-content;
    height: 18px;
    background-color: var(--tertiary);
    color: #fff;
    text-align: center;
    /* position: absolute; */
    text-wrap: nowrap;
    font-size: 14px;
    padding: 5px 4px;
    margin: 0 auto;
    border-radius: 6px;
    /* left: 0;
    top: 0; */
    opacity: 1 !important;
  }

.arrow, .arrow::before {
  position: absolute;
  width: 8px;
  height: 8px;
  background: inherit;
}

.arrow {
  visibility: hidden;
}

.arrow::before {
  visibility: visible;
  content: '';
  transform: rotate(45deg);
}
  
  input {
    filter: none!important;
  }

  .not-affiliated {
    right: 10px;
    color: hsla(0, 0%, 100%, 0.5);
    font-size: 10px;
    text-align: end;
  }

  .nav-text {
    font-size: small;
  }

  @media (pointer: coarse)  {
    :root {
      --card-width: 4rem;
      --card-height: 4.8rem;
      --bust-size: var(--card-width);
      --icon-size: 1.2rem;
    
      --card-count-x: 6;
    
      --filter-btn-size: 1.6rem;
    
      --content-height: calc(100vh - 7.5rem);
      --wheel-size: 60%;
      --wheel-center-size: 10%;
      --wheel-clicker-size: 14%;
      --wheel-clicker-offset: 2%;

      --mobile: 1;
    }

    html {
      overflow-y: scroll;
      scrollbar-width: 0;
    }

    main {
      display: grid;
    }

    .wheel-container {
      order: -1;
    }

    #character-form {
      width: 100vw
    }
    
    #character-filter {
      flex-direction: column;
      display: flex;
      background-color: var(--secondary);
      margin: 0;
      padding: 1rem;
      padding-right: .5rem;
      border-radius: 16px;
      overflow: hidden;
      height: var(--content-height);
    }

    #selection-view {
      display: grid;
      overflow-x: hidden;
      overflow-y: scroll;
      height: calc(100% - 2rem);
      max-height: calc(100% - 3rem);
      min-width: calc(var(--card-count-x) * (var(--card-width) + 3px) + .25rem);
      min-height: 0;
      grid-template-columns: repeat(var(--card-count-x), 1fr);
      grid-auto-rows: min-content;
      grid-column-gap: 5px;
      grid-row-gap: 5px;
    }
    
    ::-webkit-scrollbar {
      display: none;
      margin: 0;
      width: 0;
    }

    .wheel-container {
      width: 100vw;
      margin-top: 1.2rem;
      padding: 1rem;
    }
  }