/* ========================================================================= */
/* WATCH.PHP COMPLETE STYLES                                                 */
/* ========================================================================= */

/* ========================================================================= */
/* SIDEBAR STYLES */
/* ========================================================================= */

.videoSidebar {
    position: absolute;
    top: 46%; 
    right: 10px;
    margin-right: -25px;
    z-index: 100;
    pointer-events: auto;
}

@media (max-height: 700px) and (min-width: 481px) { .videoSidebar { top: 42%; } }
@media (max-height: 600px) and (min-width: 481px) { .videoSidebar { top: 35%; } }
@media (max-height: 500px) and (min-width: 481px) { .videoSidebar { top: 28%; } }
@media (max-height: 450px) and (min-width: 481px) { .videoSidebar { top: 22%; } }
@media (max-height: 400px) and (min-width: 481px) { .videoSidebar { top: 18%; } }
@media (max-height: 350px) and (min-width: 481px) { .videoSidebar { top: 15%; } }
@media (max-height: 300px) and (min-width: 481px) { .videoSidebar { top: 12%; } }
@media (max-height: 250px) and (min-width: 481px) { .videoSidebar { top: 5px; } }

.videoSidebar__button {
    padding: 0 !important;
    text-align: center;
    color: white;
    margin-bottom: 15px !important;
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

.videoSidebar__button button,
.videoSidebar__button a {
    position: relative;
    z-index: 101;
    pointer-events: auto;
}

.likeSidebarButton {
    padding: 20px;
    text-align: center;
    padding-bottom: 10px;
    color: white;
    margin-left: 2px !important;
    position: relative;
    z-index: 10;
}

.numberOfSidebarComments {
    color: white;
    margin-left: 1px;
    margin-top: -30px !important;
    margin-bottom: 15px !important;
    text-align: center;
}

/* ========================================================================= */
/* NAVBAR STYLES */
/* ========================================================================= */

.navbar-nav .nav-item { 
    margin-right: 15px; 
}

.navbar .d-flex { 
    gap: 0 !important; 
    position: static !important; 
    right: auto !important; 
}

.dropdown_data_window {
    background-color: #fff;
    border: 1px solid #DADADA;
    border-radius: 0 0 8px 8px;
    border-top: none;
    width: 300px;
    position: absolute;
    right: 10px;
    top: 40px;
    overflow: scroll;
    margin-right: 553px;
}

.notification_badge {
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    background-color: #F00;
    border-radius: 10px;
    position: absolute;
    top: 5px;
    margin-left: -5px;
}

/* ========================================================================= */
/* Progress Bar & Footer */
/* ========================================================================= */

.video-click-area { 
    pointer-events: auto !important; 
    cursor: pointer !important; 
    z-index: 50 !important; 
}

.video-play-overlay { 
    pointer-events: none !important; 
    z-index: 10000 !important; 
    position: absolute !important; 
    display: flex !important; 
    opacity: 0 !important; 
    transition: opacity 0.3s !important; 
}

.video-play-overlay.show { 
    opacity: 1 !important; 
}

.video-container { 
    position: relative !important; 
    width: 100%; 
    height: 100vh; 
    overflow: hidden; 
}

.videoPlayer { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
}

.videoFooter {
    position: absolute !important;
    bottom: 35px !important;
    left: -10px !important;
    right: 60px !important;
    padding: 0 0 0 5px !important;
    background: none !important;
    min-height: auto !important;
    max-height: 300px !important;
    overflow: visible !important;
    z-index: 100 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.videoFooter::-webkit-scrollbar { 
    display: none !important; 
    width: 0 !important; 
    height: 0 !important; 
}

.videoFooter__text { 
    padding: 0 !important; 
    background: none !important; 
    color: white; 
}

.videoFooter__description { 
    display: block; 
    font-size: 14px; 
    line-height: 1.2; 
}

.videoFooter .description { 
    position: relative !important; 
    width: 100% !important; 
    z-index: auto !important; 
}

.videoFooter .short-description {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: -30px !important;
    width: 100% !important;
    max-height: 80px !important;
    overflow: hidden !important;
    color: white !important;
    background: transparent !important;
    font-family: 'Open Sans', 'Noto Emoji', sans-serif;
    font-size: 12px !important;
    line-height: 1.2 !important;
    text-shadow: 2px 2px 6px rgba(0,0,0,1), 0 0 12px rgba(0,0,0,0.9) !important;
}

.videoFooter .short-description h6 {
    margin: 0 0 3px 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: white !important;
    background: transparent !important;
    text-shadow: 2px 2px 6px rgba(0,0,0,1), 0 0 12px rgba(0,0,0,0.9) !important;
}

.videoFooter .long-description {
    position: relative !important;
    margin: 0 !important;
    margin-bottom: -10px !important;
    padding: 0 10px 0 0 !important;
    width: 100% !important;
    max-height: 250px !important;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    background: transparent !important;
    font-family: 'Open Sans', 'Noto Emoji', sans-serif;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.videoFooter .long-description::-webkit-scrollbar { 
    display: none !important; 
}

.videoFooter .long-description h6 {
    margin: 0 0 3px 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    color: white !important;
    background: transparent !important;
    text-shadow: 2px 2px 6px rgba(0,0,0,1), 0 0 12px rgba(0,0,0,0.9) !important;
}

.videoFooter .long-description p, 
.videoFooter .long-description pre {
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    color: white !important;
    background: transparent !important;
    font-size: 12px !important;
    line-height: 1 !important;
    text-shadow: 1px 1px 4px rgba(0,0,0,1), 0 0 10px rgba(0,0,0,0.9) !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
}

.custom-progress-bar {
    position: absolute !important;
    bottom: 12px !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    padding: 0 10px !important;
    background: none !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    overflow: visible !important;
}

.bar {
    position: relative;
    height: 3px !important;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: auto !important;
    transition: height 0.15s ease;
    z-index: 999999 !important;
    min-height: 3px !important;
    padding: 0 !important;
    overflow: visible !important;
}

.bar:hover, 
.bar.dragging { 
    height: 3px !important; 
}

.buffered { 
    position: absolute; 
    left: 0; 
    top: 0; 
    bottom: 0; 
    background: rgba(255, 255, 255, 0.4); 
    border-radius: inherit; 
    width: 0%; 
    pointer-events: none; 
    transition: width 0.3s ease; 
}

.fill { 
    position: absolute; 
    left: 0; 
    top: 0; 
    bottom: 0; 
    width: 0%; 
    background: #ff0050; 
    border-radius: inherit; 
    box-shadow: 0 0 10px rgba(255, 0, 80, 0.7); 
    pointer-events: none; 
    transition: width 0.1s linear; 
}

.knob { 
    position: absolute; 
    top: 50%; 
    left: 0%; 
    transform: translate(-50%, -50%); 
    width: 12px; 
    height: 12px; 
    border-radius: 50%; 
    background: white; 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); 
    transition: width 0.1s ease, height 0.1s ease; 
    pointer-events: none; 
}

.bar:hover .knob, 
.bar.dragging .knob { 
    width: 16px; 
    height: 16px; 
}

.bar::after {
    content: attr(data-time);
    position: absolute;
    bottom: 22px;
    left: var(--tooltip-left, 0%);
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 1000;
}

.bar[data-time]::after { 
    opacity: 1; 
}

.bar.dragging::after, 
.bar.show-tooltip::after { 
    left: var(--knob-left, 0%); 
}

.app__videos { 
    height: 100vh; 
    overflow-y: scroll; 
    overflow-x: hidden; 
    scroll-snap-type: y mandatory; 
    -webkit-overflow-scrolling: touch; 
}

.video { 
    position: relative; 
    height: 100vh; 
    scroll-snap-align: start; 
}

.app__videos::-webkit-scrollbar { 
    display: none; 
}

.app__videos { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* ========================================================================= */
/* WATCH.PHP SPECIFIC OVERRIDES */
/* ========================================================================= */

body.modal-active { 
    overflow: hidden !important; 
}

.popup-overlay { 
    z-index: 1000 !important; 
    height: 95vh !important; 
    max-height: 95vh !important; 
    overflow-y: auto !important; 
}

.popup-overlay.active { 
    overflow-y: auto !important; 
    overflow-x: hidden !important; 
    z-index: 1000 !important; 
    height: 95vh !important; 
    max-height: 95vh !important; 
}

/* Share button container needs relative positioning */
.share-button-container {
    position: relative !important;
}

.popup-overlay.share {
    z-index: 1000 !important;
    position: absolute !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    top: auto !important;
    left: auto !important;
    right: 15px !important;
    bottom: 57px !important;
    transform: none !important;
    margin: 0 !important;
}

.popup-overlay.share .popup-content {
    z-index: 1001 !important;
    position: relative !important;
    width: 70px !important;
    height: auto !important;
    max-height: 320px !important;
    background: white !important;
    border-radius: 10px !important;
    padding: 5px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
    margin: 0 !important;
    left: auto !important;
    top: auto !important;
}

.popup-overlay.share .popup-content ul { 
    margin: 0 !important; 
    padding: 0 !important; 
    list-style: none !important; 
}

.popup-overlay.share .popup-content ul li { 
    padding: 5px 0 !important; 
    text-align: center !important; 
}

.popup-overlay.share .popup-content ul li img { 
    width: 40px !important; 
    height: 40px !important; 
    display: block !important; 
    margin: 0 auto !important; 
}

.popup-overlay .commentSection { 
    height: 95vh !important; 
    max-height: 95vh !important; 
    overflow-y: auto !important; 
}

.popup-content { 
    z-index: 1001 !important; 
}

.popup-content.active { 
    overflow-y: auto !important; 
    overflow-x: hidden !important; 
    z-index: 1001 !important; 
}

.videoSidebar__button:has(.openShare) { 
    margin-top: 32px !important; 
}

.videoSidebar__button p { 
    margin: 5px 0 0 0 !important; 
    padding: 0 !important; 
    line-height: 1 !important; 
}

#share-count { 
    margin-top: -5px !important; 
    margin-bottom: 0 !important; 
    position: relative !important; 
    top: -10px !important; 
}

.videoSidebar__button[style*="flex-direction: column"] { 
    margin-bottom: 15px !important; 
    position: relative !important; 
}

.videoSidebar__button[style*="flex-direction: column"] > div {
    margin-top: -15px !important;
    position: relative !important;
    z-index: 102 !important;
}

/* 3-dot delete menu container - positioned closer to follow button */
.videoSidebar__button[style*="flex-direction: column"] > div:has(.video-container) {
    margin-top: -18px !important;
}

.video-delete-btn {
    width: 30px !important;
    height: 30px !important;
    padding: 5px !important;
}

.video-delete-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Comment highlight from notifications */
.comment-highlight { 
    background-color: #3b82f6 !important; 
    border-left: 4px solid #3b82f6 !important; 
    padding-left: 10px !important; 
    transition: all 0.3s ease !important; 
}

.comment-highlight-fade { 
    background-color: rgba(59, 130, 246, 0.2) !important; 
    border-left: 4px solid rgba(59, 130, 246, 0.5) !important; 
}

/* ========================================================================= */
/* NAVBAR BASE STYLES */
/* ========================================================================= */

.navbar.fixed-top {
    position: fixed !important;
    top: 0.7vh !important;
    padding: 10px 0 0 0 !important;
    margin: 0 !important;
    height: auto !important;
    background: transparent !important;
}

.navbar .container, 
.navbar .container-fluid, 
.navbar .container-sm, 
.navbar .container-md, 
.navbar .container-lg, 
.navbar .container-xl, 
.navbar .container-xxl {
    --bs-gutter-x: 0 !important;
    --bs-gutter-y: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
}

.navbar-collapse.d-flex { 
    width: 100% !important; 
    display: flex !important; 
    justify-content: space-evenly !important; 
    align-items: center !important; 
    gap: 0 !important; 
    padding: 0 !important; 
    margin: 0 !important; 
}

.navbar-nav { 
    margin: 0 !important; 
    padding: 0 !important; 
    flex-shrink: 0 !important; 
}

.navbar-nav .nav-item { 
    margin: 0 !important; 
    padding: 0 !important; 
}

.navbar-nav .nav-link { 
    padding: 0 !important; 
    margin: 0 !important; 
}

/* ========================================================================= */
/* COMMENT PANEL */
/* ========================================================================= */

.popup-overlay:not(.share) { 
    display: none !important; 
}

.comments-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: black !important;
    z-index: 99999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.comments-overlay.open { 
    opacity: 0.7 !important; 
    visibility: visible !important; 
}

.comments-panel {
    position: fixed !important;
    bottom: 0 !important;
    background: #1E1E1E !important;
    z-index: 100000 !important;
    border-radius: 12px 12px 0 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
    height: 85vh !important;
}

.comments-panel.open { 
    opacity: 1 !important; 
    visibility: visible !important; 
}

.comments-panel .panel-content {
    padding: 10px !important;
    height: 85vh !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.comments-panel .panel-content::-webkit-scrollbar { 
    display: none !important; 
}

.comments-panel .commentSection { 
    margin-left: 0 !important; 
    padding: 0 !important; 
    height: auto !important; 
    max-height: none !important; 
}

/* ========================================================================= */
/* REPLY CONTROLS - FORCE VISIBILITY */
/* ========================================================================= */

.comments-panel .repliesSection .controls,
#panel-content .repliesSection .controls {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    gap: 10px !important;
}

.comments-panel .repliesSection .likeButton,
#panel-content .repliesSection .likeButton {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

.comments-panel .repliesSection .likesCount,
.comments-panel .repliesSection .numLikes,
#panel-content .repliesSection .likesCount,
#panel-content .repliesSection .numLikes {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #aaa !important;
    font-size: 12px !important;
    margin-left: 5px !important;
}

.comments-panel .repliesSection .deleteComment,
.comments-panel .repliesSection .optionsButton,
.comments-panel .repliesSection .moreOptions,
#panel-content .repliesSection .deleteComment,
#panel-content .repliesSection .optionsButton,
#panel-content .repliesSection .moreOptions {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    padding: 5px !important;
}

