/* ---------------------------------------

[Main Stylesheet]

Project:    	  Hyiprio Admin
Version:    	  1.0
Primary Use:    Admin Dashboard

------------------------------------------

[Table of contents]

1. Fonts
2. Reset Css
3. Global Settings
4. Section Styles
5. Colors
6. Margin and Padding
7. Background Overlay
8. Buttons Style
9. Preloader
10. ScrollUp Button

-------------------------------------------*/

// Veriables
$primary: #5e3fc9;
$primary2: #5332cc;
$black: #151d30;
$blue: #101935;
$gray: #d2d3d8;
$red: #ef476f;
$yellow: #ffc300;
$green: #2a9d8f;
$white: #ffffff;

$card1: #ef476f;
$card2: #227c9d;
$card3: #003566;
$card4: #718355;
$card5: #ee6c4d;
$card6: #6d597a;
$card7: #3d405b;

$grad-bg: linear-gradient(95deg, #059dff 15%, #6549d5 45%, #e33fa1 75%, #fb5343) 95%/200% 100%;
$grad-bg-2: linear-gradient(to right, #12c2e9, #c471ed, #f64f59);

/* Google Font */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap");

@font-face {
    font-family: sofia pro;
    src: url("../../global-assets/fonts/SofiaPro.eot");
    src: url("../../global-assets/fonts/SofiaPro.eot?#iefix") format("embedded-opentype"),
    url("../../global-assets/fonts/SofiaPro.woff2") format("woff2"),
    url("../../global-assets/fonts/SofiaPro.woff") format("woff"),
    url("../../global-assets/fonts/SofiaPro.ttf") format("truetype"),
    url("../../global-assets/fonts/SofiaPro.svg#SofiaPro") format("svg");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: sofia pro;
    src: url("../../global-assets/fonts/SofiaPro-Medium.eot");
    src: url("../../global-assets/fonts/SofiaPro-Medium.eot?#iefix") format("embedded-opentype"),
    url("../../global-assets/fonts/SofiaPro-Medium.woff2") format("woff2"),
    url("../../global-assets/fonts/SofiaPro-Medium.woff") format("woff"),
    url("../../global-assets/fonts/SofiaPro-Medium.ttf") format("truetype"),
    url("../../global-assets/fonts/SofiaPro-Medium.svg#SofiaPro-Medium") format("svg");
    font-weight: 500;
    font-style: normal;
}

// AntIcon
@font-face {
    font-family: "anticon";
    src: url("../../global-assets/fonts/anticon.eot");
    src: url("../../global-assets/fonts/anticond41d.eot?#iefix") format("embedded-opentype"),
    url("../../global-assets/fonts/anticon.woff") format("woff"),
    url("../../global-assets/fonts/anticon.ttf") format("truetype"),
    url("../../global-assets/fonts/anticon.svg#anticon") format("svg");
    font-weight: normal;
    font-style: normal;
}

/* Reset Css */

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Manrope", sans-serif;
    font-weight: 400;
    color: $black;
    background: rgba($blue, $alpha: 0.03);
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: "";
    content: none;
}

input {
    outline: none;
}

button {
    border: 0;
    outline: none;
    transition: 0.3s;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
}

a {
    text-decoration: none;
    transition: 0.2s;
}

ul {
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
}

/* colors */
.black-color {
    color: $black;
}

.blue-color {
    color: $blue;
}

.primary-color {
    color: $primary;
}

.white-color {
    color: $white;
}

.yellow-color {
    color: $yellow;
}

.red-color {
    color: $red;
}

.green-color {
    color: $green;
}

/* Backgrounds */
.black-bg {
    background: $black;
}

.blue-bg {
    background: $blue;
}

.primary-bg {
    background: $primary;
}

.primary-overlay {
    background-size: cover !important;
    position: relative;
    z-index: 1;

    &::after {
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 100%;
        background: $primary;
        content: "";
        z-index: -1;
        opacity: 0.3;
    }
}

// Button Styles
.site-btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 3px;
    color: $black;
    background: $white;
    font-weight: 600;
    font-size: 15px;

    &:hover {
        background: $primary;
        color: $white;
    }

    &:focus {
        background: $primary;
        color: $white;
        border: 0;
        box-shadow: none;
    }

    &:active {
        background: $primary;
        color: $white;
        border: 0;
        box-shadow: none;
    }

    svg {
        margin-right: 4px;
        height: 16px;
        position: relative;
        top: -2px;
    }
}

