#avControls {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.av-icon-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #eee;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.av-icon-btn.active {
    background: #4caf50;
    color: white;
}

.av-icon-btn.off {
    background: #f44336;
    color: white;
}

.av-video-modal {
    display: none; /* hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.av-video-modal-content {
    position: relative;
    margin: 50px auto;
    padding: 10px;
    width: 90%;
    max-width: 1200px;
    min-height: 70vh; /* makes it taller relative to viewport */
    max-height: 90vh;
    background-color: #111;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.av-video-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.av-video-section video {
    width: 300px;
    border-radius: 6px;
    background-color: black;
}

.av-top-buttons {
    position: absolute;
    top: 10px;
    right: 15px;
    display: flex;
    gap: 8px;
}

.av-top-buttons .av-icon-btn.small {
    width: 32px;
    height: 32px;
    font-size: 16px;
    background: #eee;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.av-video-modal.minimized .av-video-modal-content {
    width: 200px;
    height: 120px;
    padding: 5px;
    margin: 0;
}

.av-video-modal.minimized #remoteVideos,
.av-video-modal.minimized #localVideo {
    display: none;
}

/* When minimized, make the modal background tiny and move it to bottom-right */
.av-video-modal.minimized {
    width: auto;
    height: auto;
    background: transparent !important; /* remove black overlay */
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
    position: fixed;
    overflow: visible;
}

#localVideo,
.remote-video {
    width: 200px;      /* same size for all videos */
    height: 150px;     /* maintain aspect ratio */
    object-fit: cover; /* crop if needed */
    border: 2px solid #333;
    border-radius: 8px;
}

.video-wrapper {
    position: relative;
}

/* --- Styles for Video Disabled State --- */

.video-wrapper.no-video-active {
    /* Ensures the wrapper maintains the video's dimensions */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000; /* Sets a solid black background */

    /* Inherit size from the video elements */
    width: 200px;
    height: 150px;
    border: 2px solid #333;
    border-radius: 8px;

    /* Ensures the wrapper covers the area where the video was */
    overflow: hidden;
}

/* Hide the actual video element when the placeholder class is active */
.video-wrapper.no-video-active .remote-video {
    visibility: hidden; /* Use visibility: hidden to preserve layout space, or display: none to collapse it */
    /* Since we're setting the background on the wrapper, display: none is fine */
    display: none;
}

/* Optional: Add a simple avatar/name overlay for better UX */
.video-wrapper.no-video-active::after {
    content: "🎥 OFF"; /* Placeholder text or emoji */
    color: white;
    font-size: 18px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
