html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overscroll-behavior: none;
    position: fixed;
}

:root {
    --darkmode-filter: invert(1) hue-rotate(180deg);
    --darkmode-filter-reversal: none;

    --bg-color-invert: hsl(0 0% 93% / 1);

    color-scheme: only light;
}

ptc-time-log-app {
    background-color: var(--color-bg-light);
    height: 100%;
    display: block;
}

ptc-app,
ptc-time-log-app,
chat-window,
.loading-screen,
svg {
    transition: filter 0.3s;
}

:root[data-color-scheme="system"] {
    /* since we are faking the scheme, we should only use light */
    color-scheme: only light;

    @media screen and (prefers-color-scheme: dark) {
        --darkmode-filter-reversal: var(--darkmode-filter);

        --color-bg-light: var(--bg-color-invert);
        --color-bg-translucent: hsl(0 0% 93% / 0.9);
        --backdrop-color: white;
        --shade-1: rgba(0, 0, 0, 0.15);
        --shadow-color: 0deg 0% 100%;

        ptc-app,
        ptc-staff-app,
        ptc-time-log-app,
        chat-window,
        .loading-screen,
        svg {
            filter: var(--darkmode-filter);
        }
    }
}

:root[data-color-scheme="light"] {
    color-scheme: light;
}

@media screen {
    :root[data-color-scheme="dark"] {
        --darkmode-filter-reversal: var(--darkmode-filter);

        --color-bg-translucent: hsl(0 0% 93% / 0.9);
        --color-bg-light: var(--bg-color-invert);
        --backdrop-color: white;
        --shade-1: rgba(0, 0, 0, 0.15);
        --shadow-color: 0deg 0% 100%;

        /* should be `dark` once the filter hack is replaced */
        color-scheme: light;

        ptc-app,
        ptc-staff-app,
        ptc-time-log-app,
        chat-window,
        .loading-screen,
        svg {
            filter: var(--darkmode-filter);
        }
    }
}

.logo {
    width: 25em;
    height: 5em;
    max-width: 90%;
    display: block;
    margin: auto;
}

.logo-wrapper {
    position: relative;
}

.logo-wrapper::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0) 10%,
        rgba(255, 255, 255, 0.5) 40%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0) 90%
    );
    animation: shine 2s infinite;
}

.logo-wrapper::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0) 10%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0) 90%
    );
    animation: shine 2s 0.5s infinite;
}

@keyframes shine {
    from {
        transform: translate(-100%);
    }
    to {
        transform: translate(100%);
    }
}

.loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    background: white;
    z-index: 101;
}
