@import "../fonts/material-icons/material-icons.css";
@import "../vendor/animate.css";
@import "./vendor/noty.css";

@import "../components/tooltip.css";
@import "../components/switch.css";
@import "../components/app-avatar/app-avatar.css";
@import "../components/app-actionbar/app-actionbar.css";
@import "../components/app-fieldcontainer/app-fieldcontainer.css";
@import "../components/app-frame/app-frame.css";
@import "../components/app-loader/app-loader.css";
@import "../components/app-scrollcontainer/app-scrollcontainer.css";

@import "../vendor/kiss/lib.css";
@import "./vendor/kiss.css";

vue-view { display: block; }
vue-view:not([init="true"]) { display: none; }

:root {

    --app-header-background: var(--kiss-base-background-color);
    --app-border-radius: 3px;
    --app-shadow-color: rgba(0,0,0,0.12);

    --app-actionbar-bgcolor: #131720e6;

    --app-loader-color1: var(--kiss-color-primary);
    --app-loader-color2: #fff;
    --app-loader-cover-bg: var(--kiss-color-overlay);

    --app-fieldcontainer-border-color-active: var(--kiss-color-primary);
    --app-fieldcontainer-border-color-inactive: rgba(255, 255, 255, .1);
    --app-scrollbar-color: #000;
}

html[data-theme='light'] {
    --kiss-base-background-color: #f6f8fa;
    --kiss-base-text-color: #121212;
    --kiss-hr-color: rgba(0,0,0,.1);
    --kiss-link-hover-color: #1994ff;
    --kiss-button-default-background: #e0dee6;
    --kiss-button-default-color: #000;
    --kiss-color-alternate: #fff;
    --kiss-color-contrast: #fafcfe;
    --kiss-color-primary: #8932ff;
    --kiss-color-success: #4caf50;
    --kiss-color-warning: orange;
    --kiss-color-danger: #f91941;
    --kiss-color-muted: rgba(0,0,0,.55);
    --kiss-color-overlay: rgba(255,255,255, .8);

    --kiss-input-border-color: rgba(0,0,0,.1);
    --kiss-input-background: rgba(255,255,255,.5);
    --kiss-input-placeholder-color: rgba(0,0,0,.3);

    --kiss-dropdown-background: rgba(255,255,255,.95);

    --kiss-card-theme-contrast-color: #fff;
    --kiss-card-shadowed-color: rgba(0, 0, 0, 0.15);
    --kiss-card-bordered-color: rgb(106, 85, 85, .15);

    --kiss-input-background-active: #fff;
    --kiss-table-heading-background-color: #fff;
    --kiss-table-row-hover-color: #efefef;

    --app-shadow-color: rgba(0,0,0,0.12);
    --app-actionbar-bgcolor: #eff7f7e8;
    --app-loader-color2: #333;
    --app-fieldcontainer-border-color-inactive: rgba(0,0,0, .1);
    --app-scrollbar-color: var(--kiss-color-muted);
}

