// /**
//  * Copyright © Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//
//  Elements
//  _____________________________________________


.ox-toggle-minus-opened() {
    span{
        &:after {
            display:none;//transform: scaleY(0);
        }
    }
}
.ox-toggle-minus(){
    display: block;
    float: right;
    width: var(--a2-toggle-i-size);
    height: var(--a2-toggle-i-size);
    flex: 0 0  var(--a2-toggle-i-size);
    cursor: pointer;
    top: 0;
    right: 0;
    position: relative;
    background:@a2-toggle-icon__bg;
    color: @a2-toggle-icon__color;    
    overflow: hidden;
    transition: all 600ms ease-in-out;
    span{
        display: block;
        width: 100%;
        height: 100%;
        position: relative;                        
        animation: move-horizontal-hover 0.6s ease-in-out;
        font-size: 0;
        line-height: 0;
        text-indent: -9999px;
        &:after {
            content: '';
            position: absolute;
            right: 11px;
            top: 6px;
            background: currentColor;
            width: 2px;
            height: 12px;
            transition: background-color 0.1s ease 0.4s;
        }
        &:before {
            content: '';
            position: absolute;
            right: 6px;
            top: 11px;
            background: currentColor;
            width: 12px;
            height: 2px;
            transition: background-color 0.1s ease 0.4s;
        }
    }
}

.ox-toggle-minus-hover(){
    transition: all 10ms ease-in-out;
    background:@a2-toggle-icon__hover__bg;
    color:@a2-toggle-icon__hover__color;
    span{
        animation: move-horizontal-empty 0.1s;
        &:after,
        &:before{
            transition: background-color 0.1s ease 0s;
        }
    }
}

.ox-toggle-title(){
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--a2-toggle-i-size);
    .lib-heading(h5);
    font-weight: @font-weight__black;
    letter-spacing: -0.03em;
    text-transform:uppercase;
    line-height: .9;                
    cursor: pointer;
    margin: 0;
    overflow: hidden;
    position: relative;
    word-break: break-all;
    z-index: 1;
    gap:var(--a2-toggle-title-gap);
    strong{
        font-weight: @font-weight__black;
        word-break: break-word;
    }
}

//
//  Common
//  _____________________________________________

