/* Standardgröße des Haupt-Videobereichs */
/* Hauptbereich für Remote- oder Hauptvideo */
.video-area {
    position: relative;
    width: 100%;
    height: 75vh;
    background-color: black;
    overflow: hidden;
}

    /* Sorgt für korrektes Seitenverhältnis */
    .video-area video {
        width: 100%;
        /* height: 100%; */
        object-fit: contain; /* bewahrt Seitenverhältnis */
        background-color: black;
    }

.screen-share {
    border: 3px solid #2196f3;
    width: 100% !important;
    height: 100% !important;
    z-index: 20;
}

.video-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    position: relative;
}

.screen-share-area {
    flex: 11 auto;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.video-thumbnails {
    width: 22vw;
    min-width: 180px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    justify-content: flex-end;
    z-index: 21;
    pointer-events: none;
    position: relative;
}

    .video-thumbnails video,
    .video-thumbnails .self-view {
        width: 20vw;
        height: 12vw;
        border-radius: 8px;
        object-fit: cover;
        background: #222;
        border: 2px solid rgba(255,255,255,0.3);
        pointer-events: auto;
    }

        .video-thumbnails .self-view video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            background: #222;
            border-radius: 8px;
            transform: scaleX(-1);
        }

.video-controls {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 21;
    display: flex;
    justify-content: center;
    background: rgba(255,255,255,0.75);
    /* padding: 12px 0; */
}

.video-thumbnails:empty {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Responsive: Mobile / small screens */
@media (max-width:768px) {
    .video-container {
        flex-direction: column;
        height: calc(100vh -56px); /* leave space for fixed controls */
    }

    .screen-share-area {
        order: 1;
        width: 100%;
        height: 60vh;
        min-height: 220px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .video-thumbnails {
        order: 2;
        width: 100%;
        height: 120px;
        min-width: 100%;
        max-width: 100%;
        flex-direction: row;
        gap: 8px;
        align-items: center;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 8px;
        background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.2));
        pointer-events: auto;
    }

        .video-thumbnails video,
        .video-thumbnails .self-view {
            width: 120px;
            height: 90px;
            border-radius: 8px;
            object-fit: cover;
        }

    .video-controls {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        z-index: 40;
        display: flex;
        justify-content: center;
        background: rgba(0,0,0,0.6);
        padding: 8px 6px;
    }

        .video-controls .mud-icon-button {
            transform: scale(1.05);
        }
    /* ensure self view in mobile is visible as overlay */
    #selfView {
        position: absolute;
        right: 8px;
        top: 8px;
        width: 120px !important;
        height: 90px !important;
        z-index: 45;
        border-radius: 8px;
        overflow: hidden;
    }
    /* reduce margins inside mud components if needed */
    .mud-paper.p-4 {
        padding: 8px !important;
    }
}

.joinroom-wrapper {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.joinroom-card {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.device-row {
    display: flex;
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
}

.device-select {
    flex: 11220px;
    min-width: 180px;
}

.room-input {
    width: 100%;
}

.actions-row {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-area {
    width: 100%;
    flex: 1;
    background: #000;
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .preview-area video.acs-preview {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.hint-text {
    color: rgba(0,0,0,0.6);
    text-align: center;
    margin-top: 8px;
    width: 100%;
}

/*@media (max-width:600px) {
    .preview-area {
        height: 200px;
    }

    .joinroom-card {
        padding: 16px;
    }
}*/