.comments-panel .deletePopup,
#panel-content .deletePopup {
    background: #333 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    position: absolute !important;
    z-index: 100002 !important;
}

.comments-panel .deletePopup button,
#panel-content .deletePopup button {
    color: #ff4444 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
}

.comments-panel,
.comments-panel .panel-content,
.comments-panel .commentSection,
.comments-panel .comments,
.comments-panel .header,
#panel-content {
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.comments-panel::-webkit-scrollbar,
.comments-panel .panel-content::-webkit-scrollbar,
.comments-panel .commentSection::-webkit-scrollbar,
.comments-panel .comments::-webkit-scrollbar,
.comments-panel .header::-webkit-scrollbar,
#panel-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ========================================================================= */
/* BACKGROUND & TEXT COLORS */
/* ========================================================================= */

html, body, .app__videos, .video { 
    background: black !important; 
}

body { 
    color: white !important; 
}

.comments-panel, 
.comments-panel .panel-content, 
.comments-panel .commentSection, 
#panel-content { 
    background: #1E1E1E !important; 
}

.comments-panel .commentSection, 
.comments-panel .commentSection p, 
.comments-panel .commentSection span, 
#panel-content p, 
#panel-content span { 
    color: white !important; 
}

.comments-panel textarea, 
#panel-content textarea { 
    background: #3B3B3B !important; 
    color: white !important; 
    border: 1px solid #555 !important; 
}

