
/*--------------------------------------------------------*/
/*	12. Statistic cardTests */
/*--------------------------------------------------------*/

body {
  --background-color: #18181B;


  --cardTest-background-color: rgba(255, 255, 255, .015);
  --cardTest-border-color: rgba(255, 255, 255, 0.1);
  --cardTest-box-shadow-1: rgba(2, 192, 202, 1);
  --cardTest-box-shadow-1-y: 3px;
  --cardTest-box-shadow-1-blur: 6px;
  --cardTest-box-shadow-2: rgba(2, 192, 202, 1);
  --cardTest-box-shadow-2-y: 8px;
  --cardTest-box-shadow-2-blur: 15px;
  --cardTest-label-color: #FFFFFF;
  --cardTest-icon-color: #D4D4D8;
  --cardTest-icon-background-color: rgba(255, 255, 255, 0.08);
  --cardTest-icon-border-color: rgba(255, 255, 255, 0.12);
  --cardTest-shine-opacity: .1;
  --cardTest-shine-gradient: conic-gradient(from 205deg at 50% 50%, rgba(16, 185, 129, 0) 0deg, #10B981 25deg, rgba(52, 211, 153, 0.18) 295deg, rgba(16, 185, 129, 0) 360deg);
  --cardTest-line-color: #2A2B2C;
  --cardTest-tile-color: rgba(16, 185, 129, 0.05);

  --cardTest-hover-border-color: rgba(255, 255, 255, 0.2);
  --cardTest-hover-box-shadow-1: rgba(2, 192, 202, 1);
  --cardTest-hover-box-shadow-1-y: 5px;
  --cardTest-hover-box-shadow-1-blur: 10px;
  --cardTest-hover-box-shadow-2: rgba(2, 192, 202, 1);
  --cardTest-hover-box-shadow-2-y: 15px;
  --cardTest-hover-box-shadow-2-blur: 25px;
  --cardTest-hover-icon-color: #34D399;
  --cardTest-hover-icon-background-color: rgba(52, 211, 153, 0.1);
  --cardTest-hover-icon-border-color: rgba(52, 211, 153, 0.2);

  --blur-opacity: .01;

  &.light {
    --cardTest-background-color: transparent;
    --cardTest-border-color: rgba(24, 24, 27, 0.08);
    --cardTest-box-shadow-1: rgba(24, 24, 27, 0.02);
    --cardTest-box-shadow-1-y: 3px;
    --cardTest-box-shadow-1-blur: 6px;
    --cardTest-box-shadow-2: rgba(24, 24, 27, 0.04);
    --cardTest-box-shadow-2-y: 2px;
    --cardTest-box-shadow-2-blur: 7px;
    --cardTest-label-color: #18181B;
    --cardTest-icon-color: #18181B;
    --cardTest-icon-background-color: rgba(24, 24, 27, 0.04);
    --cardTest-icon-border-color: rgba(24, 24, 27, 0.1);
    --cardTest-shine-opacity: .3;
    --cardTest-shine-gradient: conic-gradient(from 225deg at 50% 50%, rgba(16, 185, 129, 0) 0deg, #10B981 25deg, #EDFAF6 285deg, #FFFFFF 345deg, rgba(16, 185, 129, 0) 360deg);
    --cardTest-line-color: #E9E9E7;
    --cardTest-tile-color: rgba(16, 185, 129, 0.08);

    --cardTest-hover-border-color: rgba(24, 24, 27, 0.15);
    --cardTest-hover-box-shadow-1: rgba(24, 24, 27, 0.05);
    --cardTest-hover-box-shadow-1-y: 3px;
    --cardTest-hover-box-shadow-1-blur: 6px;
    --cardTest-hover-box-shadow-2: rgba(24, 24, 27, 0.1);
    --cardTest-hover-box-shadow-2-y: 8px;
    --cardTest-hover-box-shadow-2-blur: 15px;
    --cardTest-hover-icon-color: #18181B;
    --cardTest-hover-icon-background-color: rgba(24, 24, 27, 0.04);
    --cardTest-hover-icon-border-color: rgba(24, 24, 27, 0.34);

    --blur-opacity: .1;
  }

  &.toggle .gridTest * {
    transition-duration: 0s !important;
  }
}
/*
.grid {
	margin-top: 4%;
}*/

.gridTest {
  display: grid;
  width: 85%;
  grid-gap: 32px;
  position: relative;
  z-index: 1;
}

.cardTest h2 {
	  font-weight: 600;
	  font-size: 1.2rem;
	  display: block;
    margin-bottom: 0rem;
    padding: 1rem;
}

.cardTest h4 {
	text-align: center;
	font-weight: 300;
  margin-bottom: 0rem;
  font-size: 0.8rem;
  padding: 1rem;
}

table {
	font-weight: 300;
	font-size: 0.6rem;
	text-align: left;
	width: 100%;
  border: 1px solid #dddddd;
	border-radius: 1rem;
	padding: 1rem;	
}

td {
	font-weight: 300;
	font-size: 0.8rem;
	text-align: center;
	border: 1px solid #dddddd;
}

th {
	font-weight: 300;
	font-size: 0.6rem;
	text-align: center;
	border: 1px solid #dddddd;
}

.cardTest {
  background-color: var(--background-color);
  box-shadow: 0px var(--cardTest-box-shadow-1-y) var(--cardTest-box-shadow-1-blur) var(--cardTest-box-shadow-1), 0px var(--cardTest-box-shadow-2-y) var(--cardTest-box-shadow-2-blur) var(--cardTest-box-shadow-2), 0 0 0 1px var(--cardTest-border-color);
  padding: 1rem;
  margin: 5rem 0rem 5rem 0rem;
  border-radius: 1rem;
  cursor: pointer;
  position: relative;
  transition: box-shadow .25s;
  border: 1px solid #dddddd;

  &::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    background-color: var(--cardTest-background-color);
  }

  .icon {
    z-index: 2;
    position: relative;
    display: table;
    padding: 8px;

    &::after {
      content: '';
      position: absolute;
      inset: 4.5px;
      border-radius: 50%;
      background-color: var(--cardTest-icon-background-color);
      border: 1px solid var(--cardTest-icon-border-color);
      backdrop-filter: blur(2px);
      transition: background-color .25s, border-color .25s;
    }

    svg {
      position: relative;
      z-index: 1;
      display: block;
      width: 24px;
      height: 24px;
      transform: translateZ(0);
      color: var(--cardTest-icon-color);
      transition: color .25s;
    }
  }


  .shine {
    border-radius: inherit;
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    opacity: 0;
    transition: opacity .5s;

    &:before {
      content: '';
      width: 150%;
      padding-bottom: 150%;
      border-radius: 50%;
      position: absolute;
      left: 50%;
      bottom: 55%;
      filter: blur(35px);
      opacity: var(--cardTest-shine-opacity);
      transform: translateX(-50%);
      background-image: var(--cardTest-shine-gradient);
    }
  }

  .background {
    border-radius: inherit;
    position: absolute;
    inset: 0;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(circle at 60% 5%, black 0%, black 15%, transparent 60%);
    mask-image: radial-gradient(circle at 60% 5%, black 0%, black 15%, transparent 60%);

    .tiles {
      opacity: 0;
      transition: opacity .25s;

      .tile {
        position: absolute;
        background-color: var(--cardTest-tile-color);
        animation-duration: 8s;
        animation-iteration-count: infinite;
        opacity: 0;

        &.tile-4,
        &.tile-6,
        &.tile-10 {
          animation-delay: -2s;
        }

        &.tile-3,
        &.tile-5,
        &.tile-8 {
          animation-delay: -4s;
        }

        &.tile-2,
        &.tile-9 {
          animation-delay: -6s;
        }

        &.tile-1 {
          top: 0;
          left: 0;
          height: 10%;
          width: 22.5%;
        }

        &.tile-2 {
          top: 0;
          left: 22.5%;
          height: 10%;
          width: 27.5%;
        }

        &.tile-3 {
          top: 0;
          left: 50%;
          height: 10%;
          width: 27.5%;
        }

        &.tile-4 {
          top: 0;
          left: 77.5%;
          height: 10%;
          width: 22.5%;
        }

        &.tile-5 {
          top: 10%;
          left: 0;
          height: 22.5%;
          width: 22.5%;
        }

        &.tile-6 {
          top: 10%;
          left: 22.5%;
          height: 22.5%;
          width: 27.5%;
        }

        &.tile-7 {
          top: 10%;
          left: 50%;
          height: 22.5%;
          width: 27.5%;
        }

        &.tile-8 {
          top: 10%;
          left: 77.5%;
          height: 22.5%;
          width: 22.5%;
        }

        &.tile-9 {
          top: 32.5%;
          left: 50%;
          height: 22.5%;
          width: 27.5%;
        }

        &.tile-10 {
          top: 32.5%;
          left: 77.5%;
          height: 22.5%;
          width: 22.5%;
        }
      }
    }

    @keyframes tile {

      0%,
      12.5%,
      100% {
        opacity: 1;
      }

      25%,
      82.5% {
        opacity: 0;
      }
    }

    .line {
      position: absolute;
      inset: 0;
      opacity: 0;
      transition: opacity .35s;

      &:before,
      &:after {
        content: '';
        position: absolute;
        background-color: var(--cardTest-line-color);
        transition: transform .35s;
      }

      &:before {
        left: 0;
        right: 0;
        height: 1px;
        transform-origin: 0 50%;
        transform: scaleX(0);
      }

      &:after {
        top: 0;
        bottom: 0;
        width: 1px;
        transform-origin: 50% 0;
        transform: scaleY(0);
      }

      &.line-1 {
        &:before {
          top: 10%;
        }

        &:after {
          left: 22.5%;
        }

        &:before,
        &:after {
          transition-delay: .3s;
        }
      }

      &.line-2 {
        &:before {
          top: 32.5%;
        }

        &:after {
          left: 50%;
        }

        &:before,
        &:after {
          transition-delay: .15s;
        }
      }

      &.line-3 {
        &:before {
          top: 55%;
        }

        &:after {
          right: 22.5%;
        }
      }
    }
  }

  &:hover {
    box-shadow: 0px 3px 6px var(--cardTest-hover-box-shadow-1), 0px var(--cardTest-hover-box-shadow-2-y) var(--cardTest-hover-box-shadow-2-blur) var(--cardTest-hover-box-shadow-2), 0 0 0 1px var(--cardTest-hover-border-color);

    .icon {
      &::after {
        background-color: var(--cardTest-hover-icon-background-color);
        border-color: var(--cardTest-hover-icon-border-color);
      }

      svg {
        color: var(--cardTest-hover-icon-color);
      }
    }

    .shine {
      opacity: 1;
      transition-duration: .5s;
      transition-delay: 0s;
    }

    .background {

      .tiles {
        opacity: 1;
        transition-delay: .25s;

        .tile {
          animation-name: tile;
        }
      }

      .line {
        opacity: 1;
        transition-duration: .15s;

        &:before {
          transform: scaleX(1);
        }

        &:after {
          transform: scaleY(1);
        }

        &.line-1 {

          &:before,
          &:after {
            transition-delay: .0s;
          }
        }

        &.line-2 {

          &:before,
          &:after {
            transition-delay: .15s;
          }
        }

        &.line-3 {

          &:before,
          &:after {
            transition-delay: .3s;
          }
        }
      }
    }
  }
}

.day-night {
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 20px;
  opacity: .3;

  input {
    display: none;

    &+div {
      border-radius: 50%;
      width: 20px;
      height: 20px;
      position: relative;
      box-shadow: inset 8px -8px 0 0 var(--text-color);
      transform: scale(1) rotate(-2deg);
      transition: box-shadow .5s ease 0s, transform .4s ease .1s;

      &:before {
        content: '';
        width: inherit;
        height: inherit;
        border-radius: inherit;
        position: absolute;
        left: 0;
        top: 0;
        transition: background-color .3s ease;
      }

      &:after {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        margin: -3px 0 0 -3px;
        position: absolute;
        top: 50%;
        left: 50%;
        box-shadow: 0 -23px 0 var(--text-color), 0 23px 0 var(--text-color), 23px 0 0 var(--text-color), -23px 0 0 var(--text-color), 15px 15px 0 var(--text-color), -15px 15px 0 var(--text-color), 15px -15px 0 var(--text-color), -15px -15px 0 var(--text-color);
        transform: scale(0);
        transition: all .3s ease;
      }
    }

    &:checked+div {
      box-shadow: inset 20px -20px 0 0 var(--text-color);
      transform: scale(.5) rotate(0deg);
      transition: transform .3s ease .1s, box-shadow .2s ease 0s;

      &:before {
        background: var(--text-color);
        transition: background-color .3s ease .1s;
      }

      &:after {
        transform: scale(1);
        transition: transform .5s ease .15s;
      }
    }
  }
}