// /**
// * @package Divante/rapid
// * @author Kacper Chara <kchara@divante.pl>
// * @copyright 2018 Divante Sp. z o.o.
// * @license See LICENSE_DIVANTE.txt for license details.
// */

//
//  Common
//  _____________________________________________

& when (@media-common = true) {

    * {
        box-sizing: border-box;
    }

    body {
        min-width: 320px;
    }

    .page-wrapper {
        position: relative;
    }

    .rapid-image {
        width: 0 !important;
        height: 0 !important;
        display: block !important;
        visibility: hidden !important;
    }

    //
    //  Header
    //  ---------------------------------------------

    .page-header {
        position: relative;
        background: no-repeat center center url('@{baseDir}images/content/header.jpg');
        background-size: cover;
        border-bottom: none;
        margin-bottom: 0;

        &:before {
            background-color: @header__background-color;
            content: '';
            display: block;
            height: 100%;
            left: 0;
            position: absolute;
            right: 0;
            top: 0;
            z-index: 0;
        }

        .panel.wrapper {
            display: none;
            position: relative;
            z-index: 11;
        }
    }

    .header {
        &.content {
            z-index: 10;
        }

        .greet {
            display: none;
        }
    }

    .logo {
        float: none;
        margin: 10px auto;
        max-width: 200px;
        display: block;

        img {
            margin: 0 auto;
        }
    }

    //
    //  Footer
    //  ---------------------------------------------

    .page-footer {
        background: @footer__background-color no-repeat 100% 100% url('@{baseDir}images/content/footer.jpg');

        .copyright {
            border-top: 1px solid #feeed3;
            color: #fffefe;
            font-size: 14px;
            padding: 20px 15px;
            text-align: center;
            display: block;
        }

        .checkout-footer-links {
            max-width: @layout__max-width;
            padding: 10px @layout-indent__width 5px;
            width: 100%;
            display: block;
            margin: 0 auto;
            list-style: none;
            overflow: hidden;

            li {
                margin: 0 5px 5px 0;
                float: left;

                a {
                    color: @color-white;
                }
            }
        }
    }

    .footer {
        &.content {
            border-top: none;
            margin-top: 0;
        }
    }

    .footer-columns {
        .single-column {
            margin-bottom: 5px;

            &:last-child {
                margin-bottom: 0;
            }
        }

        .single-column-heading {
            font-size: 18px;
            color: #fffefe;
            font-family: 'Dosis', 'Open Sans', Helvetica, Arial, sans-serif;
            font-weight: 500;
            position: relative;
            line-height: 30px;
            margin: 0;

            &:hover {
                cursor: pointer;
            }

            span {
                display: block;
            }
            

            &[aria-expanded="true"] {
                .includeFontAwesomeIcon(@fa-var-angle-up, false);
            }

            &[aria-expanded="false"] {
                .includeFontAwesomeIcon(@fa-var-angle-down, false);
            }

            &[aria-selected="true"] {
                color: #a66b29;
            }

            &[aria-expanded="true"],
            &[aria-expanded="false"] {
                &:before {
                    position: absolute;
                    top: 50%;
                    right: 0;
                    font-size: 25px;
                    margin-top: -13px;
                }
            }
        }

        .single-column-content {
            padding: 10px 0;

            ul {
                li {
                    margin-bottom: 4px;

                    &:last-child {
                        margin-bottom: 0;
                    }
                }
            }

            p, a {
                color: #fffefe;
                font-size: 14px;
                line-height: 18px;
                font-family: 'Open Sans', Helvetica, Arial, sans-serif;
            }

            p {
                line-height: 18px;
            }

            a {
                display: inline-block;
                padding: 5px 0;
            }

            .socials {
                li {
                    a {
                        font-size: 0;

                        &:before {
                            font-size: 24px;
                        }
                    }
                }
            }
        }

    }

    .page-header,
    .page-footer {
        .switcher {
            margin-right: 10px;

            .switcher-trigger {
                font-size: 15px;
                font-weight: lighter;
                color: @color-white;
                text-transform: uppercase;
            }

            .options {
                .lib-dropdown(
                    @_dropdown-list-item-hover: @primary__color__dark,
                    @_dropdown-actions-padding: 0,
                    @_dropdown-list-item-padding: 0,
                    @_dropdown-toggle-icon-content: @icon-down,
                    @_dropdown-toggle-active-icon-content: @icon-up,
                    @_icon-font-text-hide: true,
                    @_dropdown-list-pointer: false,
                    @_icon-font-size: 44px,
                    @_icon-font-line-height: 22px,
                    @_dropdown-list-min-width: 160px
                );

                ul.dropdown {
                    li {
                        border-bottom: 1px solid @secondary__color;
                        &:last-child {
                            border: none;
                        }
                    }

                    a {
                        color: @link__color;
                        font-size: 14px;
                        &:hover {
                            text-decoration: none;
                        }
                    }

                    .switcher-option {
                        &:hover {
                            background-color: transparent;
                        }
                    }
                }

                .action.toggle {
                    line-height: 22px;

                    > * {
                        vertical-align: top;
                    }
                }

                .action.toggle,
                .action.toggle.active{
                    &:after {
                        margin-left: -5px;
                        margin-top: 1px;
                        font-size: 34px;
                        line-height: 22px;
                    }
                }
            }

            li {
                font-size: 12px;
                margin: 0;
            }

            .label {
                &:extend(.abs-visually-hidden all);
            }

            strong {
                font-weight: 400;
            }
        }
    }

    h1 {
        font-size: @h1__font-size;
        margin-bottom: @h1__margin-bottom;
    }

    .line-on-sides {
        position: relative;
        text-align: center;
        text-transform: uppercase;

        &:after {
            background-color: #b1b1b1;
            content: '';
            display: block;
            height: 1px;
            left: 0;
            position: absolute;
            width: 100%;
            top: 50%;
            z-index: 0;
        }

        span {
            background-color: @color-white;
            display: inline-block;
            padding: 0 25px;
            position: relative;
            z-index: 1;
        }
    }
}

//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .logo {
        margin: 0 auto 10px;
    }

    .header {
        &.content {
            padding: 15px 20px 10px;
        }

        &.panel {
            > .header.links {
                padding-top: 2px;

                > li {
                    &.welcome {
                        display: none;
                    }

                    a {
                        color: @color-white;
                    }
                }
            }
        }
    }

    .page-header {
        .cms-home & {
            background-image: none;
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            z-index: 100;
        }

        .panel.wrapper {
            background-color: @color-black;
            display: block;
            border-bottom: none;
        }

        .header.panel {
            padding-bottom: @indent__xs;
            padding-top: @indent__xs;
        }

        .switcher {
            display: none;
        }
    }

    .page-main {
        > .page-title-wrapper {
            .page-title {
                display: block;
            }
        }
    }

    .page-footer {
        .copyright {
            padding-bottom: 20px;
        }
    }

    .footer-columns {
        overflow: hidden;

        .single-column {
            float: left;
            width: 25%;
            padding-right: 20px;

            &:last-child {
                padding-right: 0;
            }
        }

        .single-column-content {
            display: block !important;
        }

        .single-column-heading {
            margin-bottom: 10px;

            &:hover {
                cursor: text;
            }

            &[aria-expanded="true"],
            &[aria-expanded="false"] {
                &:before {
                    display: none;
                }
            }

            &[aria-selected="true"] {
                color: #fffefe;
            }
        }
    }
}


//
//  Divante Extend
//  _____________________________________________

@import '_extend-specific.less';
