body, html {
    margin: 0;
    padding: 0;
    height: 100%;
}
body {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
    overflow-y: hidden;
}
button {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-style: normal;
    border: 0;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
}
button:hover, button:focus {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
button:disabled {
    background: rgba(239, 239, 239, 0.3) !important;
    color: rgba(16, 16, 16, 0.3) !important;
}

input {
    font-family: "Poppins", sans-serif;
    font-style: normal;
}

a {
    cursor: pointer;
}

p {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    line-height: 21px;
    color: #FFF;
    margin: 0;
}

.hidden {
    display: none;
}

#videos {
    position: relative;
    width: 100%;
    height: 100%;
    margin-left: auto;
    margin-right: auto;
    background: #2D2D34;
}
#subscribers {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}
#subscribers .subscriber {
    width: 100%;
    height: 100%;
}
#subscribers.grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(25%, 50%));
}
#subscribers.autoscroll {
    white-space: nowrap;
    overflow: auto;
    top: 50%;
    transform: translateY(-50%);
    height: auto;
}
#subscribers.autoscroll .subscriber {
    width: 400px;
    height: 256px;
    margin-right: 10px;
    display: inline-block;
}
#publisher {
    position: absolute;
    width: 16%;
    height: 24%;
    bottom: 28px;
    left: 28px;
    z-index: 102;
    border-radius: 6px;
    overflow: hidden;
}

#mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2a2a2a;
    z-index: 101;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(87, 87, 87, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
}
.modal.show {
    opacity: 1;
    visibility: visible;
}
.modal.show .modal-wrapper {
    top: 50%;
}
.modal-wrapper {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    max-width: 545px;
    background: #FFFFFF;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    transition: top 0.6s;
}
.modal-header {
    padding: 16px 16px;
    position: relative;
    /* border-bottom: 1px solid #E2E2E2; */
}
.modal-header h2 {
    font-style: normal;
    font-weight: bold;
    font-size: 15px;
    line-height: 20px;
    color: #2D2D34;
    margin: 0;
}
.modal-header .close {
    width: 16px;
    height: 16px;
    position: absolute;
    top: 24px;
    right: 16px;
    cursor: pointer;
    display: none;
}
.modal-body {
    padding: 24px 16px;
}
.modal-body p {
    font-size: 16px;
    color: #2D2D34;
}
.modal-footer {
    display: flex;
    display: -webkit-flex;
    align-items: center;
    justify-content: flex-end;
    -webkit-justify-content: flex-end;
    padding: 16px;
}
.modal-footer button {
    font-size: 14px;
    line-height: 25px;
    height: 37px;
    min-width: 72px;
    padding: 4px 12px;
}
.modal-footer button:not(:last-of-type) {
    margin-right: 20px;
}
.modal-confirm {
    color: #FFF;
    background: #c93644;
}
.modal-cancel {
    color: #c93644;
    background: transparent;
}

#join {
    /* position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200; */
    display: none;
}
#join .content {
    position: absolute;
    top: calc(50% - 40px);
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 270px;
    z-index: 200;
}
#join .content p {
    margin-bottom: 18px;
}
#btn-join {
    font-size: 14px;
    line-height: 16px;
    color: #2D2D34;
    background: #37F377;
    padding: 7px 16px;
    border-radius: 7px;
    box-shadow: 0 4px 6px rgba(20, 20, 20, 0.6);
}
#btn-join:hover {
    filter: brightness(1.1);
}

#topbar {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 20px);
    padding: 18px 16px;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 201;
}
#topbar > div {
    display: flex;
    align-items: center;
}
#topbar .left p {
    font-weight: bold;
    line-height: 22px;
}
#btn-leave {
    line-height: 1;
    color: #FFF;
    background: #c93644;
    padding: 7px 10px;
    height: auto;
}
#btn-leave img {
    width: 30px !important;
    height: 30px !important;
}
#btnOptions {
    line-height: 1;
    color: #FFF;
    background: #3d3d3d;
    padding: 7px 10px;
    height: auto;
}
#btnOptions img {
    width: 30px !important;
    height: 30px !important;
    padding: 4px !important;
}
#btn-rejoin {
    line-height: 1;
    color: #2D2D34;
    background: #37F377;
    padding: 6px 10px;
    border-radius: 7px;
    box-shadow: 0 4px 6px rgba(20, 20, 20, 0.6);
    margin-right: 28px;
}
#btn-rejoin img {
    width: 24px;
    height: 24px;
}
#topbar .right img {
    width: 24px;
    height: 24px;
    margin-left: 12px;
    margin-right: 12px;
}

#annoucement-message {
    position: absolute;
    top: 70px;
    left: 0;
    width: calc(100% - 20px);
    background-color: rgba(42, 48, 56, 0.75);
    color: #FFF;
    font-size: 13px;
    padding: 10px 16px;
    z-index: 202;
}

