:root {
    --vh: 100%;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: calc(var(--vh, 1vh) * 100);
    background-color: #333;
    overflow: hidden;
}

.camera-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#snapshot {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.banners-container {
    position: absolute;
    display: flex;
    z-index: 5;
    gap: 1em;
}

.banner {
    color: #fff;
    padding-bottom: 0.5em;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    box-sizing: border-box;
}

.banner.visible {
    opacity: 1;
}

/* Bannery vždy pod sebou (landscape i portrait) */
.banners-container {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 90%;
    overflow-y: auto;
}

.banner {
    width: min(90vw, 420px);
}

@media (orientation: landscape) {
    .banner {
        width: min(60vw, 500px);
    }
}

/* Responsivní text */
@media (max-width: 768px) {
    .banner {
        font-size: 0.9em;
        padding: 0.7em;
    }
}

/* Scrollbar se zobrazí jen když jsou bannery viditelné */
.banners-container:not(:has(.banner.visible)) {
    overflow-y: hidden;
}

/* Scrollbar pro portrait při mnoha bannerech */
.banners-container::-webkit-scrollbar {
    width: 8px;
}

.banners-container::-webkit-scrollbar-track {
    background: transparent;
}

.banners-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}