@import url(https://fonts.bunny.net/css?family=livvic:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,900,900i);

:root {
    --background: #f5f5f5;
    --background-opacity: rgba(245, 245, 245, 0.5);
    --main: #fafafa;
    --secondary: #ffffff;
    --secondary-opacity: rgba(255, 255, 255, 0.25);
    --border: rgba(41, 41, 41, 0.05);
    --headline: #0a0a0a;
    --paragraph: #292929;
    --subtext: #525252;
    --red: #da7777;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f0f0f;
        --background-opacity: rgba(15, 15, 15, 0.5);
        --main: #171717;
        --secondary: #1f1f1f;
        --secondary-opacity: rgba(31, 31, 31, 0.25);
        --border: rgba(122, 122, 122, 0.05);
        --headline: #f5f5f5;
        --paragraph: #ebebeb;
        --subtext: #d6d6d6;
        --red: #7b3131;
    }
}

[data-theme="light"] {
    --background: #f5f5f5;
    --background-opacity: rgba(245, 245, 245, 0.5);
    --main: #fafafa;
    --secondary: #ffffff;
    --secondary-opacity: rgba(255, 255, 255, 0.25);
    --border: rgba(41, 41, 41, 0.05);
    --headline: #0a0a0a;
    --paragraph: #292929;
    --subtext: #525252;
    --red: #da7777;
}

[data-theme="dark"] {
    --background: #0f0f0f;
    --background-opacity: rgba(15, 15, 15, 0.5);
    --main: #171717;
    --secondary: #1f1f1f;
    --secondary-opacity: rgba(31, 31, 31, 0.25);
    --border: rgba(122, 122, 122, 0.05);
    --headline: #f5f5f5;
    --paragraph: #ebebeb;
    --subtext: #d6d6d6;
    --red: #7b3131;
}

[data-theme="oled"] {
    --background: #000000;
    --background-opacity: rgba(0, 0, 0, 0.5);
    --main: #0f0f0f;
    --secondary: #171717;
    --secondary-opacity: rgba(23, 23, 23, 0.25);
    --border: rgba(82, 82, 82, 0.05);
    --headline: #f5f5f5;
    --paragraph: #ebebeb;
    --subtext: #d6d6d6;
    --red: #7b3131;
}

* {
    margin: 0;
    padding: 0;
    font-family: "Livvic", sans-serif;
}

html {
    background-color: var(--background);
}

main {
    margin: 0 clamp(2rem, 16vw, 8rem);
}

main > *, .card > * {
    margin: 1rem 0;
}

*::selection {
    background: var(--headline);
    color: var(--main);
}

h1 {
    display: flex;
    padding: 1.5rem 0;
    font-size: 3rem;
    color: var(--headline);
    align-items: center;
}

h1 i,
h1 .emoji {
    font-size: 2.5rem;
    margin-right: 0.75rem;
}

h2 {
    display: flex;
    margin: 1rem 0;
    font-size: 2rem;
    color: var(--headline);
    font-weight: 700;
    align-items: center;
}

h2 i,
h2 .emoji {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

h3 {
    margin: 1rem 0;
    font-size: 1.5rem;
    color: var(--headline);
    font-weight: 600;
}

p {
    color: var(--paragraph);
    font-size: 1rem;
}

p span,
p i {
    font-size: 1rem;
    margin-right: 0.25rem;
}

i,
.emoji {
    color: var(--paragraph);
}

a {
    cursor: pointer;
    text-decoration: none;
}

/* Cards */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
}

.card {
    border-radius: 2rem;
    background-color: var(--main);
    padding: clamp(1rem, 4vw, 2rem);
    width: 100%;
    box-sizing: border-box;
    border: 2px solid var(--border);
}

.card :first-child {
    margin-top: 0;
}

.card :last-child {
    margin-bottom: 0;
}

/* Properties */

.div-property {
    display: flex;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    background-color: var(--secondary);
    margin: 1rem 0;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
}

.div-property.no-bg {
    padding: 0.5rem 1.5rem;
}

.div-property.error {
    background-color: var(--red);
}

.div-property p:nth-child(1), .multi-properties div p:nth-child(1) {
    font-weight: 500;
}

.div-card :last-child {
    margin-bottom: 0;
}

.div-improved-property div {
    display: block;
}

.div-improved-property div p:nth-child(1) {
    font-size: 0.75rem;
    color: var(--subtext);
    font-weight: 300;
}

.div-improved-property div p:nth-child(2) {
    font-weight: 500;
}

.div-improved-property div h2 {
    margin: 0;
}

.div-improved-property .number {
    font-size: 1.5rem;
}

.multi-properties {
    border-radius: 1rem;
    background-color: var(--secondary);
    margin: 1rem 0;
    padding: 0 1.5rem;
    border: 1px solid var(--border);
}

.multi-properties div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.multi-properties div:last-child {
    border-bottom: none;
}

/* Tables */

table {
    width: 100%;
    border-radius: 1rem;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    table-layout: fixed;
    border: 1px solid var(--border);
    background-color: var(--secondary);
}

