//---------------------------------------------------------------------------------------
// Additions are for extra classes not found in the normal Bootstrap
// WARNING: Do not create alot of new things here, remember always try to tweak and variable
// or override bootstrap css before trying to create something new.
//---------------------------------------------------------------------------------------
// sass-lint:disable force-element-nesting, force-pseudo-nesting

// The label element is no longer bolded by default, neither is this class defined
.control-label {
    font-weight: 700;
}

// Remove background and left padding on page breadcrumbs
.breadcrumb.page-breadcrumb {
    background: transparent;
    margin-bottom: 10px;
    margin-top: -5px;
    padding-left: 0;
}

// Option to keep footer at the bottom of the page
@each $breakpoint in map-keys($grid-breakpoints) {
    $infix: breakpoint-infix($breakpoint, $grid-breakpoints);

    @include media-breakpoint-up($breakpoint) {

        // Set on html element to keep footer at bottom of window short pages
        .fill-height#{$infix} {
            height: 100%;

            body,
            .fill-body {
                display: flex;
                flex-flow: column nowrap;
                min-height: 100%;
            }

            // Apply to extra container element(s) around the main
            .fill-body {
                flex: auto;
            }

            header,
            .header,
            footer,
            .footer {
                flex: none;
            }

            main,
            .main {
                flex: auto;
                overflow: auto;
            }
        }
    }
}

$info-alert-border-level: -4;

// Request a theme color level
@function panel-border-level($color-name: "primary") {
    @if ($color-name =='info' or $color-name =='warning') {
        @return $info-alert-border-level;
    }

    @return $alert-border-level;
}

// Add panel-success, panel-info etc. equivalents (like bootstrap v3)
@each $color, $value in (primary, secondary, success, info, warning, danger) {
    .card-#{$color} {
        border-color: theme-color-level($color, panel-border-level($color));

        >.card-header {
            @include gradient-bg(theme-color-level($color, $alert-bg-scale));
            border-color: theme-color-level($color, panel-border-level($color));
            color: theme-color-level($color, $alert-color-scale);
        }

        >.card-footer {
            border-color: theme-color-level($color, panel-border-level($color));
        }
    }
}