.site-btn-sm {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 3px;
    color: $black;
    background: $white;
    font-weight: 600;
    font-size: 14px;
    text-transform: capitalize;

    &:hover {
        background: $primary;
        color: $white;
    }

    svg {
        height: 16px;
        position: relative;
        top: -1px;
    }
}

.site-btn-xs {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 3px;
    color: $black;
    background: $white;
    font-weight: 700;
    font-size: 12px;
    text-transform: capitalize;

    &:hover {
        background: $primary;
        color: $white;
    }

    svg {
        margin-right: 5px;
        width: 14px;
        position: relative;
        top: -1px;
    }
}

.site-btn-round {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    height: 40px;
    width: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    text-decoration: none;
    color: $white;
    background: $primary;

    &:hover {
        background: $red;
        color: $white;
    }
}

.round-icon-btn {
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    margin-right: 3px;
    color: $white;
    display: inline-block;
    text-align: center;

    svg {
        height: 14px;
    }
}

.spining-icon {
    animation-name: spining;
    animation-duration: 700ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

@keyframes spining {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.primary-btn {
    color: $white;
    background: $primary;

    &:hover {
        background: $primary2;
        color: $white;
    }
}

.blue-btn {
    background: $blue;
    color: $white;

    &:hover {
        background: $primary;
        color: $white;
    }
}

.green-btn {
    background: $green;
    color: $white;

    &:hover {
        background: $blue;
        color: $white;
    }
}

.grad-btn {
    background: $grad-bg;
    color: $white;

    &:hover {
        background: $grad-bg;
        color: $white;
    }
}

.red-btn {
    background: $red;
    color: $white;

    &:hover {
        background: $blue;
        color: $white;
    }
}

.black-btn {
    background: $black;
    color: $white;

    &:hover {
        background: $primary;
        color: $white;
    }
}

/* toTop Button */
#scrollUp {
    background: rgba($primary, $alpha: 0.3);
    color: $primary;
    right: 30px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
}

#scrollUp:hover {
    background: $primary;
    color: $white;
}

@media (prefers-reduced-motion: no-preference) {
    :root {
        scroll-behavior: initial;
    }
}

.centered {
    text-align: center;
}

.text-uppercase {
    text-transform: uppercase;
}

/* Custom Scrollbar */
// ::-webkit-scrollbar {
//   width: 0px;
// }
// ::-webkit-scrollbar-thumb {
//   border-radius: 10px;
//   background: $primary;
// }
// ::-webkit-scrollbar-track {
//   border-radius: 10px;
//   background: $blue;
// }

// ::-webkit-scrollbar{
//   width:5px;
//   height:5px;
//   border-radius:50px!important
// }
// ::-webkit-scrollbar-track{
//   background: $blue;
// }
// ::-webkit-scrollbar-thumb{
//   background: $blue;
// }
// ::-webkit-scrollbar-thumb:hover{
//   background: $primary;
// }

/* Form Switch */
.form-check {
    &.form-switch {
        display: flex;
        align-items: center;

        .switch-label {
            font-size: 14px;
            font-weight: 700;
        }

        input {
            height: 18px;
            width: 35px;
            box-shadow: none !important;

            &.form-check-input:checked {
                background-color: $primary;
                border-color: $primary;
                box-shadow: none;
            }

            &.big {
                height: 28px;
                width: 55px;
            }
        }
    }

    &.role-permission-switch {
        justify-content: space-between;
        box-shadow: 0px 0px 2px rgba($primary, $alpha: 0.4);
        margin-bottom: 30px;
        background: $white;
        border-radius: 4px;
        padding: 20px;
    }
}


/* Custom Switches */

