//
// Copyright (c) 2021 GrowStocks
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//

@use '../../Core/Tools';
@use '../../Core/Typography';

@mixin base() {
    .sc-drawer__overlay {
        display: block;
        position: fixed;
        z-index: 98;
        right: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        background-color: rgb(0, 0, 0);
        background-color: rgba(0, 0, 0, 0.4);
    }

    .sc-drawer {
        width: 100%;
        max-width: 320px;
        padding: 0.7rem 0;
        height: calc(100% - 47px);
        position: fixed;
        bottom: 0;
        right: 0!important;
        z-index: 100;
        overflow-y: auto;
        overflow-x: hidden;

        @include Tools.prefix(transition, all 0.1s ease-in-out);

        * {
            color: inherit;
        }

        .sc-drawer__item {
            width: 100%;
            justify-content: flex-start;
            padding: 0.5rem 1rem;
            font-weight: normal !important;
            font-size: Typography.px-to-rem(14px);
        }

        @content;

        .sc-drawer__divider {
            margin: 17px 0 7px 0;
            text-align: center;
            font-weight: 700!important;
        }

        .sc-drawer__socials {
            display: flex;
            justify-content: space-around;
            width: 210px;
            margin: 0 auto;

            i {
                font-size: Typography.px-to-rem(24px) !important;

                @include Tools.prefix(transition, all 0.1s ease);

                &:hover {
                    opacity: 0.7;
                    cursor: pointer;
                }
            }
        }

        .sc-drawer__language__wrapper {
            text-align: center;

            .sc-drawer__language__spacer {
                display: inline-block;
                margin: 0 1px;
            }
        }

        .sc-drawer__language--active {
            p {
                font-weight: 700;
            }
        }
    }
}