html[data-theme='light'] .kiss-bgcolor-transparentimage {
    background-image: linear-gradient(45deg, rgba(0,0,0, .15) 25%, transparent 25%), linear-gradient(-45deg, rgba(0,0,0, .15) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(0,0,0, .15) 75%), linear-gradient(-45deg, transparent 75%, rgba(0,0,0, .15) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

html[data-theme='light'] [active="true"] .kiss-tabs-nav-link:after {
    border-color: var(--kiss-color-primary);
    border-width: 2px;
}
html[data-theme='light'] .kiss-bgcolor-success,
html[data-theme='light'] .kiss-bgcolor-danger {
    color: #fff;
}

html[data-theme='light'] kiss-card[hover="shadow"]:hover {
    box-shadow: 0 2.8px 2.2px rgba(0, 0, 0, 0.014),
    0 6.7px 5.3px rgba(0, 0, 0, 0.028),
    0 12.5px 10px rgba(0, 0, 0, 0.04),
    0 22.3px 17.9px rgba(0, 0, 0, 0.052),
    0 41.8px 33.4px rgba(0, 0, 0, 0.066),
    0 100px 80px rgba(0, 0, 0, 0.06);
}

html[data-theme='light'] [src$="App/assets/logo.svg"] {
    filter: invert(1);
}

html[data-theme='light'] kiss-offcanvas kiss-content {
    --kiss-color-contrast: #fff;
}

html[data-theme='light'].login-page {
    background-image: url(../img/bg-light.svg);
}

@media (prefers-color-scheme: light) {
    html { --app-auto-theme: light; }
}

@media (prefers-color-scheme: dark) {
    html { --app-auto-theme: dark; }
}


* {
    scrollbar-width: thin;
    scrollbar-color: var(--app-scrollbar-color) var(--kiss-base-background-color);
}

/* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--kiss-base-background-color);
}

*::-webkit-scrollbar-thumb {
    background-color: var(--app-scrollbar-color);
    border-radius: 20px;
    border: 3px solid var(--kiss-base-background-color);
}

body {
    font-weight: 400;
    min-height: 100vh;
}

ins, del {
    color: #fff;
    text-decoration: none;
}

ins { background: #249924 }
del { background: #c92a2a }

.app-container {
    display: flex;
}

.app-container-aside {
    display: none;
    height: 100vh;
    margin-right: 20px;
    width: 50px;
    z-index: 5;
}

.has-side-panel .app-container-aside {
    width: 350px;
}

.app-container-aside-menu {
    position: fixed;
    display: flex;
    top: 0;
    left: 0;
    width: 50px;
    height: 100vh;
    padding-top: 10px;
    padding-bottom: 20px;
    flex-direction: column;
}

.app-container-aside-panel {
    position: fixed;
    display: flex;
    top: 0;
    left: 50px;
    padding: 20px 25px;
    flex-direction: column;
    width: 300px;
    height: 100vh;
    background: var(--kiss-card-theme-contrast-color, #171d28);
    box-shadow: 0 0 2px rgb(0 0 0 / 30%);
    overflow: auto;
}

.app-container-aside-menu kiss-navlist a {
    text-align: center;
}

.app-container-aside-menu kiss-navlist kiss-svg {
    margin-left: auto;
    margin-right: auto;
}

.app-container-aside-menu kiss-navlist ul > li > a {
    color: inherit;
    opacity: .65;
    transition: all 250ms;
}

.app-container-aside-menu kiss-navlist ul > li > a:hover{
    color: inherit;
    opacity: 1;
}

.app-container-aside-menu kiss-navlist ul > li.active > a {
    position: relative;
    color: var(--kiss-color-primary);
    font-weight: bold;
    opacity: 1;
}

.app-container-aside-menu kiss-navlist ul > li.active > a:before {
    content: "";
    position: absolute;
    width: 2px;
    top: 8px;
    left: 0;
    bottom: 8px;
    background: var(--kiss-color-primary);
}

.app-container-aside-menu kiss-navlist ul > li > * {
    display: flex;
    align-items: center;
    padding: 8px 0;
    letter-spacing: 1.5px;
}

.app-container-aside-menu kiss-navlist[space="small"] ul > li > * {
    padding: 6px 0;
    font-size: 18px;
}

.app-container-aside-menu kiss-navlist .kiss-nav-divider {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
    opacity: .8;
}

app-avatar canvas,
.app-border-radius {
    border-radius: var(--app-border-radius);
}

.app-switch,
.app-switch::before {
    border-radius: 60px;
}

label {
    display: block;
    font-weight: bold;
    font-size: .75em;
    line-height: inherit;
    letter-spacing: .015em;
    text-decoration: none;
    margin-bottom: 5px;
    color: var(--kiss-color-muted);
}

.login-page {
    background-image: url(../img/bg-dark.svg);
    background-position: 50%;
    background-attachment: scroll;
    background-size: auto;
    background-repeat: repeat;
    overflow: hidden;
}

.login-wrapper {
    position: relative;
    width:400px;
    max-width: 90%;
    margin-top: 20vh;
    padding: 30px;
    border-radius: 10px;
}

.login-wrapper::before {
    content: "";
    display: block;
    position:absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    background: var(--kiss-base-background-color);
    z-index: -1;
    opacity: .8;

    box-shadow:
        0 2.8px 2.2px rgba(0, 0, 0, 0.034),
        0 6.7px 5.3px rgba(0, 0, 0, 0.048),
        0 12.5px 10px rgba(0, 0, 0, 0.06),
        0 22.3px 17.9px rgba(0, 0, 0, 0.072),
        0 41.8px 33.4px rgba(0, 0, 0, 0.086),
        0 100px 80px rgba(0, 0, 0, 0.12);
}

app-fieldcontainer label {
    color: inherit;
}

app-header {
    display: block;
    position: relative;
    padding: 20px 0;
    background: var(--app-header-background);
    z-index: 6;
}

app-actionbar kiss-container {
    padding-left: var(--kiss-container-padding, 30px);
    padding-right: var(--kiss-container-padding, 30px);
}

.app-offcanvas-container {
    display: flex;
    height: 100vh;
    max-height: 100vh;
    flex-direction: column;
}

.app-offcanvas-content {
    overflow-y: auto;
    flex: 1;
}

.app-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.app-list-items > li {
    padding: 0;
    margin: 0;
}

.app-list-items > li:not(:first-child) {
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px var(--kiss-hr-color) solid;
}

[field="boolean"] {
    font-size: .95em;
}

.fields-renderer[nested="true"] .fields-renderer-field {
    display: inline-block;
    font-weight: normal;
    font-size: 11px;
}

.field-layout-dragarea {
    min-height: 47px;
    border-radius: var(--app-border-radius);
}

.sortable-chosen[data-draggable="true"] {
    border: 1px var(--kiss-color-primary) solid;
}

app-fieldcontainer app-fieldcontainer {
    all: unset;
    display: block;
}

app-pagination {
    display: inline-flex;
    align-items: center;
    padding: var(--kiss-padding-small, .6rem);
    background-color: var(--kiss-color-contrast);
    font-size: var(--kiss-font-size-small, var(--kiss-font-size-6, 0.875rem));
    border-radius: var(--app-border-radius);
}

.table-scroll {
    overflow-x: auto;
    white-space: nowrap;
}

.table-scroll > table {
    margin: 0;
}

.table-scroll [fixed] {
    position: sticky;
    position: -webkit-sticky;
    z-index: 1;
}

.table-scroll thead {
    position: relative;
    z-index: 2;
}

.table-scroll [fixed="top"] { top: 0; }
.table-scroll [fixed="left"] { left: 0; }
.table-scroll [fixed="right"] { right: 0; }


.table-scroll th[fixed] {background-color: var(--kiss-table-heading-background-color);}
.table-scroll td[fixed] {background: var(--kiss-color-contrast);}

kiss-dialog[type="app-search"] > kiss-content {
    margin-top: 15vh;
}

@media (min-width: 768px) {

    app-header {
        position: sticky;
        position: -webkit-sticky;
        top: 0;
    }

    app-actionbar {
        padding-left: 70px;
    }

    .has-side-panel app-actionbar {
        padding-left: 370px;
    }

    .app-container-aside {
        display: block;
    }

}
