@font-face {
    font-display: swap;
    font-family: 'Kanit';
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/kanit-v15-latin-300.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 100;
    src: url('../fonts/roboto-v32-latin-100.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/roboto-v32-latin-regular.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 400;
    src: url('../fonts/roboto-v32-latin-italic.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Roboto Condensed';
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/roboto-condensed-v27-latin-300.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Roboto Condensed';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/roboto-condensed-v27-latin-regular.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Roboto Condensed';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/roboto-condensed-v27-latin-700.woff2') format('woff2');
}

:root {

    --theme: #0b67aa;
    --theme50: #279df1;

    --base: #3c3e44;
    --base80: #54575f;
    --base60: #858993;
    --base40: #d6d8db;
    --base20: #f4f2f1;
    --base0: #ffffff;

    --shadow: 1px 1px #000;

    --true: #2ecc40;

    --m-error: #ee1c25;
    --m-success: #2ecc40;

    --nav-brand: 7.5rem;

    --font: "Roboto";
}

a, body, button, div, footer, form, h1, h2, h3, h4, h5, h6, input, label, li, main, nav, p, section, textarea, ul {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: var(--font), sans-serif;
    text-decoration: none;
}

a { cursor: pointer; }

/*
-----------------------------
NAVIGATION
-----------------------------
*/
nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 15rem;
    background-color: var(--base);
    z-index: 150;
}

nav img {
    display: block;
    max-height: var(--nav-brand);
    margin: 2rem auto;
}

nav > div {
    overflow-x: hidden;
    height: calc(100% - var(--nav-brand) - 4rem);
}

nav a {
    display: grid;
    grid-template-columns: 2rem 1fr;
    align-items: center;
    font-size: .8rem;
    color: var(--base40);
    text-shadow: var(--shadow);
    line-height: 2.25rem;
    padding-left: 1rem;
    transition: all .5s;
}

nav a:hover {
    color: var(--base0);
    background-color: var(--base80);
}

nav i {
    display: inline-block;
    width: 1.5rem;
    text-align: center;
    font-size: 1.25rem;
}

nav .has-sub::after {
    content: "\f105";
    position: absolute;
    right: 1rem;
    font-family: 'Line Awesome Free', sans-serif;
    font-weight: 900;
    transition: all .5s;
}

nav .has-sub.opened::after {
    transform: rotate(90deg);
}

nav .has-sub + div {
    display: none;
}

nav .has-sub + div > a {
    padding-left: 2rem;
}

nav .has-sub + div .has-sub + div > a {
    padding-left: 3rem;
}

nav .has-sub + div .has-sub + div .has-sub + div > a {
    padding-left: 4rem;
}

/*
-----------------------------
MAIN
-----------------------------
*/
main {
    width: 100%;
    min-height: 100%;
    padding: 0 2rem 0 17rem;
}

main > header > h1 {
    font-size: 2.5rem;
    color: var(--base40);
    font-weight: 300;
    padding: 1rem 0;
}

/*
-----------------------------
FOOTER
-----------------------------
*/
main footer {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: end;
    left: 17rem;
    right: 2rem;
    bottom: 0;
    height: 4rem;
    border-top: 1px solid var(--base40);
    background-color: #ffffff;
}

main footer button, main footer .button {
    min-width: 10rem;
}

/*
-----------------------------
BLOCKS
-----------------------------
*/
.block {
    background-color: var(--base20);
    border: 1px solid var(--base60);
    border-radius: .25rem;
    color: var(--base80);
    overflow: clip;
    align-self: start;
}

.block + .block {
    margin-top: 1rem;
}

.block header, .block-header {
    position: relative;
    background-color: var(--base60);
    border: 1px solid var(--base60);
    padding: 0 1rem;
}

.block header [data-sort] {
    cursor: pointer;
}

.block header.sticky {
    position: sticky;
    top: 0;
    z-index: 2;
}

.block header h2, .block-header h2 {
    font-weight: normal;
    font-size: 1.25rem;
    color: var(--base0);
    line-height: 2.5rem;
    text-shadow: var(--shadow);
}

/*
-----------------------------
SELECTION
-----------------------------
*/
.selection-block {
    background-color: transparent;
    border: none;
}

.selection-block > div, .list-block > div {
    border-style: solid;
    border-color: var(--base40);
    border-width: 0 1px 1px 1px;
}

.selection-block > div > *, .list-block > div > * {
    line-height: 2.25rem;
    color: var(--base80);
    padding: 0 1rem;
    transition: all .5s;
}

.selection-block a {
    border-top: 1px solid var(--base40);
}

.selection-block a:first-child {
    border-top: none;
}

.selection-block a:hover {
    background-color: var(--base40);
    color: var(--base);
}

.selection-block a > * {
    white-space: nowrap;
    overflow: hidden;
}

.selection-block .fa-check {
    color: var(--true);
}

/*
-----------------------------
UPLOAD
-----------------------------
*/
/* image-single */
.file-single article {
    background-color: var(--base20);
    border-radius: 0 0 .25rem .25rem;
    border: 1px solid var(--base40);
    border-top: none;
}

/* image-pool */
.pool-block .pool-container {
    background-color: var(--base20);
    border-radius: 0 0 .25rem .25rem;
    border: 1px solid var(--base40);
    padding: 1rem;
    gap: 1rem;
}

.pool-block .pool-document-container {
    padding: 0;
    gap: 0;
}

.file-exist, .pool-image {
    position: relative;
    padding: 0;
    overflow: hidden;
}

input[type="file"] {
    position: fixed;
    right: 100%;
    bottom: 100%;
}

/* scale media */
.file-exist img, .file-exist video, .pool-image img {
    width: 100%;
    height: auto;
    display: block;
}

.pool-image img {
    border-radius: .25rem;
}

.pool-document {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--base40);
    position: relative;
}

/* empty media */
.pool-add {
    border: 1px dashed var(--base60);
    border-radius: .25rem;
}

.pool-document-add {
    border: none;
    padding: 1rem 1rem;
    place-self: center;
    font-size: 1.25rem;
    text-align: center;
    width: 100%;
}

.pool-document-add i {
    font-size: 3rem;
}

.pool-document-add label {
    cursor: pointer;
}

.file-empty label, .pool-image-add label {
    display: grid;
    align-items: center;
    justify-items: center;
    font-size: 1.25rem;
    text-align: center;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.file-empty label i, .pool-image-add label i {
    font-size: 3.5rem;
}

/*delete media */
.file-delete {
    position: absolute;
    display: block;
    top: .5rem;
    right: .5rem;
    width: 2rem;
    height: 2rem;
    background-color: var(--base60);
    border-radius: 1rem;
    color: var(--base0);
    text-shadow: 1px 1px 1px var(--shadow);
    transition: all .3s;
    font-size: 1rem;
    white-space: nowrap;
    word-spacing: .35rem;
    overflow: hidden;
}

.pool-document .file-delete {
    top: .375rem;
    right: 1rem;
}

.file-delete:hover {
    background-color: var(--theme);
    width: 6.5rem;
}

.file-delete > span {
    position: absolute;
    display: block;
    right: .6rem;
    top: 0;
    line-height: 2rem;
}

.pool-placeholder {
    width: 100%;
    background-color: var(--base40);
    border: 1px dotted var(--base);
}