* {
    box-sizing: border-box;
}


/* =====================================================
   HTML / BODY / APP
   ===================================================== */

html,
body,
#app {
    margin: 0;

    width: 100%;
    height: 100%;

    font-family: Segoe UI, sans-serif;

    background: #1b1b1b;
    color: #eee;

    overflow: hidden;
}


#app {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;
}


/* =====================================================
   MAIN / PLAYER
   ===================================================== */

#main {
    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: calc(100% - 200px);

    background: #000;

    overflow: hidden;

    z-index: 1;
}


#main.fullscreen {
    height: 100%;
}


/* =====================================================
   PLAYER
   ===================================================== */

#playerArea {
    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;
}

#video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

#video canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}


/* =====================================================
   SIDEBAR
   ===================================================== */

#sidebar {
    position: absolute;

    left: 0;
    top: 0;

    /*
        При показаних логах
        sidebar закінчується над logger.
    */
    bottom: 200px;

    width: 300px;

    background: #2a2a2a;

    border-right: 1px solid #444;

    overflow-y: auto;

    z-index: 1000;
}


/*
    Коли logger прихований,
    sidebar займає всю висоту.
*/

#sidebar.fullscreen {
    bottom: 0;
}


/* =====================================================
   OPEN / CLOSE BUTTON
   ===================================================== */

#btnOpen {
    position: absolute;

    /*
        Початковий стан:
        sidebar відкритий.

        300px — ширина sidebar
        //8px   — відступ
    */
    left: 300px;

    top: 50%;

    transform: translateY(-50%);

    width: 22px;
    height: 80px;

    background: rgba(0, 0, 0, 0.45);

    color: orange;

    z-index: 3000;
}


/* =====================================================
   SIDEBAR TITLE
   ===================================================== */

.title {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 10px;

    font-size: 18px;
    font-weight: 800;

    border-bottom: 1px solid #444;
}

#btnClose {
    width: 28px;
    height: 28px;
}


/* =====================================================
   PANELS
   ===================================================== */

.panelBlock {
    border-top: 1px solid #444;    
    border-bottom: none;
}


.panelTitleBottom {
    width: 100%;
    padding: 5px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

        border-top: none;
    border-bottom: 3px solid #a3a1a1;
}

.bannerContainer {
    position: relative;
    width: 100%;
}

.bannerContainer img {
    display: block;

    width: 100%;
    height: auto;
}

.bannerBeta {
    position: absolute;

    right: 5px;
    bottom: 2px;

    color: red;
    font-size: 14px;
    font-weight: 700;

    z-index: 1;
}


.blockTitle {
    display: flex;
    align-items: center;
    gap: 8px;

    min-height: 42px;
    padding: 10px 12px;

    font-size: 16px;
    font-weight: 800;

    color: #fff;

    cursor: pointer;
    user-select: none;
}

.blockTitle:hover {
    background: rgba(255, 255, 255, 0.04);
}

.blockTitle:focus-visible {
    outline: 1px solid #888;
    outline-offset: -2px;
}

.blockArrow {
    width: 14px;
    flex: 0 0 14px;
    font-size: 12px;
    transition: transform 120ms ease;
    color: orange;
}

.settingsSection.isOpen .blockArrow {
    transform: rotate(0deg);
}

.blockContent {
    padding: 0 12px 12px 12px;
}

.blockContent[hidden] {
    display: none;
}


/* =====================================================
   FORM
   ===================================================== */

.formGroup {
    display: flex;

    flex-direction: column;

    margin-bottom: 12px;
}


.formGroup label {
    margin-bottom: 5px;

    font-size: 14px;
    font-weight: 700;
}


.formGroup input,
.formGroup select {
    width: 100%;

    padding: 7px 8px;

    background: #151515;
    color: #eee;

    border: 1px solid #555;

    border-radius: 3px;
}

.buttonRow {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    width: 100%;
}


button {
    cursor: pointer;
}



.deviceMode {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin-top: 20px;
}

.deviceMode .checkboxOption {
    display: inline-flex;
    align-items: center;
    width: auto !important;
    margin: 0 !important;
    gap: 6px;
}

.deviceMode .checkboxOption input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
}

.deviceMode .checkboxOption span {
    display: flex;
    align-items: center;
    line-height: 1;
    font-weight: 700;
}


/* =====================================================
   LOGGER
   ===================================================== */

#logger {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    height: 200px;

    background: #111;

    border-top: 1px solid #444;

    display: flex;

    flex-direction: column;

    z-index: 2000;
}


/* =====================================================
   LOGGER HEADER
   ===================================================== */

#loggerHeader {
    flex: 0 0 auto;

    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 6px 10px;

    font-weight: 700;
}


#btnClear {
    width: 90px;
}


/* =====================================================
   LOGGER BODY
   ===================================================== */