#control {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.6);
    padding: 7px 16px;
    border-radius: 6px;
    z-index: 201;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
}
#control > div {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-flow: column;
    padding-left: 24px;
    padding-right: 24px;
    position: relative;
}
#control > div:first-of-type {
    padding-left: 0;
}
#control > div:last-of-type {
    padding-right: 0;
}
#control > div span:not(.badge) {
    font-size: 10px;
    line-height: 11px;
    color: #FFF;
    text-align: center;
    white-space: nowrap;
    margin-top: 4px;
}
#control > div span.badge {
    width: 6px;
    height: 6px;
    background: #c93644;
    border: 1px solid #FFF;
    border-radius: 50%;
    position: absolute;
    top: 1px;
    right: 33px;
}
#control > div img {
    width: 26px;
    height: 26px;
    cursor: pointer;
}
#control > div img:hover {
    filter: drop-shadow(0px 2px 2px rgb(158 158 158 / 65%));
}

#control > div ul {
    width: 252px;
    list-style-type: none;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    position: absolute;
    bottom: 100%;
    left: 100%;
    background: #2d2d33;
    overflow: hidden;
}
#control > div ul li {
    display: inline-block;
    vertical-align: top;
    padding: 12px 24px 12px 24px;
    width: 100%;
}
#control > div ul li:hover {
    background-color: rgba(103, 103, 108, 0.25);
}
#control > div ul li a {
    font-size: 14px;
    color: #FFF;
}
#control > div ul#volumeAdjustment {
    width: auto;
    transform: translateX(-50%);
    top: -114px;
    left: calc(50% + 14px);
    bottom: auto;
    right: auto;
    overflow: visible;
    background: transparent;
}
#control > div ul#volumeAdjustment li {
    padding: 7px 24px 12px 24px;
    transform: rotate(-90deg);
    background: #2d2d33;
    width: auto;
    border-radius: 4px;
}
#control > div ul#volumeAdjustment li img {
    transform: rotate(-180deg);
}

#volumeAdjustment .slider {
    -webkit-appearance: none;
    height: 5px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
}

#screen.pub-active,
#screen.sub-active {
    width: calc(75% - 28px);
    height: calc(100% - 72px);
    display: flex;
    position: absolute;
    top: 72px;
    left: 12px;
    border-radius: 2px;
    overflow: hidden;
}
#screen.sub-active ~ #subscribers,
#screen.pub-active ~ #subscribers {
    position: absolute;
    width: 25%;
    height: 100%;
    align-self: flex-end;
    left: auto;
    right: 0;
    top: 72px !important;
    transform: none;
    display: block !important;
}
#screen.sub-active ~ #subscribers .subscriber,
#screen.pub-active ~ #subscribers .subscriber {
    display: block;
    margin-right: 0;
    width: 100%;
    height: 25vmin;
    min-width: 8em;
    min-height: 8em;
}

#textchat {
    position: fixed;
    top: 0;
    right: -356px;
    width: 356px;
    height: 100%;
    background-color: rgba(247, 247, 247, 0.65);
    box-shadow: inset 0 2rem 2rem -2rem rgb(0 0 0 / 5%), inset 0 -2rem 2rem -2rem rgb(0 0 0 / 5%);
    z-index: 204;
    transition: right 0.2s;
}
#textchat.show {
    right: 0;
}

#headerchat {
    height: 72px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #fff;
}
#headerchat span {
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    color: #272727;
}
#headerchat #closechat {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    z-index: 1;
}
#headerchat #closechat svg {
    width: 14px;
    height: 14px;
}
#headerchat #closechat svg path {
    fill: #272727;
}

#noticechat {
    margin: 10px;
    padding: 10px;
    border-radius: 6px;
    background-color: #FFF;
}
#noticechat p {
    font-size: 13px;
    text-align: center;
    color: #3d3d3d;
}

#history {
    width: 100%;
    height: calc(100% - 212px); 
    overflow: auto;
}
#history .message {
    box-sizing: border-box;
    padding: 0.5rem 1rem;
    margin: 1rem;
    font-size: 14px;
    color: #2D2D34;
    background: #FFF;
    border-radius: 1.125rem 1.125rem 0 1.125rem;
    min-height: 2.25rem;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    max-width: 66%;
    box-shadow: 0 0 2rem rgb(0 0 0 / 8%), 0rem 1rem 1rem -1rem rgb(0 0 0 / 10%);
}
#history .message > span {
    display: block;
}
#history .message > span.date {
    display: block;
    font-size: 10px;
    line-height: 11px;
    margin-top: 10px;
}
#history .message.theirs {
    border-radius: 1.125rem 1.125rem 1.125rem 0;
    background: #2f66c5;
    color: white;
}
#history .message.mine {
    margin: 1rem 1rem 1rem auto;
    background: #ffffff;
}
#formchat {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    padding: 14px 0;
    background-color: rgba(255, 255, 255, 0.6);
}
#formchat input#msgTxt {
    height: 40px;
    width: calc(100% - 70px);
    outline: none;
    box-sizing: border-box;
    border: 1px solid #9a9a9a;
    background-image: none;
    background-color: white;
    border-radius: 6px;
    padding: 0.5rem 3rem 0.5rem 1rem;
    margin-right: 1rem;
    margin-left: 1rem;
    flex-grow: 2;
    box-shadow: 0 0 1rem rgb(0 0 0 / 10%), 0rem 1rem 1rem -1rem rgb(0 0 0 / 20%);
    color:#2D2D34;
    font-weight: 400;
    letter-spacing: 0.025em;
    transition: all 0.3s;
}
#formchat input#msgTxt:focus {
    border: 1px solid #43A3FF;
}
#formchat input#msgTxt:not([value=""]):focus + .send svg path {
    fill: #43A3FF;
}
#formchat .send {
    position: absolute;
    right: 30px;
    margin-top: 10px;
    display: block;
    z-index: 1;
}
#formchat svg {
    width: 20px;
    height: 20px;
}
#formchat svg path {
    fill: #9a9a9a;
}

