@import '../../styles/vars';

.wrap {
  position: fixed;
  z-index: 2010;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  visibility: hidden;
}

.overlay {
  display: none;
  background: rgba(0, 0, 0, 0.5);
}

.close-btn {
  @apply --button-base;
  
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--black54);
  &:hover,
  &:active {
    color: var(--black87);
  }
}

.menu {
  transition: all .15s cubic-bezier(.25,1,0.8,1);
  transform: translate(-100%, 0);
  position: absolute;
  width: 100%;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
  background: #fff;
}

.close-button {
  @apply --button-base;
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 21px;
  width: 26px;
  height: 26px;
  color: var(--gray);
  &:hover {
    color: var(--gray-dark);
  }
}

.date {
  color: var(--black54);
}

.toggle {
  margin: 8px 0;
}

.toggle-icon-passed {
  color: var(--green500);
}

.toggle-icon-failed {
  color: var(--red500);
}

.toggle-icon-pending {
  color: var(--ltblue500);
}

.toggle-icon-skipped {
  color: var(--grey500);
}

.wrap.open {
  visibility: visible;
  & .overlay {
    opacity: 1;
  }
  & .menu {
    transform: translate(0, 0);
  }
}

.section {
  padding: 0 16px;
  border-bottom: 1px solid var(--grey300);
}

.list {
  @apply --list-unstyled;
}

.main {
  margin: 8px 0 16px 0;
}

.no-tests > .item > div > .sub {
  padding-left: 0;
}

.no-tests > .item > .link {
  padding-left: 0;
}

.sub {
  padding-left: 24px;
  margin: 0 0 2px 0;
}

.link {
  @apply --link-transition;
  @apply --text-overflow;
  position: relative;
  display: block;
  padding: 3px 16px 3px 22px;
  color: var(--gray);

  &:hover {
    color: var(--link-hover-color);
    text-decoration: none;
  }
  &:active,
  &:focus {
    outline: none;
    text-decoration: none;
  }
}

.link-icon {
  position: absolute;
  top: 4px;
  left: 0;
  &.pass {
    color: var(--green500);
  }
  &.fail {
    color: var(--red500);
  }
  &.pending {
    color: var(--ltblue500);
  }
  &.skipped {
    color: var(--grey500);
  }
}

.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Tablet 768 and up */
@media (--screen-sm) {
  .menu {
    width: 320px;
    left: auto;
  }
  .overlay {
    transition: all .2s ease-out;
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    cursor: pointer;
    opacity: 0;
  }
  .close-btn {
    display: none;
  }
}