@mixin button($type: '') {
    display: inline-block;
    font-weight: 600;
    font-size: .9em;
    line-height: 1em;
    border-radius: .5rem;
    text-align: center;
    text-decoration: none;
    -webkit-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    -ms-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    padding: 1rem;
    min-width: 10rem;
    color: $color-white;

    @if $type == 'success' {
        background-color: $color-success;
        border-top: 2px solid $color-success-light;
    } @else if $type == 'warning' {
        background-color: $color-warning;
        border-top: 2px solid $color-warning-light;
    } @else if $type == 'danger' {
        background-color: $color-danger;
        border-top: 2px solid $color-danger-light;
    } @else {
        font-weight: 700;
        color: $color-primary-dark;
        background-color: $color-white;
        box-shadow: $color-button-shadow;
    }

    &:hover {
        @if $type == 'success' {
            color: $color-success-dark !important;
        } @else if $type == 'warning' {
            color: $color-warning-dark !important;
        } @else if $type == 'danger' {
            color: $color-danger-dark !important;
        } @else {
            color: $color-primary !important;
        }
    }
}

@mixin link-style($type: '') {
    a {
        text-decoration: none;
        transition: .4s all;

        @if $type == 'light' {
            color: $color-white;
        } @else {
            color: $color-primary;
        }

        &:hover {
            @if $type == 'light' {
                color: $color-primary;
            } @else {
                color: $color-primary-dark;
            }
        }
    }
}

@mixin title {
    .title {
        width: 100%;
        display: flex;
        text-align: center;
        align-items: center;

        h1, h2, h3, span {
            margin: 0;
            font-weight: var(--font-weight);
            font-size: var(--font-size);
            line-height: var(--line-height);
    
            @media (max-width: $breakpoint-lg) {
                & {
                    font-size: var(--font-size-lg);
                    line-height: var(--line-height-lg);
                }
            }
    
            @media (max-width: $breakpoint-md) {
                & {
                    font-size: var(--font-size-md);
                    line-height: var(--line-height-md);
                }
            }
    
            @media (max-width: $breakpoint-sm) {
                & {
                    font-size: var(--font-size-sm);
                    line-height: var(--line-height-sm);
                }
            }
        }
    }
}

@mixin color-buttons {
    &.info {
        background-color: var(--color-button-column-info-bg);
        border-top: 2px solid var(--color-button-column-info-border);

        &:hover {
            background-color: var(--color-button-column-info-hover);
        }
    }

    &.success {
        background-color: var(--color-button-column-success-bg);
        border-top: 2px solid var(--color-button-column-success-border);

        &:hover {
            background-color: var(--color-button-column-success-hover);
        }
    }

    &.warning {
        background-color: var(--color-button-column-warning-bg);
        border-top: 2px solid var(--color-button-column-warning-border);

        &:hover {
            background-color: var(--color-button-column-warning-hover);
        }
    }

    &.danger {
        background-color: var(--color-button-column-danger-bg);
        border-top: 2px solid var(--color-button-column-danger-border);

        &:hover {
            background-color: var(--color-button-column-danger-hover);
        }
    }
}

@mixin heading {
    .heading {
        width: 100%;
        display: flex;
        text-align: center;
        align-items: center;

        h1, h2, h3, span {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            align-items: center;
            margin: 0;
            font-weight: var(--font-weight);
            font-size: var(--font-size);
            line-height: var(--line-height);
    
            @media (max-width: $breakpoint-lg) {
                & {
                    font-size: var(--font-size-lg);
                    line-height: var(--line-height-lg);
                }
            }
    
            @media (max-width: $breakpoint-md) {
                & {
                    font-size: var(--font-size-md);
                    line-height: var(--line-height-md);
                }
            }
    
            @media (max-width: $breakpoint-sm) {
                & {
                    font-size: var(--font-size-sm);
                    line-height: var(--line-height-sm);
                }
            }
        }
    }
}

@mixin message {
    .message {
        font-size: 1.2rem;
        text-align: center;
        padding: 1rem;
        color: var(--color-white);

        &.danger {
            background-color: var(--color-message-bg);
            border: 1px solid var(--color-message-border);
        }

        &.info {
            background-color: var(--color-primary);
            border: 1px solid var(--color-primary-dark);
        }
    }
}