body {
    padding-top: 0px;
    margin: 0px;
    background-color: white;
}


:root {
    --input-primary-color: #1887e8;
    --hover-color: #aab4bd48;
}

/******* ここからメインエリアのスタイル ********/
main {
    text-align: center;
}

#header {
    background-color: white;
    padding-left: 10px;
    outline: 2px solid #eeeeee;
}

#header:not(.scrolled) {
    box-shadow: none;
}

.context-menu-item:hover {
    background-color: #af58ff54;
}

.hidden {
    display: none !important;
}

.tab.left {
    background-color: transparent;
    width: 90%;
    height: 36px;
    border-radius: 18px 18px 18px 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    color: black;

    span.left {
        margin-right: 10px;
    }

    span.right {
        margin-left: 10px;
    }

    p {

        padding-left: 10px;
        margin: 0px;
    }
}


.upload {
    height: 0px;
    visibility: hidden;
}

.progress {
    width: 100%;
}

.progress.hidden-progress {
    background-color: transparent;

    div {
        display: none;
    }
}

.main-view {
    background-color: white;
    position: fixed;
    width: calc(100vw - 210px);
    height: calc(100vh - 60px);
    backdrop-filter: none;

    top: 60px;
    left: 210px;
    display: flex;
    justify-content: start;
    flex-direction: column;
    align-items: stretch;
    overflow: auto;

    .container {
        box-sizing: border-box;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: start;
        align-items: center;
        padding: 0px;
    }

    .translate-area {
        box-shadow: 0px 0px 10px #00000021;
        width: 100%;

        .lang {
            width: 100%;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;


            .lang-switch {
                margin-right: 0px;

                >span {
                    color: #5f5f5f;
                }
            }

            .lang-select {
                width: calc(50% - 20px);
                display: flex;
                flex-direction: row;
                justify-content: start;
                align-items: center;

                .lang-dropdown {
                    user-select: none;
                    cursor: pointer;
                    margin: 10px;
                    margin-left: 20px;
                    outline: 1px solid #dcdcdc;
                    border-radius: 5px;
                    white-space: nowrap;
                    display: flex;
                    align-items: center;

                    p {
                        font-size: large;
                        margin: 0px;
                        padding: 5px;
                        padding-right: 10px;
                    }

                    padding-right: 5px;
                }

                .lang-dropdown:hover {
                    background-color: var(--hover-color);
                }
            }
        }

        .text-view {
            width: 100%;
            height: fit-content;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: stretch;

            .input-area {
                width: 50%;
                display: flex;
                flex-direction: column;

                .icon-button {
                    margin: 10px;

                    span {
                        color: #5f5f5f;
                    }
                }

                .translate-result {
                    flex-grow: 1;
                    display: flex;
                    flex-direction: row;
                    align-items: stretch;

                    textarea {
                        resize: none;
                        padding: 30px;
                        font-size: x-large;
                        field-sizing: content;
                        /*iOSとかは未対応*/
                        flex-grow: 1;

                        border-radius: 0px;
                        outline: 0px;
                        border: 0px;
                        background-color: transparent;
                    }
                }

                .translating {
                    padding: 20px;
                    font-size: x-large;

                    p {
                        margin: 0px;
                    }
                }

                .translate-option {}
            }

            .input-area:focus {
                outline: none;
            }

            .input-area.left {

                textarea {
                    min-height: 100px;
                }
            }

            .input-area.right {
                margin-right: 0px;

                .toolbar {
                    max-height: fit-content;
                    display: flex;
                    flex-direction: row;
                    justify-content: end;
                }

                .translate-result {
                    textarea {
                        background-color: #f8f8f8;
                        border-radius: 15px;
                        margin: 0px 10px 10px 0px;
                    }
                }
            }

        }
    }
}

.hidden {
    display: none;
}

.over {
    top: 0px;
    left: 0px;
    z-index: 6000;
    position: absolute;
    width: 100vw;
    height: 100vh;
    background-color: #00000070;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    .dialog {
        width: 80%;
        height: 80%;
        background-color: white;
        border-radius: 10px;
        padding: 25px;
        display: flex;
        flex-direction: column;
        overflow: auto;

        .header {
            height: 60px;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;

            .icon-button>span {

                color: black;
            }

            .title {
                .title-text {
                    font-size: x-large;
                }

                p {
                    margin-left: 20px;
                    font-size: medium;
                }

                margin: 0px;
                display: flex;
                align-items: center;
                flex-direction: row;
            }
        }

        .body {
            flex-grow: 1;
            width: 100%;
            overflow: hidden;
        }

        .footer {
            height: 60px;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: end;
        }
    }
}

#expand-dialog .dialog .body {
    textarea {
        resize: none;
        padding: 20px;
        font-size: large;
        border-radius: 0px;
        outline: 0px;
        border: 0px;
        background-color: transparent;
        width: calc(100% - 40px);
        height: calc(100% - 40px);
        line-height: 1.8em;
    }
}