/* ========================================================================= */
/* MOBILE MEDIA QUERIES (Non-width related)                                  */
/* ========================================================================= */

@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
    .likeSidebarButton { 
        padding: 20px; 
        text-align: center; 
        padding-bottom: 10px; 
        color: white; 
        margin-left: 2px !important; 
        position: relative; 
        z-index: 100100 !important; 
    }
    
    .d-flex { 
        gap: 25px !important; 
    }
    
    .dropdown_data_window { 
        margin-right: 0px !important; 
    }
}

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
    .navbar .container { 
        max-width: 70% !important; 
        width: 70% !important; 
        margin: 0 auto !important; 
        padding: 0 40px !important; 
    }
    
    .navbar .d-flex { 
        justify-content: space-between !important; 
        gap: 0 !important; 
        width: 100% !important; 
    }
    
    .navbar-nav .nav-item { 
        margin-right: 0 !important; 
    }
    
    .videoSidebar__button { 
        padding: 20px; 
        text-align: center; 
        padding-bottom: 10px; 
        color: white; 
        position: relative; 
        z-index: 10; 
    }
    
    .likeSidebarButton { 
        padding: 20px !important; 
    }
    
    .videoSidebar { 
        margin-top: 100px !important; 
        right: 10px !important; 
        margin-right: -25px !important; 
    }
    
    .dropdown_data_window { 
        margin-right: 105px !important; 
    }
}

