﻿.document-preview {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0,0,0,0.4);
    opacity: 1;
    pointer-events: auto;
    transition: all 0.075s;
    transition-property: opacity, background-color;
    display: flex;
    align-items: center;
    z-index: 100000;
}


.document-preview__show-area {
    display: flex;
    flex-grow: 1;
    padding: 1em;
    padding-left: 2em;
    padding-right: 2em;
    background-color: rgba(0,0,0,0.4);
    border-top: 0.0625em solid #8b8b8b;
    border-bottom: 0.0625em solid #8b8b8b;
    max-height: 100%;
}

.document-preview__content {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    flex-direction: column;
}

.document-preview__content--hidden {
    /*
        wenn man hier 
            display: none; 
        verwendet feuern die object- und iframe-html-elemente
        das onload-event nicht mehr.
        deshalb diese wirre art den content zu verstecken.
    */
    overflow: hidden;
    width: 0;
    height: 0;
    flex-grow: 0;
    max-width: 0;
    max-height: 0;
}

.document-preview__timestamp {
    color: white;
    font-size: 0.8em;
    margin-bottom: 0.3em;
    opacity: 0.8;
    text-align: center;
    display: inline-flex;
    gap: 1ch;
}

.document-preview__document {
    /* flex-grow: 1; */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 100%;
}

.document-preview__menu {
    width: 100%;
    max-width: 17.5em;
    display: flex;
    flex-direction: column;
    padding: 0.6em;
    padding-top: 1em;
    padding-bottom: 1em;
}

.document-preview__menu-item {
    display: flex;
    align-items: center;
    color: #f1f1f1 !important;
    text-decoration: none;
    font-size: 1.125em;
    cursor: pointer;
    border: 0.0625em solid #8b8b8b;
    margin-bottom: 0.6em;
    background-color: #323639;
    transition: all 0.075s;
    transition-property: background-color, color, transform;
    user-select: none;
    text-decoration: none !important;
}

    .document-preview__menu-item:hover,
    .document-preview__menu-item:focus {
        background-color: #494e52;
        /* color: #f1f1f1; */
        /* text-decoration: none; */
    }

    .document-preview__menu-item:active {
        background-color: #585f64;
        transform: scale(0.975);
    }

.document-preview__menu-item__icon {
    padding: 1em;
    padding-top: 0.6em;
    padding-bottom: 0.6em;
    padding-right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.document-preview__menu-item__description {
    padding: 1em;
    padding-top: 0.6em;
    padding-bottom: 0.6em;
    flex-grow: 1;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.document-preview__loading-indicator {
    /*position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;*/
}

@media(max-width: 1120px) {
    .document-preview__menu {
        flex-direction: row;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100vw;
        justify-content: center;
    }
}

@media(max-width:900px) {
    .document-preview__menu-item__description {
        display: none;
    }

    .document-preview__menu-item__icon {
        padding-right: 1em;
    }
}


/* renderers */

.fallback-renderer {
    border: 0.0625em solid #8b8b8b;
    padding: 1em;
    background-color: #ffffff;
    color: red !important;
    font-size: 1.25em;
    text-align: center;
    text-decoration: none;
    max-width: 36em;
    display: block;
    text-decoration: none !important;
}

.image-renderer {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 0.0625em solid #8b8b8b;
}

.video-renderer {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 0.0625em solid #8b8b8b;
}

.audio-renderer {
}

.pdf-renderer {
    width: 100%;
    height: calc(100vh - 2em);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-renderer--fallback {
}

.ripple-spinner {
    --size: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: var(--size);
    height: var(--size);
    overflow: visible;
}

.ripple-spinner--fit-parent {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.ripple-spinner--centered {
    margin-left: auto;
    margin-right: auto;
}

.ripple-spinner div {
    position: absolute;
    border: 0.3em solid #529aaa;
    opacity: 1;
    border-radius: 100%;
    animation: ripple-spinner 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    top: 50%;
    left: 50%;
}

    .ripple-spinner div:nth-child(2) {
        animation-delay: -0.5s;
    }

@keyframes ripple-spinner {
    0% {
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        width: 100%;
        height: 100%;
        opacity: 0;
    }
}
