﻿/*TODO: change all px values to rem, everywhere*/

/*HELPER CLASSES*/
.m {
    margin: 5px;
}

.mr {
    margin-right: 5px;
}

.ml {
    margin-left: 5px;
}

.mt {
    margin-top: 5px;
}

.mb {
    margin-bottom: 5px;
}

.w-full {
    width: 100%;
}

.content-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.center {
    margin: auto;
}

.shadow {
    box-shadow: var(--shadow);
}

.spacer {
    flex: 1;
}

/*ICON*/
.ui-icon {
    fill: var(--foreground);
}

/*BUTTON*/
.ui-btn {
    width: fit-content;
    outline: 0;
    border: 0;
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-family: "Geist", sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition-duration: 0.2s;
    background: var(--secondary);
    color: var(--secondary-foreground);
}

    .ui-btn:hover {
        opacity: 80%;
        /*transform: scale(1.02);*/
    }

    .ui-btn.primary {
        background: var(--primary);
        color: var(--primary-foreground);
    }

    .ui-btn.destructive {
        background: var(--destructive);
        color: var(--destructive-foreground);
    }

    .ui-btn.svg-icon {
        width: 2.05rem;
        height: 2.05rem;
        padding: 0.5rem;
        border-radius: 1.025rem;
    }

    .ui-btn.svg-icon > svg {
        width: 100%;
        height: 100%;
        margin: auto;
        fill: var(--foreground);
    }

        .ui-btn.primary.svg-icon > svg {
            fill: var(--primary-foreground);
        }

        .ui-btn.destructive.svg-icon > svg {
            fill: var(--destructive-foreground);
        }

/*INPUT*/
.ui-input {
    width: fit-content;
    outline: 0;
    padding: 0.5rem 0.75rem;
    font-family: "Geist", sans-serif;
    font-weight: 500;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    outline: 1px solid transparent;
    box-shadow: var(--shadow);
    transition-duration: 0.1s;
}

    .ui-input:focus-visible {
        outline: 1px solid var(--ring);
    }

/*SPINNER*/
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.ui-spinner {
    width: 2rem;
    height: 2rem;
}

    .ui-spinner > svg {
        height: 100%;
        width: 100%;
        fill: var(--foreground);
        animation: spin 1s linear normal infinite;
    }

    .ui-spinner.primary > svg {
        fill: var(--primary);
    }

/*TYPOGRAPHY*/
h1 {
    margin: 10px 0 10px 0;
}

h2 {
    margin: 10px 0 10px 0;
}

h2.underlined::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin-top: 8px;
    border-radius: 2px;
}

h3 {
    font-weight: 500;
}

/*FILE DROP AREA*/
.ui-drop-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    height: 200px;
    padding: 1em;
    outline: 1px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--card);
    box-shadow: var(--shadow);
}

    .ui-drop-area > svg {
        opacity: 50%;
        fill: var(--foreground);
        margin-bottom: 10px;
    }

    .ui-drop-area > input {
        /*display: none;*/
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

/*HEADER*/
.ui-header {
    width: 100%;
    height: 50px;
    background: var(--primary);
    color: var(--primary-foreground);
    border-radius: var(--radius);
    display: grid;
    text-align: center;
    align-items: center;
}

/*SIDEBAR*/
.ui-btn-sidebar {
    outline: 0;
    border: 0;
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: "Geist", sans-serif;
    font-weight: 300;
    font-size: 0.93em;
    cursor: pointer;
    transition-duration: 0.2s;
    background: transparent;
    color: var(--sidebar-foreground);
    text-align: left;
    text-decoration: none;
}

    .ui-btn-sidebar:hover {
        background: var(--sidebar-accent);
        color: var(--sidebar-accent-foreground);
    }

    .ui-btn-sidebar.active {
        background: var(--sidebar-primary);
        color: var(--sidebar-primary-foreground);
    }

    .ui-btn-sidebar > svg {
        width: 1.2rem;
        height: 1.2rem;
        fill: var(--sidebar-foreground);
    }

    .ui-btn-sidebar:hover > svg {
        fill: var(--sidebar-accent-foreground);
    }

    .ui-btn-sidebar.active > svg {
        fill: var(--sidebar-primary-foreground);
    }

/*CARD*/
.ui-card {
/*    width: fit-content;
    height: fit-content;*/
    display: flex;
    flex-direction: column;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}