#interpreter-dialog .dialog .body {
    align-items: stretch;
    justify-content: start;
    display: flex;
    flex-direction: column;

    .translate-result {
        padding: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: auto;

        .blocks {
            display: flex;
            flex-direction: column;
            gap: 20px;
            align-items: center;
            width: 100%;

            .block {
                border-radius: 10px;
                box-shadow: 0px 0px 10px #00000021;
                outline: solid 1px #dcdcdc;
                width: calc(100% - 20px);
                display: flex;
                flex-direction: column;
                align-items: stretch;
                overflow: hidden;

                .original {
                    background-color: white;
                    padding-left: 20px;
                    padding-right: 20px;
                    display: flex;
                    flex-direction: column;
                    align-items: stretch;

                    p {
                        font-size: large;
                        line-height: 1.8em;
                    }
                }

                .target {
                    border-top: solid 1px #dcdcdc;
                    background-color: #f8f8f8;
                    padding-left: 20px;
                    padding-right: 20px;
                    display: flex;
                    flex-direction: column;
                    align-items: stretch;

                    p {
                        font-size: large;
                        line-height: 1.8em;
                    }
                }
            }
        }
    }

    #interpreting {
        overflow: hidden;
    }
}

@media (max-width: 600px) {
    .main-view {
        .container {
            padding: 0px;

            .translate-area {
                box-shadow: none;
                border-radius: 0px 0px 10px 10px;

                .text-view {
                    flex-direction: column;

                    .input-area {
                        width: 100%;

                        &.right {
                            textarea {
                                margin-left: 10px;
                            }

                        }
                    }
                }
            }
        }

    }
}

.languages {
    width: auto;
    max-width: 300px;
    max-height: 350px;
    border-radius: 5px;
    outline: 1px solid #dcdcdc;
    background-color: white;
    position: absolute;
    z-index: 999;
    box-shadow: 0px 0px 10px #00000021;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    overflow-y: auto;
}

.lang-button {
    cursor: pointer;
    user-select: none;
    border-radius: 5px;
    outline: solid 1px #dcdcdc;
    background-color: white;
    font-size: medium;
    padding: 5px;
    width: 120px;
    text-align: center;

    p {
        margin: 0;
    }
}

.lang-button:hover {
    background-color: #dcdcdc;
}

.dots {
    display: inline-block;
}

.dot {
    display: inline-block;
    font-size: 2rem;
    animation: move 1s infinite;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

textarea {
    font-family: "Noto Sans", "Noto Sans JP", sans-serif;
}

p {
    font-family: "Noto Sans", "Noto Sans JP", sans-serif;
}

@keyframes move {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
        /* 上下に移動する高さを設定 */
    }
}

@keyframes shimmer {
    0% {
        background-position: -100%;
    }

    100% {
        background-position: 100%;
    }
}

.skeleton-text {
    font-size: large;
    height: 1.4em;
    background: linear-gradient(90deg, #efefef 25%, #f9f9f9 50%, #efefef 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin: 18px;
    margin-left: 20px;
    margin-right: 20px;
}

.tooltip {
    position: relative;
    cursor: pointer;
}

.tooltip-text {
    font-family: "Noto Sans JP", sans-serif;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    right: 100%;
    /* ここを変更します */
    bottom: 0px;
    display: inline-block;
    padding: 5px;
    white-space: nowrap;
    font-size: 10.5px;
    line-height: 1.3;
    background: #333;
    color: #fff;
    border-radius: 3px;
    transition: 0.2s ease-in;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tooltip-text:before {
    content: '';
    position: absolute;
    top: 50%;
    right: -13px;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-left: 7px solid #333;
}

.action-menu {
    background-color: #f0f3fa;
    position: fixed;
    width: 210px;
    height: calc(100vh - 60px);
    backdrop-filter: none;
    box-sizing: border-box;
    top: 60px;
    left: 0;
    display: flex;
    justify-content: start;
    flex-direction: column;
    padding-top: 30px;
    overflow: auto;

    >p {
        padding-left: 20px;
        user-select: none;
    }

    .folders {
        display: flex;
        width: 100%;
        flex-direction: column;
        justify-content: start;
        align-items: center;
        gap: 5px;

        p {
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
}

.tab.left {
    background-color: transparent;
    width: 90%;
    height: 50px;
    border-radius: 25px 25px 25px 25px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    color: black;

    span.left {
        margin-right: 10px;
    }

    span.right,
    svg.right {
        margin-left: 10px;
    }

    p {

        padding-left: 10px;
        margin: 0px;
    }
}

.tab.left:hover {
    text-decoration: none;
}

.tab.left:hover {
    background-color: var(--hover-color);
}

.tab.left.selected {
    background-color: var(--primary-color);
    color: white;
}

.tab.left.selected:hover {
    background-color: var(--primary-color);
}