.hypo-movie {
    position: fixed;
    margin: auto;
    z-index: 15000;
    top: 80px;
    left: 50%;
    transform: translate(-50%,0%);

    color: #222;

    /* 1200 = 100% */

    --title-font-size : clamp(14px, 1.6vw, 20px);
    --content-font-size : clamp(11px, 1.06vw, 14px);
    --action-font-size : clamp(12px, 1.06vw, 14px);
    --zins-font-size : clamp(12px, 1.3vw, 20px);

    --play-button-size : clamp(60px,5vw,120px);

    line-height: 1.3;
}

.hypo-movie-compact {
    --title-font-size : 16px;
    --content-font-size : 14px;
    --action-font-size : 14px;
    --zins-font-size : 14px;

    --play-button-size : 60px;

    line-height: 1.3;
}

#scrollUp {
    z-index: 14999 !important;
}

.hypo-movie.hpm-invisible {
    visibility: hidden;
    pointer-events: none;
}

.hpm-outer-frame {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 15px solid #a2cb3b;
    background-color: #fff;
    overflow: hidden;
    position: relative;
}

.hpm-inner-frame {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    position: relative;
}

.hpm-secondary-frame {
    padding: 20px;
    font-size: var( --content-font-size );

    background-color: #fff;
    overflow: auto;
    
    box-shadow: 5px 5px 20px 0px #aaa;
}

.hpm-secondary-frame h4 {
    font-size: var( --title-font-size );
    margin-bottom: 5px;
}

.hpm-secondary-frame p {
    font-size: var( --content-font-size );
    margin-bottom: 10px;
}

.hpm-secondary-frame i.ff-i-warning-light {
    font-size: clamp(20px, 10vw, 80px);
    line-height: 0.9;
    color: #ffc800;
    opacity: 0.8;
    float: right;
    margin-right: 0px;
    margin-left: 10px;
}

.hpm-play-button {
    position: absolute; 
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    width: var( --play-button-size );
    height: var( --play-button-size );
    cursor: pointer;

    float: right;

    display: none;
    z-index: 1;
}

.hypotheke-youtube-wrapper .hpm-play-button {
    border: 0 none;
    display: block;
}

.hypotheke-youtube-wrapper:hover .hpm-play-button {
    background: rgba(255,255,255,0.7);
}

.hpm-before-playing .hpm-play-button {
    display: block;
}

.hpm-play-button:before {
    display: block;
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width:
        calc(var( --play-button-size ) * 0.275)
        0
        calc(var( --play-button-size ) * 0.275)
        calc(var( --play-button-size ) * 0.4 )
    ;
    border-color: transparent transparent transparent #a2cb3b;
    margin-left: 3px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
}

.hpm-close-button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 20px;
    height: 22px;
    cursor: pointer;
}

.hpm-close-button:after,
.hpm-close-button:before {
    position: absolute;
    content: '';
    border-top: 3px solid #a2cb3b;
    transform: rotate(45deg) translateX(4px);
    width: 20px;
    transform-origin: left;
}

.hpm-close-button:after {
    transform: rotate(-45deg) translateX(-4px);
    transform-origin: right;
}

.hpm-logo {
    position: absolute;
    top: 0;
    right: 0;
    width: 10vw;
    max-width: 150px;
    height: 8vw;
    background: url(/img/logo.svg);
    background-size: contain;
    background-repeat: no-repeat;
    margin: 25px;
}

.hypo-movie-compact .hpm-logo {
    width: 3vw;
    height: 3vw;
}

#hpm-intro .hpm-legend {
    margin-left: 0;
    margin-right: 25%;
}

#hpm-intro .hpm-logo,
#hpm-zinsvergleich .hpm-logo {
    left: 0;
}

.hpm-logo.hpm-logo-dark {
    background-image: url(/img/logo-dark.svg);
}

.hpm-promo .hpm-intro-content {
    padding: 10px 15px;
    margin: 5px;
    background-color: rgba(255,255,255,0.6);
}

.hpm-promo .hpm-full-content {
    position: absolute;
    box-sizing: border-box;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background-color: var(--neutral-3);
    pointer-events: none;
}

.hpm-intro-content {
    white-space: nowrap;
    text-align: left;
    position: absolute;
    top: 0; left: 0;
    padding: 20px;
}

.hpm-yt-style .hpm-play-button:before {
    border-left-color: red;
}

