* {
    box-sizing: border-box;
}

[hidden] {
    display: none;
}

html,
body {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    background: #101215;
    color: #f3f1ea;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

button {
    font: inherit;
}

#stage,
#slideLayer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
}

#slideLayer {
    background: #050607;
}

body.scale-border #slideLayer {
    background: #15191d;
}

.slideImage {
    position: absolute;
    top: -3%;
    left: -3%;
    width: 106%;
    height: 106%;
    object-fit: cover;
    max-width: none;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1200ms ease;
}

body.transition-none .slideImage {
    transition: none;
}

body.transition-fade .motion-a,
body.transition-fade .motion-b,
body.transition-fade .motion-c,
body.transition-fade .motion-d,
body.transition-none .motion-a,
body.transition-none .motion-b,
body.transition-none .motion-c,
body.transition-none .motion-d {
    animation: none;
}

body.scale-fill .slideImage {
    top: -3%;
    left: -3%;
    width: 106%;
    height: 106%;
    object-fit: cover;
    padding: 0;
    border: 0;
}

body.scale-border .slideImage {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #15191d;
    object-fit: contain;
}

body.scale-stretch .slideImage {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    object-fit: fill;
}

.slideImage.is-visible {
    opacity: 1;
}

.motion-a {
    animation: kenBurnsA linear forwards;
}

.motion-b {
    animation: kenBurnsB linear forwards;
}

.motion-c {
    animation: kenBurnsC linear forwards;
}

.motion-d {
    animation: kenBurnsD linear forwards;
}

@keyframes kenBurnsA {
    from {
        transform: scale(1.02) translate(-1.5%, -1.5%);
    }

    to {
        transform: scale(1.13) translate(2%, 1.5%);
    }
}

@keyframes kenBurnsB {
    from {
        transform: scale(1.12) translate(2%, -1%);
    }

    to {
        transform: scale(1.03) translate(-2%, 1.5%);
    }
}

@keyframes kenBurnsC {
    from {
        transform: scale(1.04) translate(0, 2%);
    }

    to {
        transform: scale(1.15) translate(-2%, -1.5%);
    }
}

@keyframes kenBurnsD {
    from {
        transform: scale(1.12) translate(-2%, 0);
    }

    to {
        transform: scale(1.04) translate(2%, -1%);
    }
}

#statusPanel {
    position: absolute;
    left: 4vh;
    bottom: 4vh;
    z-index: 5;
    width: 56vh;
    max-width: 62vw;
    padding: 2.2vh 2.5vh;
    border: 0.18vh solid rgba(255, 255, 255, 0.18);
    border-radius: 0.8vh;
    background: #181d21;
}

body.has-images #statusPanel {
    background: rgba(12, 14, 17, 0.82);
}

#eyebrow {
    margin: 0 0 0.6vh;
    color: #9ad9ff;
    font-size: 1.45vh;
    font-weight: 700;
    letter-spacing: 0.2vh;
    line-height: 1.1;
    text-transform: uppercase;
}

#slideTitle {
    margin: 0;
    overflow: hidden;
    color: #fff;
    font-size: 4.8vh;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#slideMeta {
    margin: 0.85vh 0 0;
    overflow: hidden;
    color: #aebdca;
    font-size: 1.55vh;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#statusLine,
#progressText {
    margin: 1vh 0 0;
    color: #d6e0e7;
    font-size: 1.8vh;
    line-height: 1.25;
}

#progressWrap {
    width: 100%;
    height: 1.05vh;
    margin-top: 1.45vh;
    overflow: hidden;
    border-radius: 1vh;
    background: #28323a;
}

#progressBar {
    width: 0;
    height: 100%;
    background: #f7c948;
    transition: width 240ms ease;
}

body.mode-playing #progressWrap,
body.mode-playing #progressText,
body.mode-idle #progressWrap,
body.mode-idle #progressText {
    display: none;
}

#scanPanelWrap {
    position: absolute;
    top: 3vh;
    right: 3vh;
    z-index: 6;
    width: 108px;
    text-align: center;
}

#scanPanel {
    height: 151px;
}

.offlineQrPanel {
    display: block;
    width: 108px;
    height: 146px;
    box-sizing: border-box;
    margin: 0 auto;
    border: solid 4px #fff;
    border-radius: 4px;
    background: #fff;
    color: #111;
    text-align: center;
}

