@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,1,0');
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font);

    background-image: var(--wallpaper);
    background-size: cover;
    background-position: var(--wallpaper-position);
    background-attachment: fixed;

    font-size: calc(1em * var(--font-size));
    margin: 0px;

    animation: fade-in 1s;
}
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: inherit;
    background-size: inherit;
    background-position: inherit;
    background-attachment: inherit;
    filter: blur(var(--wallpaper-blur)) brightness(var(--wallpaper-brightness)) ;
    z-index: -1;
}

@keyframes fade-in {
    from {
        opacity: 0%;
    }
    to {
        opacity: 100%;
    }
}

h1,h2,h3,h4,h5,h6 {
    font-weight: 500;
}

.document,
.workspace {
    background-color: transparent;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid transparent;
    border-radius: 15px;
    padding: 0px;
    width: calc(100% - 40px);
    height: calc(100% - 50px);
    max-width: 800px;
    transition: background-color 0.3s, border 0.3s;
}

.document {
    overflow: scroll;
}

.large-icon,
.icon {
    font-size: large;
    font-family: "Material Symbols Outlined";
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.large-icon {
    font-size: xx-large;
}

.button-bar {
    display: flex;
    position: fixed;
    bottom: 0px;
    width: calc(100% - 30px);
    padding: 20px 0px;
    justify-content: end;
    gap: 20px
}

.icon-button {
    font-size: x-large;
    font-family: "Material Symbols Outlined";
    background: transparent;
    color: var(--icon-color);
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

.icon-button:hover {
    color: var(--highlight-color);
}

.create-button {
    background: var(--highlight-back);
    color: var(--highlight-color);
    min-width: 64px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    box-shadow: 0px 0px 0px 0px var(--highlight-back);
    transition: box-shadow 0.3s;
}

.create-button:hover {
    box-shadow: 0px 0px 0px 15px var(--highlight-back);
}

.add-button:hover {
    animation: rotate-text 0.5s ease-in-out forwards;
}

.edit-button:hover{
    animation: pencil-rotate 0.8s ease-in-out forwards;
}

.delete-button:hover {
    color: var(--warning-color);
    background-color: var(--warning-back);
}

.header-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.header-bar input[type="text"] {
    background-color: transparent;
    color: var(--title-color);
    font-family: var(--font);
    font-size: calc(1.1em * var(--font-size));
    border: none;
    outline: none;
    width: calc(100% - 5px);
    border-radius: 5px;
    transition: background-color 0.3s, margin-bottom 1s;
}

.header-bar input[type="text"]:focus,
.header-bar input[type="text"]:hover {
    background-color: var(--field-color);
}

.progress-wrapper {
    width: 100%;
    height: 4px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}

.todo-book-item:hover .progress-wrapper {
    background-color: var(--border-color);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--highlight-color);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

a.decorated {
    color: var(--highlight-color);
    font-size: calc(1em * var(--font-size));
    text-decoration: none;
    border-radius: 3px;

    background: linear-gradient(90deg, var(--highlight-back) 0%, var(--highlight-back) 50%, #00000000 50%, #00000000 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    transition: 500ms padding, 200ms background-position;

    outline: none;
    border: none;
    cursor: pointer;
    padding-left: 0px;
    padding-right: 0px;
}   

a.decorated:hover {
    background-position: 0 0;
    padding-left: 5px;
    padding-right: 5px;
}

hr {
    border: none;
    border-bottom: 1px solid var(--border-color);
}

input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    border: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
    justify-self: center;
    display: block;
}

input[type="color"]::-moz-color-swatch,
input[type="color"]::-webkit-color-swatch {
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.placeholder-graphic {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.placeholder-graphic img {
    max-width: 200px;
}

.placeholder-graphic h2 {
    margin: 3px;
}
.placeholder-graphic p {
    margin: 0px;
}

/* #region SNACKBAR */

.snackbar {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: var(--card-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 300px;
    padding: 0px 20px 0px 20px;
    position: fixed;
    z-index: 1;
    left: 50%;
    top: 30px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.snackbar p {
    text-align: center;
    width: 100%;
}

.snackbar.show {
    visibility: visible;
    animation: sb-fadein 0.5s, sb-fadeout 0.5s 2.5s forwards;
}

@keyframes sb-fadein {
    from {
        top: 0;
        opacity: 0;
    }

    to {
        top: 30px;
        opacity: 1;
    }
}

@keyframes sb-fadeout {
    from {
        top: 30px;
        opacity: 1;
    }

    to {
        top: 0;
        opacity: 0;
    }
}
/* #endregion */

/* #region scrollbar */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--highlight-back);
}

* {
    scrollbar-color: var(--border-color) transparent;
}

/* #endregion */

@keyframes pencil-rotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    50% { transform: rotate(15deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

@keyframes rotate-text {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}