﻿:root {
    --body-bg: #f1f4f9;
    --header-height: 70px;
    --header-bg: #fff;
    --navbar-height: 55px;
    --navbar-bg: #191e3a;
    --footer-height: 60px;
    --body-color: var(--bs-body);
    --color-1: var(--navbar-bg);
    --color-2: #f59200;
    --color-3: var(--bs-info);
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

a, a:hover, a:active, a:focus, input:focus, input:active, input:hover, select:focus, textarea:focus, :focus {
    text-decoration: none;
    outline: none;
    box-shadow: none !important;
}

.action-buttons {
    display: flex;
    flex-direction: row-reverse;

    button, a {
        background-color: transparent;
        border: none;
        margin: 0px 4px;
    }
}

.ck-editor__editable {
    min-height: 250px;
}

.ck-content {
    font-family: "Poppins", sans-serif !important;
    font-size: 16px;
    line-height: 1.6;
}

.logo {
    margin-right: auto !important;
    font-family: "Righteous", sans-serif !important;
    font-size: 2.5rem;
    background: linear-gradient(90deg, blue, red 70%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    line-height: 2.5rem;
}



h1, h2, h3, h4, h5, h6, th {
    margin: 0;
    font-family: "Stack Sans Headline", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-weight: 400;
}

body {
    font-family: "Poppins", sans-serif !important;
    min-height: 100dvh;
    background-color: var(--body-bg);
    display: grid;
    font-size: 16px;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: minmax(0, 1fr);
}


header {
    background-color: var(--header-bg);
    z-index: 10;
    position: sticky;
    top: 0;

    .container {
        height: 100%;
        display: flex;
        justify-content: end;
        align-items: center;
    }

    .nav-toggler {
        height: var(--header-height);
        align-content: center;
        font-size: 2.5rem;
    }



    a {
        display: block;
        color: var(--body-color);
    }

    .user {
        display: block;
        position: relative;

        img {
            height: 36px;
            width: 36px;
            aspect-ratio: 1/1;
            border-radius: 50%;
            box-shadow: rgba(0,0,0,.5) 0px 0px 5px;
            margin: 4px 10px 4px 4px;
        }

        &:hover .submenu {
            position: absolute;
            top: 100%;
            left: 0px;
            opacity: 1;
        }
    }
}

nav {
    background-color: var(--navbar-bg);
    white-space: nowrap;
    text-wrap: nowrap;

    .container {
        display: grid;
    }

    a {
        padding: 5px 20px;
        display: block;
        height: 100%;
        align-content: center;
    }

    ul.mainmenu {
        padding: 0;
        margin: 0;
        list-style: none;
        gap: 5px;

        > li {
            position: relative;

            > a {
                color: #fff;

                &:hover,
                &.active {
                    color: var(--color-2);
                }

                &:has(+.submenu):after {
                    content: "\f107";
                    font-family: "Font Awesome 7 Free";
                    font-weight: 900;
                    margin-left: 5px;
                }
            }
        }
    }

    .nav-toggler {
        color: #fff;
        font-size: 1.5rem;
        display: block;
        text-align: right;

        a {
            color: #fff;
        }
    }
}

main {
    z-index: 8;

    .page-title {
        margin: 20px 0px;

        h2 {
            margin-top: .3rem;
            font-size: 1.5rem;
            line-height: 1.5rem;
            padding-left: 4px;
        }

        ul {
            padding: 0;
            margin: 0;
            padding-left: 5px;
            list-style: none;
            display: flex;
            white-space: nowrap;
            text-wrap: nowrap;

            i {
                margin-right: 7px;
            }

            li:not(:last-child):after {
                content: '>';
                margin: 0px 8px;
            }
        }
    }

    .page-content {
        margin-top: 10px;
        margin-bottom: 20px;

        .instructions {
            min-height: 100%;
        }
    }
}


footer {
    background-color: #fff;
    display: grid;
    align-items: center;
    border-top: 2px solid rgba(0,0,0,.3);
    z-index: 7;
}


.submenu ul {
    list-style: none;
}

form {
    resize: none;

    .form-label {
        user-select: none;
        font-weight: 500;
    }

    .form-control, .form-select {
        padding: 10px 20px;
        border: 1px solid #bfc9d4;
    }

    .input-validation-error {
        border-color: var(--bs-danger);
    }

    .field-validation-error {
        color: var(--bs-danger);
    }
}

@keyframes modal-pop-in {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }

    45% {
        transform: scale(1.05);
    }

    80% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes modal-pop-out {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.7);
        opacity: 0;
    }
}


.badge {
    &.badge-primary {
        background-color: color-mix(in srgb, var(--bs-primary) 30%, transparent);
        color: var(--bs-primary);
    }

    &.badge-success {
        background-color: color-mix(in srgb, var(--bs-success) 30%, transparent);
        color: var(--bs-success);
    }

    &.badge-danger {
        background-color: color-mix(in srgb, var(--bs-danger) 30%, transparent);
        color: var(--bs-danger);
    }

    &.badge-secondary {
        background-color: color-mix(in srgb, var(--bs-secondary) 30%, transparent);
        color: var(--bs-secondary);
    }

    &.badge-warning {
        background-color: color-mix(in srgb, var(--bs-warning) 30%, transparent);
        color: var(--bs-warning);
    }

    &.badge-info {
        background-color: color-mix(in srgb, var(--bs-info) 30%, transparent);
        color: var(--bs-info);
    }
}

.dragable {
    cursor: grab;
    user-select: none;

    &:active {
        cursor: grabbing;
    }
}

.drag-handle {
    width: 36px;
    text-align: center;
    vertical-align: middle;

    &:before {
        content: "\f3fe";
        display: inline-block;
        font-family: bootstrap-icons !important;
        font-style: normal;
        font-weight: 400 !important;
        font-variant: normal;
        text-transform: none;
        line-height: 1;
        vertical-align: -.125em;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-align: center;
        align-items: center;
        align-content: center;
    }
}


.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 20px;
}

.card {
    overflow: hidden;

    .card-actions {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,.3);
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
        opacity: 0;
        transition: opacity .25s ease-in-out;
        -moz-transition: opacity .25s ease-in-out;
        -webkit-transition: opacity .25s ease-in-out;


        a, button {
            background-color: #fff;
            border: 1px solid #fff;
            border-radius: 50%;
            height: 36px;
            width: 36px;
            display: flex;
            justify-content: center;
            align-items: center;
        }
    }

    &:hover {
        .card-actions {
            opacity: 1;
        }
    }
}
