.evc-video-call {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#evc-stream-wrapper {
    background-color: var(--evc-primary);
    padding: 10px; /* Reduced padding */
    display: none;
    width: 100vw;
    box-sizing: border-box; /* Ensure padding is included in width */
}

#evc-join-btn {
    font-size: 18px;
    padding: 15px 30px; /* Adjusted padding */
    cursor: pointer;
    background-color: var(--evc-primary);
    color: var(--evc-white);
    border: none;
    outline: none;
    border-radius: 30px;
    transition: background-color 0.3s ease; /* Smooth transition */
}

#evc-join-btn:hover {
    filter: brightness(1.1); /* Slightly brighter on hover */
}

#evc-video-streams {
    display: flex; /* Changed to flexbox for dynamic layout */
    flex-wrap: wrap; /* Allow videos to wrap to next line */
    justify-content: center; /* Center videos */
    align-items: center;
    gap: 10px; /* Spacing between videos */
    width: 100%;
    min-height: 400px; /* Minimum height for video area */
    max-height: calc(100vh - 120px); /* Adjust max-height based on viewport and controls */
    overflow-y: auto; /* Scroll if many videos */
    background-color: #000; /* Black background for video area */
}

.video-container {
    flex: 1 1 auto; /* Allow containers to grow and shrink */
    min-width: 280px; /* Minimum width for each video tile */
    max-width: 48%; /* Max width to allow two columns on larger screens */
    height: auto;
    aspect-ratio: 16 / 9; /* Maintain 16:9 aspect ratio */
    background-color: #333; /* Placeholder background */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Hide overflow from video */
    position: relative; /* For absolute positioning of video-player */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
    box-sizing: border-box;
}

/* For single user, make it wider */
#evc-video-streams.single-user .video-container {
    max-width: 98%;
}

/* For two users, make them occupy roughly half */
#evc-video-streams.two-users .video-container {
    max-width: 48%;
}

/* For 3-4 users, divide space */
#evc-video-streams.three-four-users .video-container {
    max-width: 31%; /* Roughly 3 per row */
}


.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the container, cropping if necessary */
    position: absolute;
    top: 0;
    left: 0;
}

.evc-video-call .fa, .evc-video-call .fa-solid {
    background-color: var(--evc-transparent);
    font-size: 28px; /* Slightly smaller icons */
    padding: 10px 15px; /* Adjusted padding */
    cursor: pointer;
    color: var(--evc-white);
    border-radius: 5px; /* Slightly rounded controls */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.evc-video-call .fa:hover, .evc-video-call .fa-solid:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Subtle hover effect */
}

#evc-leave-btn {
    background-color: var(--evc-red);
    color: var(--evc-white);
}
#evc-leave-btn:hover {
    filter: brightness(1.2);
}

#evc-stream-controls {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Increased gap between controls */
    margin-top: 15px; /* Adjusted margin */
    padding-bottom: 10px; /* Padding below controls */
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    #evc-video-streams {
        flex-direction: row; /* Stack videos vertically on smaller screens */
        max-height: calc(100vh - 300px); /* Adjust max-height for mobile */
       /* min-height: 200px!important;  Remove min-height to allow full stack */
    }
    .video-container {
        width: 49%!important; /* Full width on small screens */
        min-width: unset;
		min-height: 250px!important;
    }
    #evc-stream-controls {
        flex-wrap: wrap; /* Allow controls to wrap */
        gap: 8px;
    }
    #evc-stream-wrapper {
        padding: 5px; /* Less padding on small screens */
		width: 400px!important;
    }
}

/* Custom styles for camera switch icon based on facingMode */


.evc-video-call .fa-camera-rotate-env {
    color: #FFC107 !important; /* Orange for Back Camera */
}