table th,
table td {
    padding: 1rem 1.5rem;
    color: var(--paragraph);
    text-align: left;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

table thead th,
table tfoot th,
table tfoot td {
    color: var(--headline);
    font-weight: 500;
}

table tfoot th {
    text-align: right;
}

table a {
    position: relative;
    padding: 0.25rem 0.5rem;
    left: -0.5rem;
}

table a:hover {
    background-color: var(--border);
    border-radius: 0.5rem;
}

/* Details */

.section-details {
    display: none;
    background: linear-gradient(90deg, transparent, var(--border));
    width: 32rem;
    height: 100vh;
    right: 0;
    position: fixed;
    justify-content: center;
    padding: 2.5vh;
    z-index: 2;
}

.div-details {
    flex-direction: column;
    border: solid 2px var(--border);
    border-radius: 2rem;
    padding: 0 2rem;
    background-color: var(--background);
    overflow-y: auto;
    height: 95vh;
}

.div-details::-webkit-scrollbar {
    display: none;
}

.div-details .div-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.div-details .title {
    padding-top: 0;
    overflow: hidden;
    white-space: nowrap;
    height: 3.5rem;
    text-overflow: ellipsis;
}

.div-details img {
    width: 3.5rem;
    margin-right: 1rem;
    border-radius: 2rem;
    background-color: var(--main);
    border: 1px solid var(--border);
}

.div-details .div-options {
    display: flex;
    margin-left: 0.5rem;
}

.div-details .div-options a i {
    width: 3rem;
    height: 3rem;
    font-size: 2rem;
    text-align: center;
    align-content: center;
    color: var(--headline);
    background-color: var(--main);
    border-radius: 1.5rem;
    margin-left: 0.5rem;
    border: 1px solid var(--border);
}

/* Context menu */

.div-context-menu {
    position: absolute;
    text-align: left;
    background-color: var(--background-opacity);
    backdrop-filter: blur(1rem);
    border-radius: 1rem;
    box-shadow: 0 0 0.25rem var(--border);
    z-index: 3;
    border: 1px solid var(--border);
}

.div-context-menu ul {
    padding: 0.5rem;
    margin: 0;
    width: 8rem;
    list-style: none;
}

.div-context-menu ul li {
    padding: 0.5rem 1rem;
}

.div-context-menu ul li a {
    color: var(--headline);
}

.div-context-menu ul li:hover {
    background-color: var(--border);
    border-radius: 0.5rem;
}

.div-context-menu p {
    padding: 0.5rem 1rem;
}

/* Sidebar */

.sidebar {
    display: flex;
    flex-direction: column;
    width: 54px;
    height: 100%;
    overflow: hidden;
    border-right: solid 2px var(--border);
    padding-left: 0.5rem;
    justify-content: center;
    position: fixed;
    background-color: var(--background-opacity);
    backdrop-filter: blur(2rem);
    transition: ease 0.25s;
    z-index: 1;
}

.sidebar i {
    width: 2rem;
    text-align: center;
    justify-content: center;
    font-size: 1.5rem;
}

.sidebar li {
    list-style-type: none;
    width: 216px;
    padding: 0.5rem;
    margin: 0.5rem 0;
}

.sidebar li:hover {
    background-color: var(--border);
    border-radius: 1rem;
}

.sidebar li:first-child {
    display: flex;
    align-items: center;
}

.sidebar p {
    font-size: 1.5rem;
    padding-left: 1rem;
    color: var(--headline);
    font-weight: 500;
}

.sidebar .close {
    display: none;
}

.sidebar input {
    width: 2rem;
    height: 1.5rem;
    opacity: 0;
    position: absolute;
    cursor: pointer;
}

.sidebar a {
    display: flex;
    align-items: center;
}

/* Others */

.tag {
    background-color: var(--secondary);
    margin-left: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: smaller;
}

.no-bg {
    background: transparent none;
    border: none;
}

.lighter-bg {
    background-color: var(--main);
}

@media screen and (max-width: 600px) {
    main {
        margin: 0 4vw 4rem 4vw;
    }

    .section-details {
        background: none;
        width: 100vw;
        padding: 0;
    }

    .div-details {
        border: none;
        border-radius: 0;
        padding: 2vw;
        height: 100vh;
    }

    .sidebar {
        display: flex;
        flex-direction: row;
        width: 100%;
        justify-content: center;
        border-right: none;
        border-top: solid 2px var(--border);
        padding-left: 0;
        height: auto;
        bottom: 0;
    }

    .menu {
        display: flex;
    }

    .menu p {
        display: none;
    }

    .sidebar li {
        width: auto;
        margin: 0.5rem 1rem;
    }

    .sidebar li:first-child {
        display: none;
    }

    .sidebar input {
        display: none;
    }

    .table-user thead th:nth-child(1),
    .table-user thead th:nth-child(4) {
        width: 20%;
    }

    .table-user thead th:nth-child(2),
    .table-user thead th:nth-child(3) {
        width: 30%;
    }
}
