/*
 * SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
 *
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

.cp-app-noscroll body {
    background: transparent;
}
.cp-app-noscroll #placeholder {
    z-index: 9999999; /* loading screen -1 */
    background-color: transparent;
}

#placeholder {
    visibility: visible;
    position: fixed;
    z-index: -10;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background-color: #EEEEEE; /* @cp_loading-bg */
    color: #424242; /* @cp_loading-fg */
    font-size: 1.3em;
    line-height: 120%;
    opacity: 1;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    font: 20px 'Helvetica Neue', sans-serif !important;
}
html:not(.cp-app-noscroll) #placeholder.dark-theme {
    background-color: #212121; /* @cp_loading-bg (dark) */
}
#placeholder.dark-theme {
    color: #EEEEEE; /* @cp_loading-fg (dark) */
}

#placeholder .placeholder-logo-container {
    height: 300px;
    width: 300px;
    margin-top: 50px;
    flex: 0 1 auto;
    min-height: 0;
    text-align: center;
    opacity: 0;
    animation: fadein 5s ease 2s forwards;
}
#placeholder .placeholder-logo-container img {
    max-width: 100%;
    max-height: 100%;
}
#placeholder .placeholder-message-container {
    width: 700px;
    max-width: 90vw;
    height: 236px;
    max-height: calc(100vh - 20px);
    margin: 50px;
    flex-shrink: 0;
    display: flex;
    flex-flow: column;
    align-items: center;
    opacity: 0;
    animation: fadein 5s ease 2s forwards;
}
#placeholder .placeholder-message-container p {
    margin-top: 0;
}
#placeholder .placeholder-logo {
    margin-left: auto;
    margin-right: auto;
    max-width: 90vw;
    max-height: max(40vh, 250px);
    width: auto;
    height: auto;
    margin-bottom: 2em;
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media screen and (max-width: 500px) {
    #placeholder {
        font-size: 16px !important;
    }
    #placeholder .placeholder-message-container {
        height: 206px;
    }
}
@media screen and (max-height: 700px) {
    #placeholder {
        font-size: 16px !important;
    }
    #placeholder .placeholder-message-container {
        height: 206px;
    }
}
@media screen and (max-height: 500px) {
    #placeholder .placeholder-logo-container {
        display: none;
    }
}
:is(div, noscript) > p.noscript {
    font-family: sans-serif;
    z-index: 999;
    padding: 15px;
    font-size: 20px;
    margin-top: 30px !important;
    max-width: 800px;
    margin: auto;

    background-color: #424242;
    color: #eee;
    border-radius: 5px;
}

