
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

.navbar {
    position: sticky !important;
    margin: 0 !important;
}

#mainpage {
    padding-top: 0;
}

#loginform > .form-group {
    margin-right: 5px;
}

.center {
    text-align: center;
}

.messagebox > p {
    margin-top: 20px;
}

.vertical-spacer {
    margin-top: 10px;
}

#announcements > .col-md-12 > .alert {
    margin: 0;
}

#motdrow {
    display: inline-table;
    margin: 0;
}

#motdrow > .col-md-12 {
    padding: 0;
    min-height: 0;
}
    
#motdwrap {
    margin: 0 !important;
}

#messagebuffer {
    width: auto;
    height: 100% !important;
    padding-left: 5px;
    padding-right: 5px;
}

#messagebuffer > div > .label {
    margin-right: 3px;
}

#usercount {
    white-space: nowrap;
    flex-grow: 2;
    text-align: left;
    padding-left: 5px;
}

#userlist {
    height: calc(100% - 30px) !important;
    width: 100%;
    position: absolute;
    float: left;
    border-right: 0;
    font-size: 9pt;
    list-style: none outside none;
    padding: 0;
    top: 30px;
    z-index: 100;
}

#messagebuffer, #userlist {
    overflow-x: hidden;
    overflow-y: scroll;
    margin-bottom: 0;
}

#chatline, #guestlogin > input, #guestlogin > .input-group-addon {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.linewrap, .linewrap code {
    white-space: pre-wrap; /* css-3 */
    white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
    white-space: -pre-wrap; /* Opera 4-6 */
    white-space: -o-pre-wrap; /* Opera 7 */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
}

#from-url, #from-search {
    margin-top: 3px;
}

.clear {
    clear: both;
}

.chat-timestamp {
    font-size: 8pt;
}

.chat-name {
    font-weight: bold;
}

#customembed > .input-group {
    margin-top: 5px;
}

.drink {
    margin: 10px 10px;
    padding: 10px 0px;
    border: 2px solid;
}

#drinkcount {

    text-align: center;
    font-weight: bold;
}

#chatheader {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 4px;
    min-height: 30px;
}

/* REPURPOSE VIDEOWRAP-HEADER AS OVERLAY */

#videowrap-header {
    position: relative;
    width: 100%;
    max-height: 30px;
    z-index: 100;
    padding: 5px;
    visibility: hidden;
}

#videowrap:hover #videowrap-header {
    visibility: unset;
}

#videocontrols {
    bottom: 3px;
}
    
.btn-video {
    padding: 3px 7px !important;
    background: none !important;
    border: none !important;
}

/* END */

#chatheader > p, #videowrap-header {
    margin: 0;
}

.pointer {
    cursor: pointer;
}

#chatwrap, #videowrap {
    margin-bottom: 10px;
    padding-left: 0;
    padding-right: 0;
}

#videowrap {
    display: flex;
    height: calc(100vh - 50px);
}

#chatwrap {
    height: calc(100vh - 50px) !important;
    display: flex;
    flex-flow: column;
}

.embed-responsive-chat {
    padding-bottom: 78.75%;
}

#userpl_list {
    list-style: none outside none;
    margin-left: 0;
    max-height: 500px;
    overflow-y: scroll;
}

/*
#userpl_list li {
    display: inline-block;
    line-height: 22px;
    width: 100%;
    clear: both;
    margin: 2px 0 0 auto;
    padding: 2px;
    font-size: 8pt;
}
*/

#customembed_wrap {
    margin: 5px 0;
}

#playlistmanagerwrap {
    margin-top: 10px;
}

#library {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 5px;
}

#library_search, #queue_next, #ce_queue_next {
    border-radius: 0;
}

#plmeta {
    border-radius: 4px;
    border-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.videolist {
    list-style: none outside none;
    margin-left: 0;
    max-height: 500px;
    overflow-y: auto;
}



#pllength {
    float: right;
}

.queue_temp {
    background-image: url(/img/stripe-diagonal.png);
}

.videolist {
    padding: 0;
    margin: 0;
}

#queue > li:last-child {
    border-bottom-width: 0;
    margin-bottom: 0;
}

#userpl_list > li:last-child {
    border-bottom-width: 1px;
}

.videolist > li:first-child {
    border-top-width: 1px;
}

li.ui-sortable-helper, li.ui-sortable-placeholder + li.queue_entry {
    border-top-width: 1px;
}

.qe_btn {
    height: 20px;
    font-family: Monospace;
    padding: 0 5px 0 5px;
    margin: auto;
    overflow: hidden;
}

.qe_buttons, .qe_title {
    float: left;
}

.qe_time {
    float: right;
    font-family: Monospace;
}

.qe_clear {
    clear: both;
}

.clear {
    clear: both;
}

