/* MARKETPLACE BROWSER STREAMING 0.1.0 */

.live-stream-broadcaster,
.live-stream-viewer-stage {
    display: grid;
    gap: 1rem;
}

.live-stream-video-shell {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 18px;
    background:
        radial-gradient(
            circle at top,
            rgba(59, 130, 246, 0.18),
            transparent 48%
        ),
        #05070b;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.3);
    aspect-ratio: 16 / 9;
}

.live-stream-video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: contain;
    background: #05070b;
}

.live-stream-video-status {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: fit-content;
    max-width: calc(100% - 2rem);
    margin: 0;
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    background: rgba(5, 7, 11, 0.82);
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.35;
    backdrop-filter: blur(10px);
}

.live-stream-video-status[data-stream-state="live"],
.live-stream-video-status[data-stream-state="playing"],
.live-stream-video-status[data-stream-state="connected"] {
    background: rgba(6, 95, 70, 0.9);
}

.live-stream-video-status[data-stream-state="error"],
.live-stream-video-status[data-stream-state="disconnected"] {
    background: rgba(153, 27, 27, 0.92);
}

.live-stream-video-status[data-stream-state="connecting"],
.live-stream-video-status[data-stream-state="reconnecting"],
.live-stream-video-status[data-stream-state="requesting-media"],
.live-stream-video-status[data-stream-state="authorizing"] {
    background: rgba(30, 64, 175, 0.9);
}

.live-stream-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.live-stream-controls button {
    min-height: 44px;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
}

.live-stream-controls button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.live-stream-primary {
    border-color: transparent !important;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
}

.live-stream-danger {
    border-color: transparent !important;
    background: #b91c1c;
    color: #ffffff;
    font-weight: 700;
}

.live-stream-secondary {
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
}

.live-stream-help {
    margin: 0;
    opacity: 0.78;
    line-height: 1.55;
}

.live-stream-viewer-stage {
    grid-column: 1 / -1;
}

.live-stream-viewer-stage
.live-stream-video-shell {
    max-height: min(74vh, 820px);
}

@media (max-width: 720px) {
    .live-stream-video-shell {
        border-radius: 14px;
        aspect-ratio: 9 / 16;
        max-height: 72vh;
    }

    .live-stream-video {
        min-height: 420px;
    }

    .live-stream-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .live-stream-controls button {
        width: 100%;
    }

    .live-stream-controls
    .live-stream-primary,
    .live-stream-controls
    .live-stream-danger {
        grid-column: span 2;
    }
}
