.js-alert {
  transition: padding .4s;
  overflow: hidden;
}
.js-alert > div {
  transition: height .4s;
}
.border-white-50 {
  border: 1px solid rgba(255,255,255,.5) !important;
}
dialog {
  border-width: 1px;
  max-width: calc(100% - 2em);
}
dialog::backdrop {
  background: rgba(0,0,0,0.75);
}
/* when keyboard active pin modal to bottom of page to keep all fields and save button visible */
dialog#edit-item:has(input:focus, textarea:focus) {
  margin: auto auto 1em;
}
/* when group button is selected */
/* .group-btn:has(input[type="radio"]:checked) { */
input[type="radio"]:checked + .group-btn, input[type="radio"]:hover + .group-btn {
  background-color: #fff;
  color: #000;
  text-shadow: none;
  svg {
    filter: none;
  }
}
/* glowing text */
.text-glow, .link-glow {
  color: var(--glow);
  /* text-shadow: var(--glow-shadow); */
  /* text-shadow: 0 0 5px cyan, 0 0 15px cyan; /* pretty close to the anime, just need a better tint */
  text-shadow: var(--glow-soft) /* really close to the anime */
}
/* for glowing text inside text field */
.text-glow::placeholder {
  text-shadow: none;
}
/* for things that have to be extra bold */
h2.text-glow, .text-glow h2 {
  color: #faf9fa;
  text-shadow: var(--glow-hard);
}
/* for links that look like buttons, inside of containers with text-glow class */
.text-glow .btn:hover, .text-glow input[type=submit]:hover {
  text-shadow: none;
}
/* for links that look like buttons */
a.text-glow:hover {
  text-shadow: none;
}
/* for links that do not look like buttons */
a.link-glow:hover {
  color: white;
  font-weight: bold;
  text-decoration: none;
  /* text-shadow: none; */
}
/* transparent elements */
.bg-glass {
  background: hsla(220, 100%, 8%, 75%) !important;
}
/* glowing shadow */
.box-glow {
  box-shadow: 0 0 0.5em hsl(190, 100%, 50%), 0 0 0.1em hsl(190, 100%, 50%);
}
.bold {
  font-weight: bold;
  color: #faf9fa;
  text-shadow: var(--glow-hard);
}
/* habits#edit weekday buttons, rm text-shadow when selected */
.btn-group-toggle .btn:has(input:checked) {
  text-shadow: none;
}
a:hover .bold {
  color: currentColor;
  text-shadow: none;
}
.red-glow {
  color: #f90563;
  text-shadow: 0 0 0.6em #f90563, 0 0 0.6em #f90563;
}
.underline {
  text-decoration-line: underline;
  text-underline-offset: 0.2em;
}
/* edit text success so it can glow */
.text-green {
  color: var(--green-1);
  text-shadow: 0 0 15px var(--green-2);
}
/* gray that is different from secondary without messing up the current text-secondary class */
.text-tertiary {
  color: #99a !important;
  text-shadow: 0 0 10px rgba(255,255,255,.5);
}
/* edit text-white-50 so it can glow too */
.text-white-50 {
  text-shadow: 0 0 10px rgba(255,255,255,.5);
}
details {
  /* .border-left */
  /* border-left: 1px solid #dee2e6 !important; */
  /*border-left: 4px solid #888 !important;*/
  /*position: relative;*/
}
.details-container {
  position: relative;
}
/* when details is open, make summary sticky, and add dark blue background */
@supports ((position:-webkit-sticky) or (position:sticky)) {
  [open] summary {
    background: #031535;
    /*background: hsla(220, 100%, 8%, 75%) !important;*/
    /*border-bottom: 1px solid rgba(255,255,255,.5);*/
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1;
    transition: all 0.3s ease-out;
  }
}
/* details marker when closed */
summary::marker {
  content: '';
}
summary span::before {
  content: '►';
  color:  #f5f8fa;
  text-shadow:  0 0 0.6em hsl(190, 100%, 50%), 0 0 0.6em hsl(190, 100%, 50%);
  transition: all 0.2s;
  margin-right: 0.2em;
}
[open] summary span::before {
  content: '▼';
  /*transform: rotate(90deg);*/
}
summary img {
  /*position: relative;*/
  /*top: 1px;*/
}
/* details marker when open */
.left-border-glow {
  border: 2px solid white;
  box-shadow: 0 0 0.5em hsl(190, 100%, 50%), 0 0 0.1em hsl(190, 100%, 50%);
  border-radius: 2px;
  height: calc(100% - 1px);
  position: absolute;
  top: 0;
  /*left: 0;*/
  left: 0.5em;
}
/*[open] .left-border-glow {
  height: 100%;
}*/
.elastic {
  field-sizing: content;
}
/* "X" button for going back */
.btn-x {
  font-size: 1.4em !important;
  font-weight: 200 !important;
  height: 38px;
  width: 38px;
}
/* dropdown button */
.btn-v {
  height: 38px;
  width: 38px;
}
.btn-v::after {
  border-right-width: 0.4em !important;
  border-left-width: 0.4em !important;
  vertical-align: 0.1em !important;
}
/* checbkox svgs */
.checkbox, .checkbox-big {
  filter: var(--glow-filter-2);
  path {
    stroke: #fff;
  }
  polyline {
    stroke: var(--green-2);
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
  }
  &.checked {
    polyline {
      animation: dash .25s linear forwards;
      /*animation-delay: 0.1s;*/
    }
  }
}
.checkbox {
  height: 1.2em;
  width: 1.2em;
}
.checkbox-big {
  height: 1.5em;
  width: 1.5em;
}
/* checkbox for input[type=checkbox] */
input[type=checkbox] ~ .checkbox-2 {
  height: 1.2em;
  width: 1.2em;
  filter: var(--glow-filter);
  polyline {
    stroke: var(--green-2);
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
  }
}
input[type=checkbox]:checked ~ .checkbox-2 {
  polyline {
    animation: dash .25s linear forwards;
    /* animation-delay: 0.25s; */
  }
}