.hpm-legend {
    position: absolute;
    right: 0;
    bottom: 0;
    margin-bottom: 1%;
    box-sizing: border-box;
    background-color: rgba(0,0,0,0.4);    
    transition: all 0.5s ease-in;
}

.hpm-legend {
    padding: 5px 20px;
    width: 75%;
    margin-left: 25%;
}

.hpm-playing .hpm-legend {
    opacity: 0;
    pointer-events: none;
}

.hpm-legend h6 {
    color: white;
    margin: 0;
    font-size: var(--content-font-size);
    line-height: 1;
}

.hpm-frame {  
    border: 5px solid white;
}

.hpm-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hpm-after-playing-text,
.hpm-before-playing-text,
.hpm-when-playing-text {
    display: none;
}

.hpm-before-playing .hpm-before-playing-text {
    display: block;
}

.hpm-after-playing .hpm-after-playing-text {
    display: block;
}

.hpm-playing .hpm-when-playing-text {
    display: block;
}

.hpm-info-content hr {
    margin-bottom: 10px;
}

.hpm-info-content ul {
    margin: 0px 20px;
}

.hpm-info-content {
    box-sizing: border-box;
    overflow: auto;
    background-color: white;
    padding: 20px;
    font-size: var( --content-font-size );
    display: flex;
    flex-direction: column;
}

.hpm-info-content-expander {
    flex: 1;
}

.hpm-info-content .app-start-now-button {
    font-size: var( --action-font-size );
    line-height: 3;
    padding-top: 0;
    padding-bottom: 0;
    white-space:  nowrap;
    display: flex;
    float: left;
}

.hpm-info-content h3 {
    font-size: var( --title-font-size );
    line-height: 1.1;
}

.hpm-info-content h3 small {
    font-size: var( --content-font-size );
}

.hpm-drittangebot-link small {
    font-size: var( --content-font-size );
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    line-height: 1.5;
}

.hpm-drittangebot-link i {
    float: left;
    margin-bottom: 30px;
    margin-right: 10px;
}

.hpm-drittangebot-link {
    font-size: var( --title-font-size );
    line-height:1;
}

.hpm-drittangebot-zins {
    float: right;
    text-align: right;
    font-size: var( --zins-font-size );
    line-height: 1.2;
    font-weight: bold;
    margin-bottom: 5px;
}

.hpm-drittangebot-zins small {
    font-weight: normal;
}

.hpm-timing {
    opacity: 0;
    transition: all 0.5s ease-in-out;
}

.hpm-timing.hpm-timing-visible {
    opacity: 1;
}

.hpm-timing.hpm-timing-active {
    font-weight: bold;
    font-size: larger;
}

/* desktop: 3d effect */
@media screen and (min-width : 1240px ) and (min-height: 600px) {
    .hpm-scene {
        top: 80px;
        width: 50vw;
        height: 45vw;
        max-width: 800px;
        max-height: clamp(200px,55vh,550px);

        transform-style: preserve-3d;
        perspective: 17px;
        perspective-origin: 50% 50%;
    }

    .hpm-16-9 .hpm-scene {
        width: 64vw;
        height: 28.125vw;

        max-width: clamp(400px,50vw,940px);
        max-height: clamp(225px,28.125vw,540px);
    }

    .hpm-youtube-popup .hpm-scene {
        width: 64vw;
        height: 28.125vw;
    }
    
    .hpm-outer-frame {
        transition: all 0.6s ease-in-out;
    }

    .hpm-info-content {
        position: absolute;
        top: calc(5% + 15px);
        left: 15px;
        width: calc(60% - 30px);
        height: calc(90% - 30px);
        min-height: 300px;

        box-shadow: -5px 5px 10px 0px gray;
        transition: all 0.6s ease-in-out;
    }
    
    .hpm-secondary-frame {
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 100%;
        transform: translate(-50%,130%);
        transition: all 0.6s ease-in-out;
    }

    .hpm-outer-frame {
        box-shadow: -50px 5px 2000px 100px black;
    }

    .hpm-outer-frame {
        transform: translateX(20%) rotateY(-0.2deg);
    }

    .hpm-16-9 .hpm-outer-frame {
        transform: translateX(35%) rotateY(-0.2deg);
    }

    .hpm-secondary-frame {
        opacity: 1;
        pointer-events: all;
    }
    
    .hpm-info-content {
        transform: rotateY(0.2deg) translateX(-40%) translateZ(1px);
    }
    
    .hpm-playing .hpm-outer-frame {
        transform: rotateY(0deg) translateX(20vw);
    }

    .hpm-youtube-popup.hpm-playing .hpm-outer-frame {
        transform: rotateY(0deg);
    }
    
    .hpm-playing .hpm-info-content {
        transform: rotateY(0.2deg) translateX(-15vw) translateY(0);
        width: 30vw;
        min-width: 250px;
        height: calc(90% - 30px);
    }
    
    .hpm-invisible .hpm-outer-frame {
        transform: translateX(300%) rotateY(-1deg);
    }
    
    .hpm-invisible .hpm-info-content {
        transform: rotateY(1deg) translateX(-200%);
    }

    .hpm-invisible .hpm-secondary-frame {
        opacity: 0;
    }

    /*
    .hpm-after-playing .hpm-outer-frame {
        width: 100%;
        transform: none;
    }
    
    .hpm-after-playing .hpm-frame {
        opacity: 0;
    }
    
    .hpm-after-playing .hpm-info-content {
        top: 15px;
        width: calc(100% - 30px);
        height: calc(100% - 30px);
        transform: none;
    }
    */

    .hpm-drittangebot-zins {
        margin-top: -7px;
    }

    .hpm-scene .hpm-legend {
        padding: 20px;
        width: 50%;
        margin-left: 50%;
    }
}