& when (@media-common = true) {
    .toggle-minus{
        .ox-toggle-minus();
    }
    .ox-toggle-content{
        -webkit-transition: 300ms;
        transition: 300ms;
        transition-property: max-height, padding, margin;
        overflow: hidden;
        contain: paint;
        max-height: 0;
    }
    .ox-toggle{
        padding:var(--a2-toggle-padding);
        + .ox-toggle{
             border-top: 1px solid @a2-toggle__border-color;
        }
        .ox-toggle-content{
            display:block!important;
        }
        &:not(.open){
            .ox-toggle-content{
                margin-top: 0;
                margin-bottom:0;
                padding-top:0;
                padding-bottom: 0;
            }
        }
        &.open {
            .toggle-minus {
                .ox-toggle-minus-opened();
            }
        }
        &-title {
            .ox-toggle-title();
            &.reset-font{
                font-size: inherit;
                font-weight: inherit;
                letter-spacing: inherit;
                text-transform: inherit;
                line-height: inherit;
            }
            .toggle-minus{
                .ox-toggle-minus();
            }
            &:hover {
                .toggle-minus{
                    .ox-toggle-minus-hover();
                }
            }
        }
        &-content{
            display:none;
            margin-top: 10px;
            margin-bottom: 30px;
            p{
                &:last-of-type,
                &:last-child{
                    margin-bottom: 0;
                }
            }
        }
        &.icon-no-hover{
            --a2-toggle-i-bg:transparent;
            --a2-toggle-i-bg-hover:transparent;
            --a2-toggle-i-color-hover: var(--a2-toggle-i-color);
        }
        &.icon-noanim{
            .toggle-minus{
                span{
                    animation: none!important;
                }
            }
        }
        &.big{
            --a2-toggle-title-gap:22px;
            --a2-toggle-i-size: 30px;
            --a2-toggle-padding:28px 0;
            padding:0;
            .ox-toggle-title{
                padding:var(--a2-toggle-padding);
                justify-content: flex-start;
                .toggle-minus{
                    span{
                        &:before{
                            right: 9px;
                            top: 14px;
                        }
                        &:after{
                            right: 14px;
                            top: 9px;
                        }
                    }
                }
            }
            .ox-toggle-content{
                padding-left:52px;
                margin-top: 0;
            }
        }
        &[class*="medium"]{
            --a2-toggle-title-gap:22px;
            --a2-toggle-i-size: 30px;
            --a2-toggle-padding: 20px 0;
            --a2-toggle-i-bg:@a2-toggle-medium-icon__bg;
            --a2-toggle-i-color:@a2-toggle-medium-icon__color;
            --a2-toggle-i-bg-hover:@a2-toggle-medium-icon__hover__bg;
            --a2-toggle-i-color-hover: @a2-toggle-medium-icon__hover__color;
            .ox-toggle-title{
                justify-content: flex-start;
                strong{
                    font-size:18px;
                }
                .toggle-minus{
                    span{
                        &:before{
                            right: 9px;
                            top: 14px;
                        }
                        &:after{
                            right: 14px;
                            top: 9px;
                        }
                    }
                }
            }
            .ox-toggle-content{
                padding-left:52px;
                margin-top: 40px;
            }
        }
        &.right,
        &.medium-right{
            .ox-toggle-content{
            padding-left: 0;
            }
            .toggle-minus{
                order:2;
                margin-left: auto;
            }
        }

    }
    &.arrows{
        .ox-toggle-title{
            .toggle-minus{
                span{
                    transform: rotate(180deg);
                    animation:none;
                    &:before{
                        right: 10px;
                        top: 11px;
                        width: 10px;
                        height: 2px;
                        transform: rotate(45deg);
                    }
                    &:after{
                        right: 4px;
                        top: 11px;
                        width: 10px;
                        height: 2px;
                        transform: rotate(-45deg);
                    }
                }
            }
        }
        &.open{
            .ox-toggle-title{
                .toggle-minus{
                    span{
                        transform: rotate(180deg);
                        &:after{
                            display: block;
                        }
                    }
                }
            }
        }

        &.medium-left{
            .ox-toggle-title{
                .toggle-minus{
                    span{
                        &:before{
                            right: 13px;
                            top: 14px;
                        }
                        &:after{
                            right: 7px;
                            top: 14px;
                        }
                    }
                }
            }
        }
    }

    #toTop{
        display:none;
        text-decoration: none;
        position: fixed;
        z-index: 100;
        bottom: 30px;
        right: 30px;
        overflow: hidden;
        width: 45px;
        height: 45px;
        background: @main-color;
        text-align: center;
        border: none;
        border-radius: 0;
        transition:all 200ms ease;
        transform: translateY(~"calc(-1 * (var(--ox-bnav-height)))");
        small{
            display: none;
        }
        > span{
            display: block;
            width: 100%;
            height: 100%;
            animation: move-vertical-out 0.25s;
        }
        svg{
            width: 23px;
            height: 23px;
            transform: rotate(-90deg);
            position: relative;
            top: 10px;
            transition:all 200ms ease;
        }
        &:hover{
            background: #000000;
            svg{
                fill: #ffffff;
            }
            > span{
                animation: move-vertical-hover 0.25s;
            }
        }
    }   
    .pbar-is-visible{
        #toTop{
            transform: translateY(~"calc(-1 * (var(--ox-bnav-height) + var(--ox-pbar-height)))");
        }
    }
    .slider-progress{
        width:100%;
        height:40px;
        display:block;
        position:relative;
        transition:all 0.3s ease;
        cursor:pointer;
        span{
            width:100%;
            height:3px;
            display:block;
            background:#ffffff;
            opacity:0.2;
            transition:all 0.3s ease!important;
            position:relative;
            top:37px;
        }
        &:after{
            content: '';
            width:100%;
            height:3px;
            background:@main-color;
            display:block;
            position:absolute;
            top:37px;
            left:0; 
            transition:all 0.3s ease;
            transform-origin: left;
            -ms-transform: scaleX(0);
            -webkit-transform: scaleX(0);
            transform: scaleX(0); 
        }
        &.play{
            &:after{
                animation: progress 9s forwards;                     
            }
        }
        &.active{
            &:after{
                animation:none;
                -ms-transform: scaleX(1);
                -webkit-transform: scaleX(1);
                transform: scaleX(1); 
            }
        }
        &:hover {
           span{
               transition:all 0.3s ease;
               opacity:1;
           }
       }
    }
    .video-wrapper {
      position: relative;
      padding-bottom: 56.25%; /* 16:9 */
      padding-bottom: ~"calc(var(--ox-iv-aspect-ratio, .5625) * 100%)";  /* style="--ox-iv-aspect-ratio: 3 / 4;" */
      height: 0;
        iframe {
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
        }
    }
    .progress-line {
        background: @a2-progress-bg;
        transform: scale(0);
        transform-origin: 0;
        animation: progress 0.6s ease forwards;
        animation-timing-function: cubic-bezier(0.39, 0.93, 0.46, 0.99);
        height: @a2-progress-height;
        border-radius: @a2-progress-br;
        overflow: hidden;
        span {
            background:@a2-progress-active;
            transform: scale(0);
            transform-origin: 0;
            animation: progress 1s ease forwards 0.4s;
            animation-timing-function: cubic-bezier(0.09, 0.64, 0, 1.01);
            border-radius: @a2-progress-br;
            display: block;
            height: 100%;
        }
    }

    .ox-close-icon {
        display: inline-block;
        width: 18px;
        height: 18px;
        vertical-align: middle;
        position: relative;
        overflow: hidden;
        &:before,
        &:after {
            content: '';
            position: absolute;
            height: 2px;
            width: 100%;
            top: 50%;
            left: 0;
            margin-top: -1px;
            background-color: currentColor;
            transform-origin: 50% 50%;
            opacity: 1;
            transition: transform ease 0.3s;
        }
        &:before {
            transform: rotate(45deg);
        }
        &:after {
            transform: rotate(-45deg);
        }     
    } 
    .overlay-link{
        position: absolute;
        top: 0;
        left: 0;
        right:0;
        bottom:0;
        display: block;
        background: 0 0 !important;
        line-height: 0 !important;
        font-size: 0 !important;
        color: transparent !important;
    }
}