$widget-border-width: 1px !default;

@include exports( "common/asp-fallback-class" ) {

    .k-theme-test-class,
    .k-common-test-class {
        opacity: 0;
    }

}

@include exports( "common/layout" ) {

    // Layout
    .k-reset {
        margin: 0;
        padding: 0;
        border-width: 0;
        outline: 0;
        text-decoration: none;
        font: inherit;
        list-style: none;
    }


    // Layout
    .k-widget {
        border-width: $widget-border-width;
        border-style: solid;
        box-sizing: border-box;
        outline: 0;
        font-family: $font-family;
        font-size: $font-size;
        line-height: $line-height;
        display: block;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: $rgba-transparent;
    }
    table.k-widget { display: table; }

    kendo-sortable {
        display: block;
    }


    // Overlay
    .k-overlay {
        width: 100%;
        height: 100%;
        background-color: $backdrop-bg;
        opacity: $backdrop-opacity;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 10001;
    }


    // RTL
    .k-rtl {
        direction: rtl;
    }


    // Links
    .k-link,
    .k-link:hover {
        color: inherit;
        text-decoration: none;
        outline: 0;
        cursor: pointer;
    }

    // Outline
    .k-content {
        outline: 0;
    }


    // Centering
    .k-centered {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }


    // Disable mouse events
    .k-no-click {
        pointer-events: none;
    }


    // Off-screen container used during PDF export
    .k-pdf-export-shadow {
        position: absolute;
        overflow: hidden;
        left: -15000px;
        width: 14400px;
    }

    // PDF export icons fix
    .kendo-pdf-hide-pseudo-elements::before,
    .kendo-pdf-hide-pseudo-elements::after {
        // sass-lint:disable-block no-important
        display: none !important;
    }
}


@include exports( "common/theme" ) {

    // Text selection
    .k-text-selection {
        ::selection {
            background-color: $primary;
            color: $primary-contrast;
        }
    }

    // Widget
    .k-widget {
        @extend .k-text-selection;
        @include fill(
            $widget-text,
            $widget-bg,
            $widget-border
        );
    }

    // Panels
    .k-block,
    .k-panel {
        @extend .k-text-selection;
        @include border-radius();
        @include fill(
            $panel-text,
            $panel-bg,
            $panel-border
        );
        padding: $panel-padding-y $panel-padding-x;
        border-width: 1px;
        border-style: solid;
        box-sizing: border-box;

        > .k-header {
            @include border-top-radius();
            @include fill(
                $header-text,
                $header-bg,
                $header-border,
                $header-gradient
            );
            margin: #{-$panel-padding-y} #{-$panel-padding-x} $panel-padding-y;
            padding: $header-padding-y $header-padding-x;
        }
    }
    .k-content {
        @include fill(
            $panel-text,
            $panel-bg,
            $panel-border
        );
    }

}


@include exports( "common/disabled" ) {

    // Disabled state
    .k-state-disabled,
    .k-widget[disabled] {
        @include disabled( $disabled-styling );


        .k-link,
        .k-button {
            cursor: default;
            outline: 0;
        }


        // Nested disabled
        [disabled],
        .k-state-disabled {
            opacity: 1;
            filter: grayscale(0);
        }
    }

}


@include exports( "common/misc/hr" ) {

    .k-hr {
        margin: $spacer-y auto;
        padding: 0;
        height: 0;
        border-width: 1px 0 0;
        border-style: solid;
        border-color: $panel-border;
        display: block;
        float: none;
        clear: both;
    }

    // Horizontal rule
    .k-hbox > .k-hr {
        margin: 0;
        width: 0;
        height: auto;
        border-width: 0 0 0 1px;
        flex: 0 0 auto;
    }

    // Vertical rule
    .k-vbox > .k-hr {
        margin: 0;
        flex: 0 0 auto;
    }

}


@include exports( "common/misc/dirty" ) {

    // Dirty indicator
    .k-dirty {
        margin: 0;
        padding: 0;
        width: 0;
        height: 0;
        border-width: 3px;
        border-style: solid;
        border-color: $error $error transparent transparent;
        position: absolute;
        top: 0;
        right: 0;
    }

    [dir = "rtl"],
    .k-rtl {
        .k-dirty {
            border-color: transparent transparent $error $error;
            right: auto;
            left: 0;
        }
    }

}

@include exports( "common/placeholder" ) {

    .k-placeholder-line {
        width: $placeholder-line-width;
        height: $placeholder-line-height;
        background-color: $placeholder-bg;
        display: inline-block;
    }
}