#loggerBody {
    flex: 1;

    min-height: 0;

    padding: 4px 10px;

    overflow: auto;

    font: 12px Consolas;

    background: #0d0d0d;
}


/* =====================================================
   HIDE LOGGER
   ===================================================== */

#logger.hidden {
    display: none;
}


/* =====================================================
CONNECTION STATUS
===================================================== */

#connectionStatus {
    position: fixed;

    top: 8px;
    left: 50%;

    transform: translateX(-50%);

    height: 24px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 4px;

    z-index: 99999;

    pointer-events: none;
}


/* =====================================================
CONNECTION STATUS TEXT
===================================================== */

#serverConnectionText,
#deviceConnectionText {
    height: 24px;

    padding: 0 8px;

    display: flex;

    align-items: center;
    justify-content: center;

    background-color: rgba(180, 0, 0, 0.9);

    color: #fff;

    font-size: 12px;
    font-weight: 700;

    border-radius: 3px;

    white-space: nowrap;

    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}


/* =====================================================
CONNECTION STATUS
===================================================== */

#connectionStatus {
    position: fixed;

    top: 8px;
    left: 50%;

    width: 100%;
    height: 24px;

    transform: translateX(-50%);

    z-index: 99999;

    pointer-events: none;
}


/* =====================================================
SERVER CONNECTION INDICATOR
===================================================== */

#connectionStatusIndicator {
    position: absolute;

    left: calc(50% - 26px);
    top: 0;

    width: 24px;
    height: 24px;

    display: flex;

    align-items: center;
    justify-content: center;

    background-color: rgba(0, 0, 0, 0.5);

    border-radius: 4px;

    box-shadow: 0 1px 4px rgba(255, 255, 255, 0.5);
}


/* =====================================================
DEVICE CONNECTION INDICATOR
===================================================== */

#connectionStatusDevice {
    position: absolute;

    left: calc(50% + 2px);
    top: 0;

    width: 24px;
    height: 24px;

    display: flex;

    align-items: center;
    justify-content: center;

    background-color: rgba(0, 0, 0, 0.5);

    border-radius: 4px;

    box-shadow: 0 1px 4px rgba(255, 255, 255, 0.5);
}


/* =====================================================
INDICATOR DOTS
===================================================== */

#connectionStatusIndicator::after,
#connectionStatusDevice::after {
    content: "";

    width: 12px;
    height: 12px;

    border-radius: 2px;

    background-color: var(--indicator-color, #808080);
}


/* =====================================================
SERVER CONNECTION TEXT
===================================================== */

#serverConnectionText {
    position: absolute;

    right: calc(50% + 30px);
    top: 0;

    height: 24px;

    padding: 0 8px;

    display: flex;

    align-items: center;
    justify-content: center;

    background-color: rgba(180, 0, 0, 0.9);

    color: #fff;

    font-size: 12px;
    font-weight: 700;

    border-radius: 3px;

    white-space: nowrap;
}


/* =====================================================
DEVICE CONNECTION TEXT
===================================================== */

#deviceConnectionText {
    position: absolute;

    left: calc(50% + 30px);
    top: 0;

    height: 24px;

    padding: 0 8px;

    display: flex;

    align-items: center;
    justify-content: center;

    background-color: rgba(180, 0, 0, 0.9);

    color: #fff;

    font-size: 12px;
    font-weight: 700;

    border-radius: 3px;

    white-space: nowrap;
}

/* =====================================================
   LOGGER OPEN / CLOSE BUTTON
   ===================================================== */

#btnLogger {
    position: absolute;

    left: 50%;
    bottom: 200px;

    transform: translateX(-50%);

    width: 80px;
    height: 22px;

    background: rgba(0, 0, 0, 0.45);

    color: #ff9800;

    z-index: 4000;
}

#btnLogger.fullscreen {
    bottom: 0;
}


/* =====================================================
  
   ===================================================== */

.passwordInput {
    position: relative;
}

.passwordInput input {
    width: 100%;
    padding-right: 45px;
    box-sizing: border-box;
}

.passwordInput button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);

    color: white;
    border: none;
    background: transparent;
    cursor: pointer;

    padding: 2px 5px;
    font-size: 20px;
    line-height: 1;
}

#fileCopySection {
    border-top: 1px solid #444;
}

.fileCopyBottomBarrier {
    height: 12px;
    border-top: 1px solid #444;
    border-bottom: none;
    pointer-events: none;
}

/* =====================================================
   CLIPBOARD READ / WRITE TEXT
   ===================================================== */
#clipboardRiadWrite {
    position: absolute;

    left: calc(50% + 150px);
    top: 0;

    height: 24px;

    padding: 0 8px;

    display: none;

    align-items: center;
    justify-content: center;

    background-color: rgba(180, 0, 0, 0.9);

    color: #fff;

    font-size: 12px;
    font-weight: 700;

    border-radius: 3px;

    white-space: nowrap;

    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}