@import "./variables";

@mixin desktop {
    @media (min-width: 900px) {
        @content;
    }
}

@mixin mobile {
    @media (max-width: 899px) {
        @content;
    }
}

@mixin flex-center {
    display: flex;
    justify-content: center;
    align-content: center;
    width: 100%;
}

@mixin page-wrapper-center {
    @include flex-center;
}

@mixin page-content-wrapper($desktopWidth: 720px) {
    margin: 10px 4px;
    padding: 6px;
    background-color: $color-white;
    border-radius: 15px;
    border: $border-large;
    width: 100%;

    @include desktop {
        margin: 10px;
        padding: 20px;
        width: $desktopWidth;
    }

    &::after {
        flex-basis: 100%;
    }
}

@mixin inner-content-wrapper() {
    margin: 5px 0 10px;
    padding: 10px;
    border-radius: 5px;
    background-color: $color-grey-lighter;
}

@mixin nav-menu($desktopWidth: 720px) {
    margin: 0;
    padding: 0;
    list-style: none;

    @include desktop {
        padding: 5px;
    }
}

@mixin nav-menu-item($desktopWidth: 720px) {
    display: inline-block;
    margin: 0 4px;

    @include desktop {
        padding: 2px;
    }

    a {
        font-size: 0.9em;
        font-weight: bold;
        color: $color-black;
        text-decoration: none;
    }

    a:hover {
        color: $color-grey-dark;
    }
}

@mixin clear-ul-style {
    margin: 0;
    padding: 0;
    list-style: none;
}

@mixin vertical-center {
    top: 50%;
    transform: translateY(-50%);
}

@mixin horizontal-vertical-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@mixin form-button {
    padding: 7px 20px;
    background-color: $color-orange;
    border: 0;
    color: $color-white;
    border-radius: 16px;
    font-weight: bold;
}

@mixin form-grey-button {
    padding: 7px 20px;
    background-color: $color-grey-medium;
    border: 0;
    color: $color-white;
    border-radius: 16px;
    font-weight: bold;
}
