/*--------------------------------------------------------------
# Video grid
--------------------------------------------------------------*/

#videoMediaContainer {
    z-index: 1;
    position: absolute;
    display: flex;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    align-items: center;
    vertical-align: middle;
    overflow: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    gap: 10px;
    padding: 1px;
    justify-content: center;
}

#videoMediaContainer::-webkit-scrollbar {
    display: none;  /* Chrome, Safari, Opera */
}

.videoMediaContainerFullScreen {
    align-content: center;
    flex-wrap: wrap;
}

.pagination-arrow {
    width: 100px;
    height: 100%;
    z-index: 1;
    position: absolute;
    display: flex;
    justify-content: center;
    color: var(--pagination-arrow-color);
    flex-direction: column;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    opacity: 0;
}

.pagination-arrow-left {
    left: 0;
    align-items: start;
    background: var(--pagination-left-arrow-gradient);
}

.pagination-arrow-right {
    right: 0;
    background: var(--pagination-right-arrow-gradient);
    align-items: end;
}

.has-pagination:hover .pagination-arrow{
    opacity: 1;
    transform: translateY(0);
}

#videoMediaContainer:not(.videoMediaContainerFullScreen) .Camera {
    height: 100%;
    width: auto;
    aspect-ratio: 16 / 9;
}

#videoPinMediaContainer {
    z-index: 2;
    position: absolute;
    display: none;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    /*box-shadow: var(--box-shadow);*/
    overflow: hidden;
    /* animation: show 0.4s ease; */
    /* border: 3px solid lime; */
    padding-left: 15px;
    padding-right: 15px;
}

.Camera {
    position: relative;
    vertical-align: middle;
    align-self: center;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-block;
    /*background: transparent;*/
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--card-border)!important;
    /*box-shadow: var(--box-shadow);*/
    /*animation: show 0.4s ease;*/
}

/* .Camera:hover {
    border: 3px solid rgb(113, 157, 239);
} */

/*#videoMediaContainer i {*/
/*    position: absolute;*/
/*    display: none;*/
/*    top: 0;*/
/*    color: rgb(0, 255, 71);*/
/*    font-size: 14px;*/
/*    align-items: center;*/
/*    padding: 5px;*/
/*    margin: 5px;*/
/*    width: auto;*/
/*    height: 25px;*/
/*    border-radius: 5px;*/
/*    background: rgba(0, 0, 0, 0.4);*/
/*}*/

.videoAvatarImage {
    z-index: 7;
    position: absolute;
    display: none;
    /*width: var(--vmi-wh);*/
    /*height: var(--vmi-wh);*/
    width: 40%;
    height: 40%;
    border-radius: 50%;
    transition: box-shadow 0.3s ease;
}

.audio {
    position: absolute;
    right: 0;
    color: #fff;
    margin: 5px;
    width: auto;
    height: 25px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.1);
}

.video-frame-toolbar {
    z-index: 2;
    position: absolute;
    left: 5px;
    bottom: 0;
    font-size: 10px;
    display: flex;
    align-items: center;
    max-width: 95%;
}

.toolbar-fullscreen {
    color: #0e0e0e!important;
    width: 25px;
    height: 25px;
    border-radius: 5px;
    background: #fff;
    font-size: 14px;
    text-align: center;
    padding: 4px;
}

.username {
    color: #0e0e0e;
    font-size: 10px;
    padding: 5px;
    margin: 5px;
    width: auto;
    height: 25px;
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fscreen {
    position: absolute;
    right: 0;
    bottom: 0px;
    color: #fff;
    margin: 5px;
    width: auto;
    height: 25px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.1);
}

.videoMenuBar {
    z-index: 2;
    position: absolute;
    display: inline;
    top: 0;
    left: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    font-size: small;
    font-weight: bold;
    text-align: center;
    width: 100%;
    cursor: default;
    overflow: hidden;
}

.videoMenuBar input,
.videoMenuBar button {
    float: right;
    color: #fff;
    background: transparent;
    border-radius: 5px;
    display: inline;
    border: none;
}

