// stylelint-disable max-nesting-depth, selector-max-compound-selectors

.preprints-details-page-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    .btn {
        display: inline-block;
        margin-bottom: 0;
        font-weight: 400;
        text-align: center;
        white-space: nowrap;
        touch-action: manipulation;
        cursor: pointer;
        background-image: none;
        border: 1px solid transparent;
        border-radius: 2px;
        padding: 6px 12px;
        font-size: 14px;
        line-height: 1.42857;
        user-select: none;
        vertical-align: middle;
        color: $color-text-white;
    }

    .btn-primary {
        color: $color-text-white;
        background-color: $color-bg-blue-dark;
        border-color: #2e6da4;
    }

    .header-container {
        padding: 30px 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: $color-text-white;
        background: url('assets/images/preprints/preprints-detail-header-overlay.png') top center $color-bg-color-grey;

        .preprint-author-container,
        .preprint-title-container {
            width: calc(100% - 100px);
            padding-top: 20px;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;

            .view-authors {
                color: $color-text-white;
                padding-bottom: 15px;

                a {
                    color: #6dd1de;
                }

                .detail-header-label {
                    font-size: 11px;
                    text-transform: uppercase;
                    padding-bottom: 2px;
                }
            }
        }
    }

    .data-container {
        padding: 30px;
        width: 100%;
        min-height: 1250px;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: flex-start;

        .withdrawn-container {
            padding: 0 15px;
            width: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-start;
        }

        .data-container-left,
        .data-container-right {
            padding: 0 15px;
            width: 50%;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-start;
        }

        .data-container-left {
            height: 1150px;

            &.expanded {
                width: 100%;
            }

            &.collapsed {
                width: 50%;
            }

            .file-description-container {
                display: flex;
                flex-direction: row;
                justify-content: flex-start;
                align-items: flex-start;
                width: 100%;
                padding-top: 15px;

                .file-description {
                    display: flex;
                    flex-direction: row;
                    justify-content: flex-start;
                    align-items: flex-start;
                    width: 75%;
                }

                .toggle-button {
                    width: 25%;
                    min-width: 100px;
                    display: flex;
                    justify-content: flex-end;
                    align-items: flex-start;
                }
            }
        }

        .withdrawn-container,
        .data-container-right {
            height: 100%;

            h4 {
                padding-bottom: 15px;
                padding-top: 15px;
                margin-top: 10px;
                margin-bottom: 10px;
                font-weight: bold;
            }

            .plaudit-container {
                display: flex;
                flex-direction: row;
                justify-content: flex-start;
                align-items: center;
                width: 100%;
                min-height: 90px;

                .plaudit {
                    width: calc(100% - 145px);
                    padding-right: 30px;
                }

                .sharing-icons {
                    font-size: 1.5rem;
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;
                    align-items: flex-start;
                    width: 145px;
                }
            }

            .download-container {
                background-color: $bg-light;
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                width: 100%;
                padding: 10px;
            }
        }
    }

    &.mobile {
        .header-container {
            padding: 0;
            flex-direction: column;

            .preprint-author-container,
            .preprint-title-container {
                width: 100%;
                padding: 0 10px;
            }
        }

        .data-container {
            padding: 10px;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;

            .data-container-left,
            .data-container-right {
                width: 100%;
                padding: 0;
            }

            .data-container-left {
                height: 600px;

                .file-description-container {
                    flex-direction: column;
                    justify-content: flex-start;
                    margin-bottom: 20px;

                    & > div {
                        margin-top: 10px;
                    }

                    .file-description {
                        width: 100%;
                        flex-direction: column;
                    }

                    .toggle-button {
                        width: 100%;
                        align-items: flex-end;
                    }
                }
            }

            .data-container-right {
                .download-container {
                    flex-direction: column;
                    align-items: flex-start;

                    & > div {
                        margin-top: 10px;
                    }
                }

                .plaudit-container {
                    flex-direction: column;
                    align-items: flex-start;

                    .plaudit {
                        width: 100%;
                        padding-right: 0;
                        height: 90px;
                    }

                    .sharing-icons {
                        padding: 10px;
                        justify-content: space-between;
                        align-items: flex-start;
                        width: 145px;
                    }
                }
            }
        }
    }
}

.version-dropdown {
    display: inline-block;
}

.version-picker-list {
    width: max-content;
    list-style: none;
    margin: 0;
    padding-inline-start: 0;
    padding: 10px;

    .version:not(:first-child) {
        padding-top: 10px;
    }

    .current-version {
        font-weight: bold;
    }
}