#toast {
    position: fixed;
    bottom: 104px;
    left: 50%;
    z-index: 10000;
    transform: translateX(-50%);
    font-size: 14px;
    line-height: 18px;
    color: #FFF;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    width: auto;
    border-radius: 30px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

#leave-modal .modal-wrapper {
    width: 356px;
}

#joiner-display {
    font-size: 14px;
    line-height: 22px;
    border-radius: 6px;
    color: #FFF;
    background: rgba(20, 20, 20, 0.6);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}
#user-info {
    padding: 7px 16px;
    text-align: center;
}
#counter {
    padding: 7px 16px;
    background: rgba(20, 20, 20, 0.85);
}

#btn-back {
    display: none;
}
#btn-back img {
    width: 18px;
    height: 18px;
}

#poor-network-message {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.15);
    display: block;
}
#poor-network-message .content {
    width: 356px;
    padding: 24px;
    background-color: #FFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
#poor-network-message h3 {
    margin-top: 8px;
}
#poor-network-message p {
    font-size: 14px;
    color: #000;
}
#poor-network-message .action {
    text-align: right;
    margin-top: 40px;
}
#poor-network-message .action a {
    font-size: 14px;
    font-weight: 600;
    color: #c93644;
}

/* primevue */
.p-tieredmenu {
    font-size: 13px !important;
}

@media only screen and (max-width: 576px) {
    #poor-network-message .content {
        max-width: 80%;
        width: 80% !important;
    }
    .modal-wrapper {
        max-width: 80%;
        width: 80% !important;
    }
    #subscribers.grid.auto-half {
        grid-template-columns: auto;
    }
    #publisher {
        width: 25%;
        height: 20%;
        bottom: 100px;
        left: auto;
        right: 16px;
    }
    #control {
        padding: 12px 0px;
        width: 100%;
        bottom: 0px;
        justify-content: space-around;
    }
    #control > div {
        padding-left: 20px;
        padding-right: 20px;
    }
    #control > div:first-of-type {
        padding-left: 0;
    }
    #control > div:last-of-type {
        padding-right: 0;
    }
    #control > div img {
        width: 24px;
        height: 24px;
    }
    #control > div span.badge {
        width: 5px;
        height: 5px;
        top: 0;
        right: 21px;
    }
    /* #control > div span:not(.badge) {
        display: none;
    } */
    #control > div ul {
        right: 0;
        left: auto;
        bottom: calc(100% + 5px);
    }
    #textchat {
        right: -100%;
        width: 100%;
        max-width: 100%;
    }
    #user-info {
        font-size: 13px;
        white-space: nowrap;
    }
    #btn-rejoin {
        margin-right: 12px;
    }
    #topbar .left p {
        font-size: 15px;
    }
    #toast.show {
        opacity: 1;
        visibility: visible;
    }

    #screen.pub-active, #screen.sub-active {
        width: 100%;
        left: 0;
    }
    #screen.sub-active ~ #subscribers,
    #screen.pub-active ~ #subscribers {
        left: 0;
        height: auto;
        width: 100%;   
    }
    #screen.sub-active ~ #subscribers .subscriber,
    #screen.pub-active ~ #subscribers .subscriber {
        display: inline-block;
        margin-right: 10px;
        width: 16.67%;
        min-width: 200px;
    }
    .mobile-hidden {
        display: none !important;
    }
    #subscribers.autoscroll {
        top: 0;
        height: 100%;
        white-space: normal;
        overflow: hidden;
        transform: none;
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(25%, 50%));
    }
    #subscribers.autoscroll .subscriber {
        width: 100%;
        height: 100%;
        margin-right: 0;
    }

    #btnOptions {
        padding: 5px 7px;
    }
    #btnOptions img {
        width: 25px !important;
        height: 25px !important;
        padding: 3px;
    }

    #btn-leave {
        padding: 5px 7px;
    }
    #btn-leave img {
        width: 25px !important;
        height: 25px !important;
    }
}