/* define keyframe for checkmark */
@keyframes dash {
  to {
    stroke-dashoffset: 0;
  }
}

/* group icon */
.group-icon, .group-icon-2 {
  height: 1em;
  width: 1em;
  &:hover {
    filter: none;
  }
}
.group-icon {
  filter: var(--glow-filter);
}
.group-icon-2 {
  filter: drop-shadow(0 0 0.3em hsl(190, 100%, 50%)) drop-shadow(0 0 0.1em hsl(190, 100%, 50%));
}
/* when we hover over group-icon parent, turn off filter */
*:hover > .group-icon, .btn-light > .group-icon {
  filter: none;
}

/* habits calendar and reps icons */
.habit-icon {
  height: 1em;
  width: 1em;
  fill: currentColor;
  vertical-align: baseline !important;
}
/* notification icon in flash alerts and notices */
.notification-icon {
  stroke: white;
  height: 3em;
  width: 3em;

  margin-right: 1em;
  box-shadow: var(--glow-shadow);
  padding: 0.1em;
  * {
    filter: var(--glow-filter);
  }
}
/*  */
#password-toggle {
  display: none;

  & ~ label .eye-slash {
    /* transform: translateY(-2px); */
  }
  & ~ label .eye {
    transform: translateY(5px);
    display: none;
  }
  &:checked {
    & ~ label .eye {
      display: block;
    }
    & ~ label .eye-slash {
      display: none;
    }
  }
}
.visibility-icon {
  height: 1em;
  width: 1em;
}
#navbar {
  background: hsla(220, 100%, 8%, 92%) !important;
  border-top: 1px solid rgba(255,255,255,0.8);
  bottom: -1px;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  position: fixed;
  height: clamp(50px, 8%, 65px); /* might be too small. use a func like min/clamp/max */
  width: 100%;
  z-index: 2;
  & > ul {
    align-items: center;
    display: flex;
    height: 100%;
    list-style-type: none;
    margin: 0;
    padding: 0;
  }
  li {
    width: calc(100% / 3);
    scroll-snap-align: center;
    flex-shrink: 0;
  }
  a, label {
    text-decoration: none;
    color: hsla(0,0%,100%,0.5);
    fill: hsla(0,0%,100%,0.5);
    cursor: pointer;
    &.active {
      fill: #fff;
      color: #fff;
    }
  }
  .nav-icon {
    height: 1.33em;
    width: 1.33em;
    /* vertical-align: -0.125em; */
  }
   /*.nav-icon-2 path:not(:first-child) {
     fill: transparent;
  }*/
  input {
    display: none;
    & ~ .sub-menu {
      display: none;
      position: fixed;
      bottom: 10%;
      left: 0px;
      width: 100%;
      list-style: none;
      padding: 0;
      li {
        // background: black; see app_colors.scss
        border-top: 1px solid rgba(255,255,255,0.8);
        width: 100%;
      }
      a {
        color: #fff;
        display: block;
        padding: 0.75em;
      }
    }
    &:checked ~ ul {
      display: block;
    }
  }
}
/* a big navbar calls for a big padding so we can see the bottom of pages */
.pb-6 {
  padding-bottom: 6rem;
}
@keyframes slideIn {
  100% { opacity: 1; transform: translateY(-100%); }
}
@keyframes slideOut {
  100% { opacity: 0; transform: translateY(-100%); }
}
.tip-swap, .tip-swap-fast {
  --tip-delay: 2.4s;
  height: 1.5em;
  div:nth-child(1) {
    opacity: 1;
    animation: .4s slideOut var(--tip-delay) forwards;
  }
  div:nth-child(2) {
    opacity: 0;
    animation: .4s slideIn var(--tip-delay) forwards;
  }
}
.tip-swap-fast {
  --tip-delay: 1.4s;
}
.tier-swap, .tier-swap-fast {
  --tier-delay: 2.7s;
  height: 1.5em;
  div:nth-child(1) {
    animation: 1.4s cubic-bezier(.7,0,1,.5) slideOut var(--tier-delay) forwards;
    opacity: 1;
  }
  div:nth-child(2) {
    animation: 1.4s cubic-bezier(.7,0,1,.5) slideIn var(--tier-delay) forwards;
    opacity: 0;
  }
}
.tier-swap-fast {
  --tier-delay: 1.7s;
}
.rank-swap, .rank-swap-fast {
  --rank-delay: 4.0s;
  height: 3em;
  text-align: center;
  h1:nth-child(1) {
    animation: 1.4s cubic-bezier(.7,0,1,.5) slideOut var(--rank-delay) forwards;
    opacity: 1;
  }
  h1:nth-child(2) {
    animation: 1.4s cubic-bezier(.7,0,1,.5) slideIn var(--rank-delay) forwards;
    opacity: 0;
  }
}
.rank-swap-fast {
  --rank-delay: 3.0s;
}
/* whole progress bar */
progress.solo {
  /*  reset the default appearance  */
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: 8px;
  border: 1px solid currentColor;
  padding: 2px;
  width: 100%;
  filter: var(--glow-filter);
  position: relative;
}
progress.solo::before {
  box-sizing: border-box;
  content: '';
  border-left: 1px solid rgba(255,255,255,0.2);
  border-right: 1px solid rgba(255,255,255,0.3);
  height: 100%;
  left: 49.9%;
  position: absolute;
  top: 0;
  width: 10%;
  z-index: -1;
}
progress.solo::after {
  box-sizing: border-box;
  content: '';
  border-left: 1px solid rgba(255,255,255,0.5);
  position: absolute;
  height: 100%;
  left: 79.4%;
  top: 0;
  z-index: -1;
  width: 10%;
}
/* progress bar background */
progress.solo::-webkit-progress-bar {
  background-color: transparent;
}
/* progress bar inner bar */
progress.solo::-webkit-progress-value {
  background: currentColor;
  border-radius: 8px;
  /* transition: width 1s; /* let JS change the value, which will trigger the transition to run */
}
#success-message {
  height: 0px;
  overflow-y: hidden;
  transition: height .4s;
}
#player_password {
  anchor-name: --pass-field;
}
/* password-toggle label */
#ptl {
  position-anchor: --pass-field;
  position: absolute;
  right: anchor(95%);
}
:root {
  --base-clr: hsla(220, 50%, 8%, 95%);
  --line-clr: #f8f9fa;
  --hover-clr: #222533;
  --text-clr: var(--glow);
  --accent-clr: #faf9fa;
  /* --accent-clr: #1296e5; */
  --secondary-text-clr: #b0b3c1;
  --t: .3s;
}
#sidebar svg {
  height: 1em;
  width: 1em;
}
svg:not([stroke]) {
  fill: currentColor;
}
#sidebar {
  background-color: var(--base-clr);
  border-left: 1px solid var(--line-clr);
  box-sizing: border-box;
  height: 100vh;
  padding: 5px 1em;
  width: 250px;
  position: fixed;
  top: 0;
  align-self: start;
  right: -250px;
  transition: all var(--t);
  z-index: 3;
}
#sidebar ul {
  list-style: none;
  padding: 0;
}
#sidebar > ul > li:first-child {
  display: flex;
  justify-content: flex-end;
  margin: 1em 0;
}
#sidebar ul li.active a {
  color: var(--accent-clr);
  filter: var(--glow-filter);
}
#sidebar a {
  border-radius: .5em;
  padding: .85em;
  text-decoration: none;
  color: var(--text-clr);
  display: flex;
  align-items: center;
  gap: 1em;
}
#sidebar-checkbox {
  display: none;
}
#sidebar-label {
  height: 8vh;
  width: 8vh;
  padding: 1em;
  position: absolute;
  right: 0;
  text-align: right;
  transition: right var(--t), background var(--t), height 0s var(--t), width 0s var(--t);
  top: 0;
  z-index: 3;
}
#sidebar-label svg {
  height: 1.5em;
  width: 1.5em;
}
#xmark {
  display: none;
}
#sidebar-checkbox:checked + label {
  background: rgba(0,0,0,.6);
  right: 250px;
  height: 100%;
  width: 100%;
  transition: right var(--t), background var(--t);
}
#sidebar-checkbox:checked + label #bars {
  display: none;
}
#sidebar-checkbox:checked + label #xmark {
  display: inline-block;
}
#sidebar-checkbox:checked ~ #sidebar {
  right: 0px;
  box-shadow: 0 0 0.5em hsl(190, 100%, 50%), 0 0 0.1em hsl(190, 100%, 50%);
}
.x-scroll {
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  max-height: 3em;
  text-wrap-mode: nowrap;
}
.x-scroll .btn {
  scroll-snap-align: start;
}
.sub {
  font-size: 0.75em;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
:root {
  --glow: #f5f8fa;
  --glow-box: 0 0 0.5em hsl(190, 100%, 50%), 0 0 0.1em hsl(190, 100%, 50%);
  --glow-soft: 0 0 0.6em hsl(190, 100%, 50%), 0 0 0.6em hsl(190, 100%, 50%);
  --glow-hard: 0 0 0.1em hsl(190, 100%, 50%), 0 0 0.3em hsl(190, 100%, 50%), 0 0 0.5em hsl(190, 100%, 50%);
  --glow-filter: drop-shadow(0 0 0.5em hsl(190, 100%, 50%)) drop-shadow(0 0 0.1em hsl(190, 100%, 50%));
  --glow-filter-2: drop-shadow(0 0 0.5em hsl(190, 100%, 50%)) drop-shadow(0 0 0.1em hsla(190, 100%, 50%, 40%));
  --green-1: hsl(120 80% 50%); /* good text color */
  --green-2: hsl(120 100% 50%); /* good checkmark color */
  --green-3: hsl(137 100% 50%); /* also looks good on checkmark */
  --url: url(https://images.unsplash.com/photo-1644088379091-d574269d422f?q=80&w=2893&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D);
}
body {
  background-color: #112a56;
  background-image: url(/cool_tech_bg.jpg);
  background-position: top center;
  background-size: 130vw auto;
  background-repeat: repeat;
  background-attachment: scroll;
  min-height: 100vh;
}
