/** ***********************
 * @file ricc.multinav.mobile.trigger.css
 * @brief Styles for the trigger of mobile-navigation for Riccabona CSS-only Navigation Framework
 * @author Clemens Riccabona, Riccabona eSolutions, <https://www.Riccabona.IT/>
 * @copyright All rights reserved
 * @updated 16.02.2017
 *********************** **/

/** hide checkbox **/
/** concerns all other navigation checkboxes! **/
.riccNavIcon {
    position: absolute;
    clip: rect(0, 0, 0, 0);
}

#riccNavIcon {
    position: absolute;
    top: 0px;
    right: 25px;
    height: 50px;
    width: 50px;
}


/** Style the label for checkbox as navigation trigger **/
label[for="riccNavIcon"] {
    display: block;
    position: absolute;
    top: 0px;
    right: 25px;
    overflow: hidden;
    /*   margin: 0; */
    /*   padding: 0; */
    width: 48px;
    height: 48px;
    font-size: 0;
    text-indent: -9999px;
    appearance: none;
    box-shadow: none;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

label[for="riccNavIcon"]:focus {
    outline: none;
}

label[for="riccNavIcon"] span {
    display: block;
    position: absolute;
    top: 22px;
    left: 9px;
    right: 9px;
    height: 4px;
}

label[for="riccNavIcon"] span::before,
label[for="riccNavIcon"] span::after {
    position: absolute;
    display: block;
    left: 0;
    width: 100%;
    height: 4px;
    content: "";
}

label[for="riccNavIcon"] span::before {
    top: -10px;
}

label[for="riccNavIcon"] span::after {
    bottom: -10px;
}


/** Animation to arrow-back **/
label[for="riccNavIcon"] span {
    transition: transform 0.3s;
}

label[for="riccNavIcon"] span::before {
    transform-origin: top right;
    transition: transform 0.3s, width 0.3s, top 0.3s;
}

label[for="riccNavIcon"] span::after {
    transform-origin: bottom right;
    transition: transform 0.3s, width 0.3s, bottom 0.3s;
}

/** active state **/
.riccNavIcon:checked+label[for="riccNavIcon"] span {
    transform: rotate(180deg);
}

.riccNavIcon:checked+label[for="riccNavIcon"] span::before,
.riccNavIcon:checked+label[for="riccNavIcon"] span::after {
    width: 50%;
}

.riccNavIcon:checked+label[for="riccNavIcon"] span::before {
    top: 0;
    transform: translateX(17px) translateY(2px) rotate(45deg);
}

.riccNavIcon:checked+label[for="riccNavIcon"] span::after {
    bottom: 0;
    transform: translateX(17px) translateY(-2px) rotate(-45deg);
}


/** EOF **/