/* tablet vertical */
@media screen and (orientation: portrait) and (max-width: 1240px) {

    .hpm-outer-frame {
        border-width: 7px;
    }

    .hpm-inner-frame {
        border-width: 2px;
    }

    .hpm-secondary-frame,
    .hpm-info-content {
        padding: 10px;
    }

    .hpm-scene {
        box-shadow: -50px 5px 2000px 100px black;   
    }

    .hpm-secondary-frame {
        margin-top: 20px;
    }
}


/* mobile vertical */
@media screen and (orientation: portrait) and (max-width: 600px) {
    .hypo-movie {
        top: 0px;
        width: 100%;
        border: 10px solid transparent;
        box-sizing: border-box;
    }

    .hpm-outer-frame {
        border-width: 7px;
    }

    .hpm-inner-frame {
        border-width: 2px;
    }

    .hpm-info-content .app-start-now-button {
        box-sizing: border-box;
        border-radius: 0;
        text-align: center;
    }

    .hpm-scene {
        box-shadow: -50px 5px 2000px 100px black;   
    }

    .hpm-secondary-frame {
        margin-top: 20px;
    }
    
    .hpm-secondary-frame,
    .hpm-info-content {
        padding: 10px;
    }
}


/* mobile horizontal: video | info on top, secondary below */
@media screen and (orientation: landscape) and (max-width: 1240px)  {
    .hypo-movie {
        display: flex;
        flex-direction: column;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: none;
        border: 10px solid transparent;
        box-sizing: border-box;
    }

    .hpm-scene {
        display: flex;
        margin-bottom: 10px;
        box-shadow: -50px 5px 2000px 100px black;
        height: 60%;
        box-sizing: border-box;
    }

    .hpm-youtube-popup .hpm-scene {
        height: 100%;
    }

    .hpm-youtube-popup .hpm-scene,
    .hpm-16-9 .hpm-scene {
        height: 36vw;
    }

    .hpm-outer-frame {
        border-width: 7px;
    }

    .hpm-16-9 .hpm-outer-frame {
        flex: 64vw;
    }

    .hpm-inner-frame {
        border-width: 2px;
    }

    .hpm-16-9 .hpm-inner-frame {
        flex: 36vw;
    }

    .hpm-secondary-frame {
        height: 40%;
        margin-top: 0px;
        box-sizing: border-box;
    }
    
    .hpm-secondary-frame,
    .hpm-info-content {
        padding: 10px;
    }
}

.ranking tr:hover td {
    cursor: pointer;
    text-decoration: underline;
}

.ranking tr.ranking-hypotheke-promo:hover td {
    cursor: initial;
    text-decoration: none;
}

.hypotheke-youtube-inline,
.hypotheke-youtube-popup {
    cursor: pointer;
}

.hypotheke-youtube-wrapper {
    position: relative;
    --play-button-size : clamp(60px,5vw,120px);
}

.ff-promo-news .hypotheke-youtube-wrapper {
    --play-button-size : clamp(40px,3vw,80px);
}