#chatheader .label {
    height: 100%;
    margin-left: 2px;
}

.well hr {
    border-color: #cccccc;
}

#csstext, #jstext {
    font-family: Monospace;
}

#optedit, #permedit, #filteredit, #motdedit, #cssedit, #jsedit,
#banlist, #loginhistory, #channelranks, #chanlog {
    display: none;
}

#chanlog_contents {
    max-height: 400px;
    overflow-y: scroll;
    margin-top: 10px;
}

.server-msg-disconnect {
    border: 1px solid #ff0000;
    line-height: 2;
    margin-top: 5px;
    margin-bottom: 5px;
    color: #ff0000;
    text-align: center;
    background-color: rgba(129, 20, 21, 0.1);
}

.server-msg-reconnect {
    border: 1px solid #009900;
    line-height: 2;
    margin-top: 5px;
    margin-bottom: 5px;
    color: #009900;
    text-align: center;
    background-color: rgba(18, 100, 18, 0.1);
}

.queue_sortable li {
    cursor: row-resize;
}

.poll-notify {
    color: #0000aa;
    font-weight: bold;
    font-size: 14pt;
}

.userlist_item {
    cursor: pointer;
}

.userlist_siteadmin {
    color: #44afed!important;
    font-weight: bold!important;
}

.userlist_globaladmin {
    color:  #fd6a02!important;
    font-weight: bold!important;
}

.userlist_owner {
    color: #cc0000!important;
    font-weight: bold!important;
}

.userlist_op {
    color: #00aa00!important;
}

.userlist_guest {
    color: #708090!important;
}

.action {
    font-style: italic;
    color: #888888;
}

.server-whisper {
    font-style: italic;
    color: #708090;
    font-size: 8pt;
}

.spoiler {
    color: #000000;
    background-color: #000000;
}

.spoiler:hover {
    color: #ffffff;
}

.greentext {
    color: #789922; /* Color value directly from 4chan */
}

.shout {
    color: #ff0000;
    font-weight: bold;
    font-size: 18pt;
}

.mono {
    font-family: Monospace;
}

.nick-highlight {
    background-color: #ddffdd;
}

.nick-hover {
    background-color: #ffff99;
}

.timestamp {
    font-size: 8pt;
}

.profile-box {
    z-index: 1001;
    position: fixed;
    border: 1px solid #aaaaaa;
    border-radius: 5px;
    padding: 5px;
    max-width: 200px;
    max-height: 300px;
    overflow-y: hidden;
}

.user-dropdown {
    z-index: 9999;
    position: absolute;
    border: 1px solid #aaaaaa;
    border-radius: 5px;
    color: #000000;
    max-width: 200px;
    padding: 5px;
}

.profile-image {
    max-width: 80px;
    max-height: 80px;
    border: 1px solid #aaaaaa;
    border-radius: 5px;
}

#togglemotd .glyphicon {
    font-size: 10pt;
}

.poll-menu > .btn, .poll-menu > input {
    clear: both;
    margin-bottom: 10px;
}

.poll-menu {
    margin-top: 10px;
}

#search_clear {
    margin-top: 10px;
}

#qualitywrap {
    margin-right: 5px;
}

#guestlogin .input-group-addon {
    min-width: 120px;
}

#channeloptions .modal-header {
    border-bottom: none;
}

#pollwrap {
    position: absolute;
    z-index: 1;
    width: 450px;
    padding-top: 30px;
}

#pollwrap > div {
    margin-top: 10px;
}

#pollwrap > .well > .btn-danger {
    margin-right: 20px;
}

.option {
    margin-top: 5px;
}

.option-selected {
    font-weight: bold;
}

.option > button {
    margin-right: 15px;
}

.option-selected > button {
    border-width: 3px !important;
    margin-right: 10px;
}

#useroptions .modal-header {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

#useroptions .modal-body {
    padding-top: 0;
    margin-top: 0;
}

.qfalert {
    margin-bottom: 10px;
    padding-left: 0!important;
    padding-right: 0!important;
}

#customembed-content {
    font-family: Monospace;
}

#cs-csstext, #cs-jstext, #cs-motdtext {
    font-family: Monospace;
}

#cs-csssubmit, #cs-motdsubmit, #cs-jssubmit {
    margin-top: 10px;
}

#cs-chatfilters input[type='text'], #cs-chatfilters textarea {
    font-family: monospace;
}

#cs-chatfilters-exporttext {
    margin-top: 5px;
}

#cs-emotes input[type='text'], #cs-emotes textarea {
    font-family: monospace;
}

#cs-emotes-exporttext {
    margin-top: 5px;
}

.pagination {
    margin: 0;
}

#cs-chanlog-filter {
    border-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

