* {
    margin: 0;
    padding: 0;
}

body {
    overflow: hidden;
    overscroll-behavior: none; /* Prevents scroll chaining and bounce effects */
}

.container {
    width: 100svw;
    height: 100svh;
    position: relative;
}

.container .toolbar {
    position: absolute;
    top: 0;
    left: 0;
    margin: 1em;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: .25rem;
}

.toolbar .button {
    user-select: none;
}

.canvas-viewport {
    width: 100svw;
    height: 100svh;
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
}

.canvas {
    position: absolute;
    left: 0;
    right: 0;
    transform-origin: 0 0;
}

.mode-view-enabled .text-toolbar {
    visibility: hidden;
}

.mode-line-enabled .text-toolbar {
    visibility: hidden;
}

.text-toolbar {
    user-select: none;
    display: flex;
}

.canvas .text {
    display: inline-block;
    text-wrap: nowrap;
}

.svgcontainer {
    position: absolute;
    z-index: -1;
}

.container .toolbar .button {
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container .toolbar .button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.container .toolbar .button:focus {
    background-color: rgba(0, 0, 0, 0.15);
}

.container .toolbar .button:active {
    background-color: rgba(0, 0, 0, 0.2);
}

div[contenteditable]:empty::before {
    content: attr(placeholder);
    color: #aaa;
    pointer-events: none;
}

div[contenteditable]:empty:focus::before {
    content: none;
}

@keyframes fade {
    0% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.1;
    }
}

.uploading-animation {
    animation: fade 3s ease-in-out infinite;

    /* Initial state of the element (optional, but good practice) */
    opacity: 0;
}

.auth-container {
    position: fixed;
    width: 100svw;
    height: 100svh;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-modal {
    background-color: white;
    padding: 1em;
    border: 1px solid rgba(0, 0, 0, 0.4);
    border-radius: .25rem;
}

.auth-container .button {
    margin-top: 0.2em;
    padding: 0 0.1em;
    border-radius: .25rem;
    border: 1px solid rgba(0, 0, 0, 0.4);
    background-color: rgba(0, 0, 0, 0.1);
    display: inline-block;
    user-select: none;
}

.auth-container .button:hover {
    background-color: rgba(0, 0, 0, 0.15);
}

.auth-container .button:focus {
    background-color: rgba(0, 0, 0, 0.2);
}

.auth-submit-password .button:active {
    background-color: rgba(0, 0, 0, 0.25);
}

.auth-modal-buttons-container {
    display: flex;
    flex-direction: row;
}