/* Video Meeting Styles */
.video-meeting-container {
    width: 100%;
    margin-bottom: 1rem;
}

.video-container {
    width: 100%;
    background: #111;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.remote-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    width: 100%;
    height: 140px;
}


.remote-videos,
#videoA,
#videoB {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remote-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #333;
    border-radius: 8px;
    overflow: hidden;
}

.remote-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.local-video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #333;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.local-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 20px;
    z-index: 10;
}

.meeting-status-container {
    text-align: center;
}

.meeting-status-container #meeting-status {
    font-size: 12px;
    padding: 4px 8px;
}

/* Recording indicator animation */
@keyframes recording-pulse {
    0% {
        background-color: rgba(220, 53, 69, 0.7);
    }

    50% {
        background-color: rgba(220, 53, 69, 1);
    }

    100% {
        background-color: rgba(220, 53, 69, 0.7);
    }
}

#start-recording.recording-active {
    animation: recording-pulse 2s infinite;
}

.participant-name {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 5;
}

/* Video participants list */
.video-participants {
    max-height: 200px;
    overflow-y: auto;
}

/* Message styles for system messages related to video meetings */
.message-content .message-text:has(.message-video-meeting) {
    background-color: #f0f7ff !important;
    color: #1a73e8 !important;
    font-weight: 500;
}

.message-video-meeting {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-video-meeting i {
    font-size: 1.2rem;
}

/* Media queries for responsive layout */
@media (max-width: 992px) {
    .video-container {
        flex-direction: column;
    }

    .remote-videos {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .video-meeting-container .card-body .row {
        flex-direction: column;
    }

    .video-meeting-container .col-md-3 {
        order: -1;
        margin-bottom: 1rem;
    }

    .local-video-container {
        padding-top: 40%;
    }
}

.open-video-fullscreen {
    transition: all ease-in-out 1s;
    cursor: pointer;
    height: 140px;
    border-radius: 15px;
}

.fullscreen-video-modal {
    background-color: rgba(0, 0, 0, 0.9);
    position: fixed;
    margin: auto;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.95);
    /* transition: opacity 0.3s ease, transform 0.3s ease; */
}

.fullscreen-video-modal video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* or "cover" depending on your preference */
}
body video {

    border-radius: 15px;
}

.open-video-fullscreen.fullscreen-video-modal {
    height: auto;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}