@mixin can-toggle-branding(
    $can-toggle-off-color: $blue,
    $can-toggle-on-color: $primary,
    $can-toggle-inactive-text: rgba($white, 0.7),
    $can-toggle-transition: cubic-bezier(0,1,0.5,1)
) {

    input[type="checkbox"] {

        &[disabled] ~ label {
            color: rgba($can-toggle-off-color, 0.5);
        }

        &:focus ~ label, &:hover ~ label {
            .can-toggle__switch {
                background-color: $can-toggle-off-color;

                &:after {
                    color: darken($can-toggle-off-color, 10%);
                }
            }
        }

        &:hover ~ label {
            color: darken($can-toggle-off-color, 5%);
        }

        &:checked {
            ~ label {
                &:hover {
                    color: darken($can-toggle-on-color, 3%);
                }

                .can-toggle__switch {
                    background-color: lighten($can-toggle-on-color, 5%);

                    &:after {
                        color: darken($can-toggle-on-color, 5%);
                    }
                }
            }

            &:focus, &:hover {
                ~ label {
                    .can-toggle__switch {
                        background-color: $can-toggle-on-color;

                        &:after {
                            color: darken($can-toggle-on-color, 10%);
                        }
                    }
                }
            }
        }
    }

    label {

        .can-toggle__label-text {
            flex: 1;
        }

        .can-toggle__switch {
            transition: background-color 0.3s $can-toggle-transition;
            background: lighten($can-toggle-off-color, 5%);

            &:before {
                color: $can-toggle-inactive-text;
            }

            &:after {
                // Autoprefixer choked here, so making the prefixes explicit
                -webkit-transition: -webkit-transform 0.3s $can-toggle-transition;
                transition: transform 0.3s $can-toggle-transition;
                color: $can-toggle-off-color;
            }
        }

    }
}

@mixin can-toggle-appearance(
    $can-toggle-width: 134px,
    $can-toggle-height: 36px,
    $can-toggle-border-radius: 4px,
    $can-toggle-offset: 2px,
    $can-toggle-label-font-size: 14px,
    $can-toggle-switch-font-size: 12px,
    $can-toggle-shadow: 0 3px 3px rgba($blue, 0.4)
) {
    $can-toggle-switch-width: $can-toggle-width/2;

    input[type="checkbox"] {

        // &:focus ~ label, &:hover ~ label {
        //   .can-toggle__switch {
        //     &:after { box-shadow: $can-toggle-shadow; }
        //   }
        // }

        &:checked {
            ~ label {
                .can-toggle__switch {
                    &:after {
                        transform: translate3d($can-toggle-width - ($can-toggle-switch-width + $can-toggle-offset), 0, 0);
                    }
                }
            }

            // &:focus, &:hover {
            //   ~ label {
            //     .can-toggle__switch { &:after { box-shadow: $can-toggle-shadow; } }
            //   }
            // }
        }
    }

    label {
        font-size: $can-toggle-label-font-size;

        .can-toggle__switch {
            height: $can-toggle-height;
            flex: 0 0 $can-toggle-width;
            border-radius: $can-toggle-border-radius;

            &:before {
                left: $can-toggle-width/2;
                font-size: $can-toggle-switch-font-size;
                line-height: $can-toggle-height;
                width: $can-toggle-width/2;
                padding: 0 12px;
                font-weight: 700;
            }

            &:after {
                top: $can-toggle-offset;
                left: $can-toggle-offset;
                border-radius: $can-toggle-border-radius/2;
                width: $can-toggle-switch-width - $can-toggle-offset;
                line-height: $can-toggle-height - ($can-toggle-offset*2);
                font-size: $can-toggle-switch-font-size;
                font-weight: 700;
            }

            // &:hover {
            //   &:after { box-shadow: $can-toggle-shadow; }
            // }
        }
    }
}