.offlineQrLabel {
    display: table-cell;
    width: 100px;
    height: 138px;
    padding: 0 6px;
    background: #000;
    color: #fff;
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    vertical-align: middle;
    text-transform: uppercase;
}

#fullscreenButton {
    display: block;
    width: 100%;
    min-height: 2.8vh;
    margin: 1vh 0 0;
    border: 0.16vh solid rgba(255, 255, 255, 0.2);
    border-radius: 0.45vh;
    background: #26313a;
    color: #f3f1ea;
    font-size: 1.45vh;
    font-weight: 700;
}

#statsPanel {
    position: absolute;
    top: 3vh;
    left: 3vh;
    z-index: 6;
    width: 32vh;
    padding: 1.5vh;
    border: 0.16vh solid rgba(255, 255, 255, 0.16);
    border-radius: 0.8vh;
    background: rgba(14, 18, 22, 0.82);
}

.statsTitle {
    margin-bottom: 0.8vh;
    color: #9ad9ff;
    font-size: 1.25vh;
    font-weight: 700;
    letter-spacing: 0.18vh;
    line-height: 1;
    text-transform: uppercase;
}

#statsList {
    margin: 0;
    font-size: 1.45vh;
    line-height: 1.25;
}

#statsList dt {
    float: left;
    clear: left;
    width: 12vh;
    color: #9aa8b3;
}

#statsList dd {
    margin: 0 0 0.55vh 13vh;
    overflow: hidden;
    color: #f3f1ea;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rcRoomQrCodeLink,
.rcRoomQrCodeLink * {
    box-sizing: content-box;
}

.rcRoomQrCodeLink {
    display: block;
    width: 150px;
    margin: 0 auto;
    border: solid 8px #fff;
    border-radius: 4px;
    color: #fff;
    background-color: #fff;
    box-shadow: 0 0 0 1px #fff;
    text-align: center;
    text-decoration: none;
    transform: scale(0.65);
    transform-origin: top left;
}

.rcTechLabel {
    background-color: #000;
    color: #fff;
    font-family: monospace;
    font-size: 13px;
    font-weight: bold;
    margin: 0 0 8px 0;
    padding: 4px;
    letter-spacing: 0.2em;
}

.rcRoomQrCode {
    width: 150px;
    height: 150px;
}

.rcRoomQrCode canvas,
.rcRoomQrCode img {
    display: block;
    width: 150px !important;
    height: 150px !important;
}

.rcRoomId {
    background-color: #000;
    color: #fff;
    font-family: monospace;
    font-size: 16px;
    padding: 4px;
    margin: 8px 0 0 0;
    letter-spacing: 0.25em;
}

body.hide-qr #scanPanelWrap {
    display: none;
}

body.hide-info #statusPanel,
body.hide-info #statsPanel {
    display: none;
}

body.lean-paint #statusPanel,
body.lean-paint #statsPanel,
body.lean-paint #fullscreenButton,
body.lean-paint .rcRoomQrCodeLink {
    background: #181d21;
    box-shadow: none;
    filter: none;
}

body.lean-paint .slideImage {
    transition: opacity 320ms linear;
}

@media (orientation: portrait) {
    #statusPanel {
        left: 2vh;
        right: 2vh;
        bottom: 2vh;
        width: auto;
        max-width: none;
        padding: 1.6vh 1.8vh;
        border-radius: 0.7vh;
    }

    #slideTitle {
        font-size: 3.7vh;
    }

    #statusLine,
    #progressText {
        font-size: 1.55vh;
    }

    #scanPanelWrap {
        top: 1.5vh;
        right: 1.5vh;
        width: 108px;
    }

    #fullscreenButton {
        width: 100%;
        min-height: 24px;
        margin: 0.9vh 0 0;
        font-size: 1.12vh;
    }

    #statsPanel {
        top: 1.5vh;
        left: 1.5vh;
        width: 45vw;
        padding: 1.1vh;
        border-radius: 0.7vh;
    }

    #statsList {
        font-size: 1.12vh;
    }

    #statsList dt {
        width: 9vh;
    }

    #statsList dd {
        margin-left: 9.8vh;
    }
}
