/* Video Player Buttons & Actions */

/* Fixed Back Arrow - Top Left */
.fixed-back-arrow {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fixed-back-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.fixed-back-arrow i {
    color: #fff;
    font-size: 18px;
}

.fixed-back-arrow:hover i {
    color: #007bff;
}

/* Video Action Buttons */
.video-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.video-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.video-action-btn.show {
    background-color: rgba(0, 123, 255, 0.2);
    border-color: #007bff;
    color: #007bff;
}

/* Specific styling for Live Chat button when active */
#toggle-chat-view.show,
.usershowchat-btn.show {
    background-color: rgba(0, 123, 255, 0.2) !important;
    border-color: #007bff !important;
    color: #007bff !important;
}

.video-action-btn img {
    filter: brightness(0) invert(1);
}

.video-action-btn.show img,
#toggle-chat-view.show img,
.usershowchat-btn.show img {
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(200deg);
}

/* Dropdown positioning for video action buttons */
.userlistdrp-list,
.usershowchat-drp-box {
    position: fixed !important;
    top: 120px !important;
    right: 20px !important;
    z-index: 9999 !important;
    min-width: 300px;
    max-width: 400px;
}

/* Episodes dropdown styling */
#episodesDropdownBtn + .dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
    min-width: 250px;
}

#episodesDropdownBtn + .dropdown-menu .dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
}

#episodesDropdownBtn + .dropdown-menu .dropdown-item.active {
    background-color: #007bff;
    color: white;
}

/* Chat send button */
.chat-full-container .chat-send-btn {
    background: #007bff;
    border: none;
    border-radius: 6px;
    color: #fff;
    padding: 12px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-full-container .chat-send-btn:hover {
    background: #0056b3;
}

/* New "Users Viewing" Button */
#viewers-btn {
    border-color: #28a745;
    color: #28a745;
    font-weight: 500;
}

#viewers-btn:hover {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

#viewers-btn .fa-eye {
    margin-right: 6px;
}

.hidden {
    display: none !important;
}

/* Desktop: Show chat toggle button and hide mobile elements */
@media (min-width: 768px) {
    #toggle-chat-view {
        display: inline-flex !important;
    }

    /* Ensure mobile chat overlay is NEVER shown on desktop */
    .mobile-chat-fullscreen,
    #mobile-chat-fullscreen {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(100%) !important;
    }
}

/* Responsive adjustments for video action buttons */
@media (max-width: 768px) {
    .right-btn-text {
        gap: 8px !important;
    }

    .video-action-btn {
        font-size: 12px;
        padding: 5px 10px;
        gap: 4px;
    }

    /* Keep button text visible on mobile */
    .video-action-btn span {
        display: inline !important;
    }

    .userlistdrp-list,
    .usershowchat-drp-box {
        right: 10px !important;
        min-width: 280px;
        max-width: calc(100vw - 20px);
    }

    .chat-full-container {
        height: 500px;
    }

    #active-userList img {
        width: 20px;
        height: 20px;
    }
}