.can-toggle {
    position: relative;

    *, *:before, *:after {
        box-sizing: border-box;
    }

    //overflow: hidden;

    input[type="checkbox"] {
        opacity: 0;
        position: absolute;
        top: 0;
        left: 0;

        &[disabled] ~ label {
            pointer-events: none;

            .can-toggle__switch {
                opacity: 0.4;
            }
        }

        &:checked {
            ~ label {

                .can-toggle__switch {

                    &:before {
                        content: attr(data-unchecked);
                        left: 0;
                    }

                    &:after {
                        content: attr(data-checked);
                    }
                }
            }
        }
    }

    label {
        user-select: none;
        position: relative;
        display: flex;
        align-items: center;

        .can-toggle__label-text {
            flex: 1;
            padding-left: 32px;
        }

        .can-toggle__switch {
            position: relative;

            &:before {
                content: attr(data-checked);
                position: absolute;
                top: 0;
                text-transform: uppercase;
                text-align: center;
            }

            &:after {
                content: attr(data-unchecked);
                position: absolute;
                z-index: 5;
                text-transform: uppercase;
                text-align: center;
                background: $white;
                transform: translate3d(0, 0, 0);
            }

        }

    }

    // Default values for .can-toggle class
    @include can-toggle-branding;
    @include can-toggle-appearance;

    // Create toggles of different sizes by overriding the can-toggle-appearance mixin defaults
    &.can-toggle--size-small {
        @include can-toggle-appearance(
                90px, // Toggle width
                28px, // Toggle height
                2px, // Toggle border radius
                1px, // Offset (distance btw switch and box)
                13px, // Label font size
                12px, // Switch font size
        );
    }

    &.can-toggle--size-large {
        @include can-toggle-appearance(
                160px, // Toggle width
                50px, // Toggle height
                4px, // Toggle border radius
                2px, // Offset (distance btw switch and box)
                14px, // Label font size
                14px, // Switch font size
        );
    }

    // Or re-brand the toggle for different applications
    &.demo-rebrand-1 {
        @include can-toggle-branding(
                $red, // Off state color
                $green, // On state color
                rgba($white, 0.6), // Off state text color
                ease-in-out // Transition timing function
        );
    }

    &.demo-rebrand-2 {
        @include can-toggle-branding(
                $blue, // Off state color
                $green, // On state color
                rgba($white, 0.7), // Off state text color
                cubic-bezier(0.860, 0.000, 0.070, 1.000) // Transition timing function
        );
        @include can-toggle-appearance(
                120px, // Toggle width
                60px, // Toggle height
                60px, // Toggle border radius
                2px, // Offset (distance btw switch and box)
                13px, // Label font size
                13px, // Switch font size
        );
    }
}

/* Switch Field */
.switch-field {
    display: flex;
    margin-bottom: 20px;
    overflow: hidden;

    input {
        position: absolute !important;
        clip: rect(0, 0, 0, 0);
        height: 1px;
        width: 1px;
        border: 0;
        overflow: hidden;

        &:checked {
            + label {
                background-color: $primary;
                box-shadow: none;
                color: $white;

                &:last-of-type {
                    background: $red;
                }
            }
        }
    }

    label {
        background-color: rgba($primary, $alpha: 0.1);
        color: rgba($blue, $alpha: 0.6);
        font-size: 14px;
        line-height: 1;
        text-align: center;
        padding: 8px 16px;
        margin-right: -1px;
        border: 1px solid rgba($blue, $alpha: 0.2);
        transition: all 0.1s ease-in-out;
        font-weight: 700;
        width: 50%;

        &:hover {
            cursor: pointer;
        }

        &:first-of-type {
            border-radius: 4px 0 0 4px;
        }

        &:last-of-type {
            border-radius: 0 4px 4px 0;
        }
    }

    &.same-type {
        input {
            &:checked {
                + label {
                    &:last-of-type {
                        background: $primary;
                    }
                }
            }
        }

        label {
            padding: 13px 16px;
            border: 2px solid rgba($blue, $alpha: 0.2);
        }
    }
}


/* Image Preview */
.wrap-custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 150px;
    text-align: center;
    border: 1px dashed #d2d3d8;
    border-radius: 8px;

    input[type="file"] {
        position: absolute;
        top: 0;
        left: 0;
        width: 2px;
        height: 2px;
        overflow: hidden;
        opacity: 0;
    }

    label {
        z-index: 1;
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        right: 0;
        width: 100%;
        overflow: hidden;
        cursor: pointer;
        border-radius: 8px;
        transition: transform 0.4s;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        -webkit-transition: -webkit-transform 0.4s;
        -moz-transition: -moz-transform 0.4s;
        -ms-transition: -ms-transform 0.4s;
        -o-transition: -o-transform 0.4s;
        transition: transform 0.4s;

        span {
            display: block;
            color: $blue;
            font-size: 14px;
            -webkit-transition: color 0.4s;
            -moz-transition: color 0.4s;
            -ms-transition: color 0.4s;
            -o-transition: color 0.4s;
            transition: color 0.4s;
        }

        .upload-icon {
            width: 40px;
            margin: 0 auto;
            margin-bottom: 15px;
        }

        &.file-ok {
            //Styles img background
            background-repeat: no-repeat;
            background-position: center center;
            background-size: contain;

            span {
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                padding: 0.3rem;
                font-size: 14px;
                font-weight: 700;
                color: $white;
                background-color: rgba($primary, $alpha: 0.5);
            }

            .upload-icon {
                display: none;
            }
        }
    }
}


/* Custom Checkboxes */
.custom-form-group {
    display: block;
    margin-bottom: 15px;
}

