/* Training Videos Styles */

.content.no-aside {
    padding-top: 5rem;
    position: relative;
    z-index: 1;
}

.training-videos-container {
    padding: 20px;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

    .training-videos-container * {
        pointer-events: auto;
    }

/* Filter Section */
.filter-section {
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    z-index: 10;
}

.category-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid #999;
    background: white;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

    .category-btn:hover {
        background: #f5f5f5;
        color: #333;
    }

    .category-btn.active {
        background: white;
        color: #333;
        border-color: #666;
    }

/* Video Sections */
.videos-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #999;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Video Card */
.video-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    max-width: 280px;
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    position: relative;
    z-index: 5;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .video-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    }

    /* Remove any list markers or bullets */
    .video-card,
    .video-card *,
    .video-thumbnail,
    .video-thumbnail * {
        list-style: none !important;
        list-style-type: none !important;
        list-style-image: none !important;
        marker: none !important;
    }

        /* Remove any tick/check marks from hover */
        .video-card::before,
        .video-card::after,
        .video-card:hover::before,
        .video-card:hover::after,
        .video-thumbnail::before,
        .video-thumbnail::after,
        .video-thumbnail:hover::before,
        .video-thumbnail:hover::after {
            content: none !important;
            display: none !important;
            background-image: none !important;
            background: none !important;
        }

        /* Remove tick from video cards */
        .video-card .k-icon,
        .video-card:hover .k-icon:not(.k-i-eye),
        .video-thumbnail .k-icon,
        .video-thumbnail:hover .k-icon,
        .video-card .k-sprite,
        .video-card:hover .k-sprite,
        .video-thumbnail .k-sprite,
        .video-thumbnail:hover .k-sprite {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            width: 0 !important;
            height: 0 !important;
            background: none !important;
            background-image: none !important;
        }

        /* Ensure no background images or icons appear on hover */
        .video-card,
        .video-card:hover,
        .video-thumbnail,
        .video-thumbnail:hover {
            background-image: none !important;
        }

/* Keep only the eye icon visible in meta */
.video-meta .k-i-eye {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
}

/* Video Thumbnail */
.video-thumbnail {
    width: 100%;
    height: 140px;
    background: #e6d9da !important;
    background-image: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .video-thumbnail img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
    }

    .video-thumbnail .category-tag,
    .video-thumbnail .play-icon,
    .video-thumbnail .duration {
        z-index: 2;
    }

    .video-thumbnail:hover {
        background: #e6d9da !important;
    }

/* Category Tag */
.category-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    border-radius: 4px;
    z-index: 10;
}

    .category-tag.tow-console {
        background-color: #333;
    }

    .category-tag.tow-app {
        background-color: #c90107;
    }

/* Play Icon */
.video-thumbnail .play-icon {
    width: 50px;
    height: 50px;
    background: #c90107 !important;
    background-image: none !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #c90107;
    text-shadow: -1.5px -1.5px 0 white, 1.5px -1.5px 0 white, -1.5px 1.5px 0 white, 1.5px 1.5px 0 white, -1.5px 0 0 white, 1.5px 0 0 white, 0 -1.5px 0 white, 0 1.5px 0 white;
}

    .video-thumbnail .play-icon::before,
    .video-thumbnail .play-icon::after {
        content: none !important;
        display: none !important;
        background: none !important;
    }

/* Duration Badge */
.video-thumbnail .duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Video Info */
.video-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    line-height: 22px;
}

.video-tenant {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .video-tenant .building-icon {
        font-size: 14px;
    }

.video-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    color: #999;
    margin-top: auto;
}

/* Watch Now Button */
.watch-now-btn {
    background: white;
    color: #333;
    padding: 10px 24px;
    border: 2px solid #999;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .watch-now-btn:hover {
        background: #f5f5f5;
        border-color: #666;
    }

    .watch-now-btn .play-icon-btn {
        font-size: 14px;
        margin-right: 6px;
    }

/* No Videos Message */
.no-videos {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Video Modal */
.video-modal .modal-dialog {
    max-width: 900px;
    margin: 30px auto;
}

.video-modal .modal-body {
    padding: 0;
}

.video-modal iframe,
.video-modal video {
    width: 100%;
    height: 500px;
    border: none;
}

#videoPlayerContainer {
    width: 100%;
    height: 500px;
    background: #000;
}

.video-modal .modal-header {
    background: #007bff;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: none;
}

.video-modal .modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    flex-grow: 1;
}

.video-modal .modal-header .close {
    color: white;
    opacity: 1;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: none;
    padding: 0;
    margin: 0 0 0 15px;
    background: transparent;
    border: 0;
    cursor: pointer;
    line-height: 1;
}

    .video-modal .modal-header .close:hover {
        color: white;
        opacity: 0.75;
    }

    .video-modal .modal-header .close:focus {
        outline: none;
    }