#cs-chanlog-text {
    max-height: 300px;
    overflow-y: scroll;
    font-size: 8pt;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.channel-emote {
    max-width: 200px;
    max-height: 200px;
}

#cs-emotes td:nth-child(3) {
    max-width: 300px;
}

#pmbar {
    position: fixed;
    bottom: 0;
    z-index: 1000;
    min-width: 100%;
    pointer-events: none;
}

body.chatOnly .pm-panel, body.chatOnly .pm-panel-placeholder {
    margin-left: 0;
    margin-right: 5px;
    float: right;
}

.pm-panel, .pm-panel-placeholder {
    margin-left: 5px;
    margin-bottom: 20px;
    float: left;
    width: 250px;
    pointer-events: auto;
}

.pm-panel {
    margin-bottom: 0!important;
    border-radius: 0!important;
    border-radius: 0!important;
}

.pm-panel > .panel-heading {
    cursor: pointer;
    border-radius: 0!important;
    border-radius: 0!important;
}

.pm-panel > .panel-body {
    padding: 0;
}

.pm-panel > .panel-body > .pm-buffer {
    height: 200px;
    overflow-y: scroll;
}

.pm-panel > .panel-body > hr {
    margin: 0;
}

.pm-input {
    margin: 0;
    width: 100%;
    border-top-left-radius: 0!important;
    border-top-right-radius: 0!important;
}

.chat-shadow {
    text-decoration: line-through;
}

#chanjs-allow-prompt {
    text-align: center;
}

#chanjs-allow-prompt-buttons {
    margin-top: 10px;
}

#chanjs-allow-prompt-buttons button:first-child {
    margin-right: 5px;
}

@media screen and (min-width: 768px) {
    .modal-dialog {
        min-width: 600px!important;
        max-width: 1200px!important;
        width: auto!important;
    }

    .modal-dialog-nonfluid.modal-dialog {
        max-width: 600px!important;
    }
}

table td {
    max-width: 200px;
    word-wrap: break-word;
}

#cs-chatfilters table .form-group {
    max-width: 25%;
}

#cs-chatfilters table .form-group > input {
    max-width: 100%;
}

#userlisttoggle {
    padding-bottom: 2px;
}

.queue_entry {
    line-height: 22px;
    padding: 2px;
    font-size: 8pt;
    border: 1px solid;
    border-top-width: 0;
}

.emotelist-table {
    margin: auto;
}

.emote-preview-container {
    width: 100px;
    height: 100px;
    float: left;
    text-align: center;
    white-space: nowrap;
    margin: 5px;
}

.emote-preview-hax {
    display: inline-block;
    vertical-align: middle;
    height: 100%;
}

.emote-preview {
    max-width: 100px;
    max-height: 100px;
    cursor: pointer;
}

.emotelist-paginator-container {
    text-align: center;
}

#leftcontrols .btn {
    margin-right: 5px;
}

#videowrap .embed-responsive {
    background: hsl(0,0%,0%);
}

#videowrap .embed-responsive:-webkit-full-screen { width: 100%; }
#videowrap .embed-responsive:-moz-full-screen { width: 100%; }
#videowrap .embed-responsive:-ms-full-screen { width: 100%; }
#videowrap .embed-responsive:-o-full-screen { width: 100%; }
#videowrap .embed-responsive:full-screen { width: 100%; }

.embed-responsive.embed-responsive-16by9 {
    padding-bottom: calc(100vh - 80px) !important;
}

.embed-responsive {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
}

li.vjs-menu-item.vjs-selected {
    background-color: #66a8cc !important;
}

.video-js video::-webkit-media-text-track-container {
    bottom: 50px;
}

input#logout[type="submit"] {
    background: none;
    border: none;
    padding: 0;
}

input#logout[type="submit"]:hover {
    text-decoration: underline;
}

#newmessages-indicator {
    position: relative;
    margin-top: -30px;
    line-height: 30px;
    height: 30px;
    text-align: center;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
}

#newmessages-indicator .glyphicon {
    margin-left: 10px;
    margin-right: 10px;
}

#soundcloud-volume-holder {
    position: absolute;
    top: 170px;
    width: 100%;
}

#soundcloud-volume-label {
    margin-left: 2px;
}

#soundcloud-volume {
    margin-top: 5px;
    margin-left: 10px;
    margin-right: 10px;
}

#resize-video-larger, #resize-video-smaller {
    float: left;
}

body.hd #resize-video-larger, body.hd #resize-video-smaller {
    display: none;
}

.userlist-ignored {
    text-decoration: line-through;
}

/* MOVING LEFT CONTROL BUTTONS INTO CHAT INPUT */
#chatcontrols {
    position: relative;
    text-align: right;
    margin-top: -30px;
    margin-left: auto;
    margin-right: 5px;
    top: 34px;
}

