/*!
 * VN Videoklick 1.0 - niederastroth.de
 */

.vn-videoklick {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .7em;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 1.5em;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    border: 0;
    font-family: inherit;
    color: #fff;
}

.vn-videoklick:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: -3px;
}

/* Vorschaubild */

.vn-videoklick-bild {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: .62;
    transition: opacity .25s ease, transform .35s ease;
}

.vn-videoklick:hover .vn-videoklick-bild {
    opacity: .78;
    transform: scale(1.03);
}

/* Abspielknopf */

.vn-videoklick-knopf {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.4em;
    height: 3.1em;
    border-radius: .8em;
    color: #fff;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .3);
    transition: transform .22s ease, filter .22s ease;
    flex: 0 0 auto;
}

.vn-videoklick-knopf svg {
    width: 46%;
    height: 46%;
}

.vn-videoklick:hover .vn-videoklick-knopf {
    transform: scale(1.09);
    filter: brightness(1.12);
}

/* Beschriftung */

.vn-videoklick-text {
    position: relative;
    font-size: .98em;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}

.vn-videoklick-hinweis {
    position: relative;
    max-width: 34em;
    font-size: .74em;
    line-height: 1.45;
    opacity: .72;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}

/* Der eingesetzte Rahmen */

.vn-videoklick-rahmen {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    max-width: none !important;
    border: 0;
}

/* Mobirise setzt im Videobereich eigene Maße - die hebeln wir hier auf,
   sonst wird der Rahmen hochkant statt im Bildformat. */
.video-wrapper .vn-videoklick-rahmen,
.video-block .vn-videoklick-rahmen,
[class*="video"] .vn-videoklick-rahmen {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
}

/* Schmale Bildschirme */

@media (max-width: 575px) {
    .vn-videoklick {
        gap: .5em;
        padding: 1em;
    }

    .vn-videoklick-knopf {
        width: 3.6em;
        height: 2.5em;
    }

    .vn-videoklick-hinweis {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vn-videoklick-bild,
    .vn-videoklick-knopf {
        transition: none;
    }
}

@media print {
    .vn-videoklick {
        aspect-ratio: auto;
        min-height: 6em;
    }
}


/* Nach dem Start entfernen wir Mobirises Klassen vom Videobereich, damit
   er unseren Rahmen nicht wieder ersetzt. Das Layout übernehmen wir hier. */

.vn-war-video-wrapper,
.vn-war-video-block,
.vn-war-mbr-video {
    position: relative;
    width: 100%;
}
