/* CCTV / VMS Camera Grid layouts */
.video-card-vms {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.video-card-vms:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.video-container {
    position: relative;
    background-color: #020617;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-container video, .video-container iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vms-overlay-top {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.vms-overlay-bottom {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    pointer-events: none;
    z-index: 10;
}

.video-badge {
    background-color: rgba(15, 23, 42, 0.85);
    color: #F8FAFC;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    backdrop-filter: blur(4px);
    pointer-events: auto;
    border: 1px solid rgba(255,255,255,0.1);
}

.camera-controls {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 15;
    background-color: rgba(15, 23, 42, 0.85);
    padding: 0.25rem;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    display: flex;
    gap: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.camera-controls button, .camera-controls a {
    background: transparent;
    border: none;
    color: #F8FAFC;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.15s, color 0.15s;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.camera-controls button:hover, .camera-controls a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--accent-color);
}

/* Fullscreen mode */
.fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background-color: #000000 !important;
}

.fullscreen-active .video-container {
    height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
}

/* Custom grid widths for VMS Video Wall */
@media (min-width: 768px) {
    .row-cols-5 > * {
        flex: 0 0 auto !important;
        width: 20% !important;
    }
    .row-cols-6 > * {
        flex: 0 0 auto !important;
        width: 16.666667% !important;
    }
}

/* Video Wall Mode Body Overrides */
body.video-wall-active {
    background-color: #020617 !important;
}

body.video-wall-active #main-content {
    background-color: #020617 !important;
    padding: 0.5rem !important;
    height: 100vh !important;
    overflow: auto !important;
}

body.video-wall-active .video-card-vms {
    border: 1px solid #1e293b !important;
    background-color: #020617 !important;
    border-radius: 4px !important;
}

body.video-wall-active .video-container {
    border-radius: 4px !important;
}