.btn-chat{
    background: none !important;
    border: none !important;
    padding: 5px 5px !important;
}

#chatline {
    padding-right: 3.5em;
}

.username {
    cursor: pointer;
}

/* SPACING FOR EMBED ALERT */
#ytapiplayer > .alert-warning {
    margin: 30px;
}

/* STYLING FOR EMOTE POPUP WINDOW */

#emotewindow {
    width: 85%;
    height: 300px;
    border: 1px solid #505050;
    border-radius: 5px;
    margin-top: -340px;
    margin-left: calc(23% - 30px);
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    padding: 10px;
  }
  
  #emotetype {
    padding-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
  }
  
  #emoteitem {
    display: inline;
  }
  
  #emoteimg {
    max-height: 40px;
    padding: 5px;
  }
  
  #emoteimg {
    max-height: 40px;
    padding: 5px;
    border-radius: 5px;
  }
  
  #emoteimg:hover {
    background: #767676;
  }

  /* M60.LIVE MOBILE LAYOUT */
  @media only screen and (max-width: 990px) {

    * {
        margin: 0px;
        padding: 0px;
        box-sizing: border-box;
    }
    
    html, body {
        height: 100%;
    }
    
    #wrap {padding: 0; height: 100%; }
    #controlsrow {display: none;}
    #playlistrow {display: none;}
    #footer {display: none;}
    #resize-video-larger { display: none; }
    #resize-video-smaller { display: none; }
    #currenttitle { display: none; }

    .navbar {
        position: fixed!important;
        margin: 0;
        height: 50px;
        padding-left: 0;
        padding-right: 0;
        border-left: 0;
        border-right: 0;
    }
    
    #resizewrap {
        display:none;
    }
    
    #mainpage {
        height: 100%;
        padding-top: 50px;
    }
    
    #main {
        display: flex;
        flex-direction: column;
        height: calc(100dvh - 50px);
    }
    
    #videowrap {
        flex: 0 0 auto;
        height: 56vw;
    }
    
    #chatwrap {
        flex: 1 1 auto;
    }

    #chatwrap, #videowrap { 
        margin-bottom: 0px !important; 
    }
    
    .embed-responsive.embed-responsive-16by9 {
        padding-bottom: 0 !important;
    }
    
    #nav-collapsible { 
        background: inherit;
        max-height: unset; 
    }

    /* Mobile: two-column nav (default links left, profile menu right) */
    #nav-collapsible {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    #nav-collapsible > ul.navbar-nav { /* default links */
        flex: 1 1 20%;
    }
    #nav-collapsible > ul.navbar-nav.pull-right { /* pfp menu */
        flex: 1 1 20%;
        float: none !important;
        text-align: right;
    }
    /* Ensure any login/logout block comes after and spans full width */
    #nav-collapsible > form, #nav-collapsible > p, #nav-collapsible > .navbar-text {
        flex: 1 1 100%;
        width: 100%;
    }

    /* Mobile: expand profile dropdown inline (hide avatar trigger) */
    #nav-collapsible .navbar-nav.pull-right > li.dropdown > a.dropdown-toggle {
        display: none !important;
    }
    #nav-collapsible .navbar-nav.pull-right > li.dropdown > ul.dropdown-menu {
        position: static;
        float: none;
        display: block;
        width: 100%;
        background: transparent;
        box-shadow: none;
        border: 0;
        margin: 0;
        padding: 0;
    }
    #nav-collapsible .navbar-nav.pull-right > li.dropdown > ul.dropdown-menu > li > a {
        padding: 5px 10px;
        white-space: normal;
    }
    #nav-collapsible .navbar-nav.pull-right > li.dropdown > ul.dropdown-menu > li.divider {
        height: 1px;
        margin: 4px 0;
        overflow: hidden;
        background-color: rgba(255,255,255,0.15);
    }
    
    /* POLLS */
    #pollwrap {
    width: 100%;
    }

    /* ADJUST EMBED WARNING FOR MOBILE */
    #ytapiplayer > .alert-warning { 
        margin: 0;
        font-size: 70%;
        z-index: 100;
        position: fixed;
        width: 100%;
    }

    #ytapiplayer > .alert-warning > hr { margin: 0; }

    /* Mobile navbar gap removal */
    .navbar,
    .navbar-inverse,
    .navbar-collapse {
        border: 0 !important;
        box-shadow: none !important;
    }
    #nav-collapsible.navbar-collapse {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    #nav-collapsible.navbar-collapse:before,
    #nav-collapsible.navbar-collapse:after {
        display: none !important;
    }
    /* Tighten first link to remove residual top spacing */
    #nav-collapsible > ul.navbar-nav > li:first-child > a,
    #nav-collapsible > ul.navbar-nav.pull-right > li:first-child > a {
        padding-top: 5px !important;
    }
    
    }