.videoMenuBar button:hover {
    color: grey;
    transition: all 0.3s ease-in-out;
}

.expand-video-content {
    position: relative;
    display: none;
    float: right;
    width: auto;
}

.expand-video:hover .expand-video-content {
    display: inline-flex;
}

#videoMediaContainer video {
    position: absolute;
    margin-left: auto;
    margin-right: auto;
}

.videoCircle {
    position: absolute;
    width: var(--vmi-wh);
    height: var(--vmi-wh);
    border-radius: 50%;
    /* center */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    transition: box-shadow 0.3s ease;
}

.videoDefault {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: '10px';
    transition: box-shadow 0.3s ease;
}

video {
    width: 100%;
    height: 100%;
    object-fit: var(--videoObjFit);
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

#canvasAIElement {
    width: 100%;
    height: 100%;
    object-fit: var(--videoObjFit);
    border-radius: 10px;
    cursor: pointer;
}

video:hover {
    filter: contrast(105%);
}

video:fullscreen {
    object-fit: contain;
}

.mirror {
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.blur {
    -webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    -o-filter: blur(5px);
    -ms-filter: blur(5px);
    filter: blur(5px);
}

input[type='range'] {
    /* display: none; */
    color: #fff;
    width: 50px;
    cursor: pointer;
}

.top-bar {
    position: absolute;
    display: flex;
    right: 15px;
    top: 15px;
    align-items: center;
    max-width: 85%;
}

.top-bar button {
    color: var(--text-color) !important;
}

.druid-username {
    font-size: 14px;
    color: var(--text-color);
    margin: 0;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latency-bar {
    position: absolute;
    bottom: 15px;
    right: 15px;
    padding: 0 6px;
}


._1tvc-top-bar {
    position: absolute;
    display: flex;
    bottom: 5px;
    align-items: center;
    max-width: 85%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

._1tvc-top-bar button {
    color: var(--text-color) !important;
}

._1tvc-username {
    font-size: 14px;
    color: var(--text-color);
    margin: 0;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 2px 5px;
    border-radius: 10px;
}
.meeting-pagination-panel {
    position: absolute;
    bottom: 0;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--meeting-action-icon);
}

.participants-wrapper {
    margin-top: 15px;
    display: flex;
    align-items: center;
}

.participants-label {
    margin-right: 8px;
}

.meeting-button {
    background: transparent;
    border: none;
    padding: 8px;
    margin: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--meeting-action-icon);
    pointer-events: auto;
}

.meeting-button:disabled {
    cursor: default;
    color: var(--meeting-disable-arrow);
}

.meeting-button svg {
    display: block;
}

.cameras-grid-padding-bottom {
    padding-bottom: 40px;
}

div[data-type="videoType"]::before,
div[data-type="screenType"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 50px);
    pointer-events: none;
    z-index: 1;

    opacity: 0;
    transform: translateY(-10px); /* необязательно, для лёгкого сдвига */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

div[data-type="videoType"]:hover::before,
div[data-type="screenType"]:hover::before
{
    opacity: 1;
    transform: translateY(0);
}

div[data-type="videoType"] button,
div[data-type="screenType"] .edit-username-bar button {
    color: #fff!important;
}

.Camera[data-type="videoType"] .mic-button {
    color: #000!important;
}

.Camera[data-type="videoType"] ._1tvc-username,
#videoPinMediaContainer ._1tvc-username,
.Camera[data-type="screenType"] ._1tvc-username{
    color: #fff!important;
}

div[data-type="videoType"] .toolbar-fullscreen {
    color: #0e0e0e!important;
}

@keyframes show {
    0% {
        opacity: 0;
        transform: scale(0.4) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media screen and (max-width: 600px) {
    .username {
        font-size: 12px;
    }
}
@media screen and (max-width: 500px) {
    .username {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        top: auto;
        right: 10px;
        bottom: 10px;
    }
    .latency-bar {
        right: 10px;
        top: 10px;
        bottom: auto;
    }

    video {
        object-fit: cover !important;
    }

    #canvasAIElement {
        object-fit: contain !important;
    }
}
