/* watch-load.css — cover until the player has a picture.
 * Each sprite is a 4-frame sheet (256×64). Four cropped copies are stacked
 * and faded in turn. Desktop Chromium keeps a transformed SVG <img> on the
 * first frame, so the sheet is not moved with translate. */

.load-screen {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 4px;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 1rem;
    text-align: center;
    pointer-events: none;
    user-select: none;
    background:
        radial-gradient(ellipse 58% 48% at 50% 40%, rgba(255, 255, 255, 0.08), transparent 68%),
        #000;
}

body.watch-show-load .load-screen {
    display: flex;
}

.load-stage {
    position: relative;
    width: 112px;
    height: 112px;
    flex: 0 0 auto;
}

.load-frame {
    position: absolute;
    left: 0;
    top: 0;
    width: 112px;
    height: 112px;
    overflow: hidden;
    opacity: 0;
    animation: load-frame 0.96s linear infinite;
}

.load-frame:nth-child(1) { opacity: 1; }
.load-frame:nth-child(2) { animation-delay: 0.24s; }
.load-frame:nth-child(3) { animation-delay: 0.48s; }
.load-frame:nth-child(4) { animation-delay: 0.72s; }

.load-frame img {
    display: block;
    width: 448px;
    height: 112px;
    max-width: none;
}

.load-frame:nth-child(2) img { margin-left: -112px; }
.load-frame:nth-child(3) img { margin-left: -224px; }
.load-frame:nth-child(4) img { margin-left: -336px; }

@keyframes load-frame {
    0%, 24% { opacity: 1; }
    25%, 100% { opacity: 0; }
}

.load-copy {
    position: relative;
    width: min(22rem, 100%);
    min-height: 1.45em;
    margin-top: 0.35rem;
}

.load-lines,
.load-fixed {
    margin: 0;
    color: #d5d5d5;
    font-size: 0.92rem;
    line-height: 1.45;
}

.load-ellipsis {
    display: inline-block;
    width: 0;
    overflow: hidden;
    vertical-align: bottom;
    white-space: nowrap;
    text-align: left;
    animation: load-ellipsis 1.2s linear infinite;
}

@keyframes load-ellipsis {
    0%, 24.9% { width: 0; }
    25%, 49.9% { width: 0.5em; }
    50%, 74.9% { width: 1em; }
    75%, 100% { width: 1.5em; }
}

.load-fixed {
    display: none;
}

.load-screen--fixed .load-lines {
    display: none;
}

.load-screen--fixed .load-fixed {
    display: block;
}

.load-tap {
    display: none;
    pointer-events: auto;
    margin-top: 0.85rem;
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
}

body.watch-show-load.watch-load-needs-tap .load-tap {
    display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
    .load-ellipsis {
        animation: none;
        width: 1.5em;
    }
}

.load-lines--custom .load-ellipsis { display: none; }

.load-custom-anim,
.load-custom-sheet {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 112px;
    height: 112px;
}

.load-custom-anim { object-fit: contain; }

.load-custom-sheet { background-repeat: no-repeat; }

.load-stage--anim .load-frame,
.load-stage--sheet .load-frame { display: none; }

.load-stage--anim .load-custom-anim,
.load-stage--sheet .load-custom-sheet { display: block; }

.load-emotes {
    display: none;
    list-style: none;
    margin: 0.2rem 0 0;
    padding: 0;
    max-width: min(22rem, 100%);
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 0.65rem;
}

.load-screen--emotes .load-emotes { display: flex; }

.load-emotes li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    min-width: 0;
}

.load-emotes img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.load-emotes span {
    max-width: 4.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #bdbdbd;
    font-size: 0.68rem;
    line-height: 1.2;
}

.load-stage--nobuiltin .load-frame { display: none; }

.load-stage--nobuiltin:not(.load-stage--anim):not(.load-stage--sheet) {
    display: none;
}