.custom-form-group input {
    padding: 0;
    height: initial;
    width: initial;
    margin-bottom: 0;
    display: none;
    cursor: pointer;
}

.custom-form-group label {
    position: relative;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.custom-form-group label:before {
    content: '';
    -webkit-appearance: none;
    background-color: transparent;
    border: 2px solid $primary;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0px -15px 10px -12px rgba(0, 0, 0, 0.05);
    padding: 9px;
    display: inline-block;
    position: relative;
    vertical-align: middle;
    cursor: pointer;
    margin-right: 10px;
    border-radius: 4px;
}

.custom-form-group input:checked + label:after {
    content: '';
    display: block;
    position: absolute;
    top: 4px;
    left: 8px;
    width: 6px;
    height: 14px;
    border: solid $primary;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


/* Site Toaster */

.toast__container {
    display: table-cell;
    vertical-align: middle;
}

.toast__cell {
    display: inline-block;
}


.toast__svg {
    fill: #fff;
}

.site-toaster {
    text-align: left;
    padding: 21px 0;
    background-color: #fff;
    border-radius: 4px;
    max-width: 500px;
    top: 0px;
    position: relative;
    box-shadow: 1px 7px 14px -5px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}


.site-toaster:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;

}

.toast__icon {
    position: absolute;
    top: 50%;
    left: 22px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-block;
    text-align: center;
    color: $white;

    svg {
        height: 16px;
    }
}

.toast__type {
    color: $black;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 8px;
}

.toast__message {
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 0;
    color: rgba($black, $alpha: 0.8);
}

.toast__content {
    padding-left: 70px;
    padding-right: 60px;
}

.toast__close {
    position: absolute;
    right: 22px;
    top: 50%;
    width: 14px;
    cursor: pointer;
    height: 14px;
    fill: #878787;
    transform: translateY(-50%);
}

.toast--green .toast__icon {
    background-color: #2BDE3F;
}

.toast--green:before {
    background-color: #2BDE3F;
}

.toast--blue .toast__icon {
    background-color: #1D72F3;
}

.toast--blue:before {
    background-color: #1D72F3;
}

.toast--yellow .toast__icon {
    background-color: #FFC007;
}

.toast--yellow:before {
    background-color: #FFC007;
}

/* Bootstrap toast */
.toast {
    background: $white;

    .toast-body {
        padding: 30px 20px;

        .btn-close {
            position: absolute;
            right: 30px;
            top: 30px;
        }

        .main-toast {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;

            .icon {
                margin-right: 20px;
                height: 40px;
                width: 40px;
                line-height: 40px;
                text-align: center;
                border-radius: 50%;
                color: $white;

                svg {
                    height: 18px;
                }

                &.success {
                    background: $primary;
                }

                &.danger {
                    background: $red;
                }

                &.warning {
                    background: $yellow;
                    color: rgba($black, $alpha: 0.6);
                }
            }

            .content {
                .title {
                    font-size: 16px;
                    font-weight: 700;
                    color: $black;
                    margin-bottom: 5px;
                }

                p {
                    font-size: 14px;
                    margin-bottom: 0;
                    color: rgba($black, $alpha: 0.8);
                }
            }
        }
    }
}

/* Simple Notify Js */
.notify-live {
    font-family: inherit;

    &.notify--success {
        box-shadow: none;
        border: 1px solid $primary;

        .notify__icon {
            background: $primary;
            border-radius: 50%;
            color: $white;

            svg {
                height: 16px;
            }
        }

        &::before {
            background-color: $primary !important;
        }
    }

    &.notify--error {
        box-shadow: none;
        border: 1px solid $red;

        .notify__icon {
            background: $red;
            border-radius: 50%;
            color: $white;

            svg {
                height: 16px;
            }
        }

        &::before {
            background-color: $red !important;
        }
    }

    &.notify--warning {
        box-shadow: none;
        border: 1px solid $yellow;

        .notify__icon {
            background: $yellow;
            border-radius: 50%;
            color: $white;

            svg {
                height: 16px;
            }
        }

        &::yellow {
            background-color: $primary !important;
        }
    }

    &.notify--info {
        box-shadow: none;
        border: 1px solid $green;

        .notify__icon {
            background: $green;
            border-radius: 50%;
            color: $white;

            svg {
                height: 16px;
            }
        }

        &::before {
            background-color: $green !important;
        }
    }
}
