
/* Default state when body does not have IAmOnline or IAmNOTOnline classes */
.ShowIfIAmOnline, .ShowIfIAmNOTOnline {
    display: none; /* Hide elements by default */
}

/* Show elements only if the body has class 'IAmOnline' */
body.IAmOnline .ShowIfIAmOnline {
    display: block !important; /* Show the element */
}

body.IAmOnline .HideIfIAmOnline {
    display: none !important; /* Hide the element */
}

/* Show elements only if the body has class 'IAmNOTOnline' */
body.IAmNOTOnline .ShowIfIAmNOTOnline {
    display: block !important; /* Show the element */
}

body.IAmNOTOnline .HideIfIAmNOTOnline {
    display: none !important; /* Hide the element */
}

/* Audio Toggle Button Styles */
.audio-toggle-button {
    outline: none;
}

.audio-toggle-button:hover {
    background-color: rgba(115, 133, 159, 0.5);
}

.audio-toggle-button:before {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    font-size: 1.2em;
    line-height: 1.0em;
    font-family: "Font Awesome\ 5 Free";
    font-weight: 900;
}

.audio-toggle-button.video-source:before {
    content: "\f008"; /* Video icon */
}

.audio-toggle-button.audio-source:before {
    content: "\f025"; /* Audio icon */
}

/* Keep the live watch layout fluid when the sidebar, socket presence panel or chat is open. */
#modeYoutubePrincipal {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden !important;
}

#modeYoutubePrincipal #modeYoutubeTop,
#modeYoutubePrincipal #modeYoutubeBottom,
#modeYoutubePrincipal #modeYoutubeBottomContent,
#modeYoutubePrincipal #yptRightBar {
    min-width: 0;
    max-width: 100%;
}

#modeYoutubePrincipal #modeYoutubeTop > [class*="col-"],
#modeYoutubePrincipal #modeYoutubeBottom > [class*="col-"] {
    min-width: 0;
}

#modeYoutubePrincipal #mainVideo,
#modeYoutubePrincipal .video-js,
#modeYoutubePrincipal .vjs-tech {
    display: block;
    width: 100%;
    max-width: 100%;
}

#modeYoutubePrincipal .panel,
#modeYoutubePrincipal .list-group-item {
    min-width: 0;
    max-width: 100%;
}

#modeYoutubePrincipal h1 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: clamp(20px, 3vw, 32px);
    line-height: 1.3;
}

#modeYoutubePrincipal h1 > span,
#modeYoutubePrincipal h1 > small {
    min-width: 0;
    overflow-wrap: anywhere;
}

#modeYoutubePrincipal .watch8-action-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

#modeYoutubePrincipal .watch8-action-buttons > .btn,
#modeYoutubePrincipal .watch8-action-buttons > button {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

#modeYoutubePrincipal .extraVideos,
#modeYoutubePrincipal .menusDiv {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    #modeYoutubePrincipal {
        margin-top: 0;
    }

    #modeYoutubePrincipal #modeYoutubeBottom {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    #modeYoutubePrincipal #modeYoutubeBottomContent,
    #modeYoutubePrincipal #yptRightBar {
        width: 100%;
        padding-right: 8px;
        padding-left: 8px;
    }

    #modeYoutubePrincipal #yptRightBar {
        order: 2;
    }

    #modeYoutubePrincipal #modeYoutubeBottomContent {
        order: 1;
    }

    #modeYoutubePrincipal .panel-body {
        padding: 12px;
    }

    #modeYoutubePrincipal h1 {
        font-size: 22px;
    }

    #modeYoutubePrincipal .watch8-action-buttons > .btn,
    #modeYoutubePrincipal .watch8-action-buttons > button {
        flex: 1 1 auto;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    #modeYoutubePrincipal #modeYoutubeBottomContent,
    #modeYoutubePrincipal #yptRightBar {
        padding-right: 4px;
        padding-left: 4px;
    }

    #modeYoutubePrincipal .panel-body {
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #modeYoutubePrincipal * {
        scroll-behavior: auto !important;
    }
}
