.root {
    position: absolute;
    display: flex;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    flex-direction: row;
    background-color: var(--panel-background-color);
}

.left {
    display: flex;
    flex-direction: column;
    flex: 0 0 320px;
    background-color: var(--background-color);
    padding-bottom: 64px;
    justify-content: space-between;
    position: relative;

    & .top {
        display: flex;
        flex-direction: column;
        margin-bottom: auto;

        .buttons {
            display: flex;
            flex-direction: column;
        }

        .button {
            display: inline-block;
            height: 48px;
            width: auto;
            font-size: 16px;
            margin: 8px 32px;
            padding: 0px 32px;
            border-radius: 8px;
            border-width: 0px;
            background-color: var(--button-secondary-background);
            color: var(--foreground-color);
            transition: all 0.2s ease;
            cursor: pointer;

            &:hover {
                background-color: var(--button-secondary-hover);
            }

            &:focus {
                outline: 2px solid var(--primary-color);
                outline-offset: 2px;
            }
        }

        .back {
            background-color: var(--button-primary-background);
            color: white;

            &:hover {
                background-color: var(--button-primary-hover);
            }
        }

        & .logo {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 32px;

            & svg {
                width: 64px;
                height: 64px;
                color: var(--foreground-color);
                fill: currentColor;
            }

            & span {
                margin-top: 10px;
                color: var(--foreground-color);
                letter-spacing: 6px;
                font-size: 24px;
                font-weight: bold;
                font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            }

            .version {
                font-size: 14px;
                margin-top: 4px;
                letter-spacing: 0px;
                color: var(--foreground-muted-color);
            }
        }
    }

    & .settingsPanel {
        display: flex;
        flex-direction: column;
        gap: 8px;

        & .settingItem {
            display: flex;
            align-items: center;
            margin: 0px 32px;
            padding: 8px 16px;
            justify-content: space-between;
            border-radius: 10px;
            background-color: var(--panel-background-color);
            border: 1px solid var(--border-color);
        }

        & .settingLabel {
            font-size: 16px;
            margin-right: 10px;
            white-space: nowrap;
            color: var(--foreground-color);
        }

        & .settingControl {
            margin-left: auto;
            min-width: 0;
            padding: 2px;

            select {
                width: 108px;
                height: 28px;
                padding: 0px 6px;
                border-radius: 6px;
                border: 1px solid var(--input-border-color);
                background-color: var(--input-background-color);
                color: var(--input-text-color);
                font-size: 14px;

                &:hover {
                    border-color: var(--border-hover-color);
                }

                &:focus {
                    outline: none;
                    border-color: var(--primary-color);
                }
            }
        }
    }

    .socialPanel {
        display: flex;
        gap: 8px;
        align-items: stretch;
        justify-content: center;
        margin-top: 8px;
        padding: 0px 32px;

        .socialItem {
            flex: 1;
            color: var(--foreground-color);
            text-decoration: none;
            font-weight: bold;
            font-size: 14px;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            background-color: var(--panel-background-color);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            cursor: pointer;

            &:hover {
                background-color: var(--panel-hover-background-color);
                border-color: var(--border-hover-color);
            }

            &:focus {
                outline: 2px solid var(--primary-color);
                outline-offset: 2px;
            }

            svg {
                width: 24px;
                height: 24px;
                padding: 4px;
                opacity: 0.75;
                color: var(--foreground-color);
                fill: currentColor;
            }
        }
    }
}

.right {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 16px;

    & .welcome {
        font-size: 26px;
        margin-top: 48px;
        align-self: center;
        color: var(--foreground-color);
    }

    & .recent {
        display: flex;
        font-size: 18px;
        font-weight: bolder;
        margin: 16px 64px;
        color: var(--foreground-color);
    }

    & .documents {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        overflow-y: scroll;
        flex: 1;
        align-items: flex-start;
        gap: 32px;
        margin: 0px 64px;
        padding-right: 12px;
        --delete-visibility: hidden;

        & .document {
            position: relative;
            display: flex;
            flex: 1 1 240px;
            flex-direction: column;
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.2s ease;
            cursor: pointer;

            &:hover {
                opacity: 0.9;
                background-color: var(--panel-hover-background-color);
                --delete-visibility: visible;
                transform: translateY(-2px);
            }

            & .img {
                object-fit: cover;
                height: 180px;
                padding: 16px;
                border-radius: 8px;
                background-color: var(--background-color);
                border: 1px solid var(--border-color);
            }

            & .description {
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                margin: 4px 4px;

                & .title {
                    font-size: 14px;
                    color: var(--foreground-color);
                }

                & .date {
                    font-size: 12px;
                    color: var(--foreground-muted-color);
                }
            }

            .delete {
                position: absolute;
                visibility: var(--delete-visibility);
                padding: 4px;
                width: 16px;
                height: 16px;
                top: 8px;
                right: 8px;
                border-radius: 50%;
                color: var(--foreground-color);
                background-color: var(--panel-background-color);
                border: 1px solid var(--border-color);
                transition: all 0.2s ease;
                cursor: pointer;

                &:hover {
                    background-color: var(--panel-hover-background-color);
                    border-color: var(--border-hover-color);
                    transform: scale(1.1);
                }

                &:focus {
                    outline: 2px solid var(--primary-color);
                    outline-offset: 2px;
                }

                svg {
                    color: var(--foreground-color);
                    fill: currentColor;
                }
            }
        }
    }
}