@media only screen and (max-width: 480px) {
    .popup-overlay.share {
        right: 15px !important;
        top: auto !important;
        bottom: 57px !important;
        transform: none !important;
        z-index: 200000 !important;
        border: none !important;
    }

    .popup-overlay.share .popup-content {
        margin: 0 !important;
        border: none !important;
        border-radius: 10px !important;
        padding: 5px !important;
        z-index: 200001 !important;
        background: white !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    }
}

@media only screen and (min-width: 481px) and (max-width: 1024px) {
    .popup-overlay.share {
        right: 15px !important;
        top: auto !important;
        bottom: 57px !important;
        transform: none !important;
    }
}

/* ========================================================================= */
/* POPUP MODAL REPLY CONTROLS - FORCE VISIBILITY */
/* ========================================================================= */

.popup-content .repliesSection .controls {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    gap: 10px !important;
    pointer-events: auto !important;
}

.popup-content .repliesSection .likeButton,
.popup-content .repliesSection button.likeButton {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 100 !important;
}

.popup-content .repliesSection .likesCount,
.popup-content .repliesSection .numLikes,
.popup-content .repliesSection span.likesCount {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #aaa !important;
    font-size: 12px !important;
    margin-left: 5px !important;
}

.popup-content .repliesSection #likeButton {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Ensure like button in popup modal is clickable */
.popup-content .itemContainer .controls,
.popup-content .itemContainer .controls * {
    pointer-events: auto !important;
}

.popup-content .likeButton {
    pointer-events: auto !important;
    cursor: pointer !important;
}
