/**
 * F1CSS - Menu Control - 04 Jan 2023
 *  
 * @author  C. Moller <xavier.tnc@gmail.com>
 * 
 * @version 1.0.0 - INIT - 04 Jan 2023
 *
 */

.menu__toggle {
  display: none; 
}

.menu__toggleicon {
  border: 1px dashed transparent;
  justify-content: space-around;
  margin: var(--doc-padding);
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  display: none;
  padding: 0.25rem;
  height: 2.5rem;
  width: 2.5rem;
  z-index: 25;
}

.menu__toggleicon i {
  background-color: rgba(255, 255, 255, .8);
  transition: transform 0.3s;  
  transform-origin: left;
  border: none;
  width: 100%;
  height: 3px;
}


@media (max-width:580px) {

  .menu__toggle {
    clip: rect(1px, 1px, 1px, 1px);
    display: inline-block;
    overflow: hidden;
    position: fixed;
    height: 1px;
    width: 1px;
    opacity: 0;
    padding: 0;
    margin: 0;
    top: 0;
  }  

  .menu__toggle:focus ~ .menu__toggleicon {
    border: 1px dashed dodgerblue;
  }

  .menu__toggle:checked ~ .menu__toggleicon i:nth-child(1) {
    transform: translateX(15%) rotate(45deg);
  }

  .menu__toggle:checked ~ .menu__toggleicon i:nth-child(2) {
    transition: transform 0.4s ease-out, opacity 0.2s ease-out;
    transform: translate(-300%, 0);
    opacity: 0;
  }

  .menu__toggle:checked ~ .menu__toggleicon i:nth-child(3) {
    transform: translateX(15%) rotate(-45deg);
  }  

  .menu__toggleicon {
    display: flex;
  }

}