/*
 * Streaming tabletop adapter for GuideProductSearch.
 * No UI package or build step: the existing live catalogue markup becomes a
 * top-down work table. A tiny vanilla-JS controller only changes selection state.
 * If JS is unavailable, each product image remains a normal product link.
 */
.stream-lab > .guide-live-products {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.stream-lab .guide-live-products__head {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, .75fr);
    gap: 32px;
    max-width: none;
    margin: 0;
    padding: clamp(24px, 4vw, 48px);
    border-bottom: 1px solid rgba(255,255,255,.13);
    background: #101112;
}

.stream-lab .guide-live-products__head .guide-label {
    color: #b8b8b8;
}

.stream-lab .guide-live-products__head h3 {
    margin: 8px 0 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.04;
}

.stream-lab .guide-live-products__head p {
    margin: 0;
    align-self: end;
    color: #c9c9c9;
    line-height: 1.65;
}

/* Literal top-down table: catalogue devices sit on the surface as the UI. */
.stream-lab .guide-live-product-grid {
    position: relative;
    display: block;
    min-height: 780px;
    margin: 0;
    isolation: isolate;
    overflow: hidden;
    border-top: 12px solid #17120e;
    border-bottom: 12px solid #17120e;
    background:
        radial-gradient(circle at 51% 42%, rgba(255,255,255,.08), transparent 26%),
        repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 1px, transparent 1px 72px),
        linear-gradient(100deg, #533a28 0%, #3a291f 42%, #60432d 72%, #34251d 100%);
    box-shadow: inset 0 24px 46px rgba(0,0,0,.22), inset 0 -18px 42px rgba(0,0,0,.28);
}

/* Desk mat / operator zone. */
.stream-lab .guide-live-product-grid::before {
    content: "STREAMING TABLE · CLICK A DEVICE";
    position: absolute;
    z-index: -1;
    left: 20%;
    right: 20%;
    top: 20%;
    bottom: 20%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.035), transparent 45%),
        #161819;
    color: rgba(255,255,255,.14);
    font-size: clamp(.72rem, 1.5vw, 1rem);
    font-weight: 900;
    letter-spacing: .18em;
    text-align: center;
    box-shadow: 0 18px 48px rgba(0,0,0,.28);
}

/* A monitor-like rectangle makes the table read immediately as a streaming workspace. */
.stream-lab .guide-live-product-grid::after {
    content: "PROGRAM";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 5.5%;
    width: min(34%, 340px);
    height: 18%;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    border: 8px solid #090a0b;
    border-radius: 10px;
    background: linear-gradient(135deg, #e4ff43, #859523);
    color: #111;
    font-size: clamp(.8rem, 1.7vw, 1.25rem);
    font-weight: 900;
    letter-spacing: .16em;
    box-shadow: 0 15px 32px rgba(0,0,0,.36);
}

.stream-lab .guide-live-product-card,
.stream-lab .guide-live-product-card.is-featured {
    position: absolute;
    z-index: 3;
    width: 150px;
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transition: transform .18s ease, z-index 0s linear .18s;
}

.stream-lab .guide-live-product-card.is-selected {
    z-index: 30;
    transition-delay: 0s;
}

/* Curated query order gives the table a repeatable physical arrangement. */
.stream-lab .guide-live-product-card:nth-child(1) { left: 42%; top: 27%; width: 172px; }
.stream-lab .guide-live-product-card:nth-child(2) { left: 18%; top: 21%; width: 136px; }
.stream-lab .guide-live-product-card:nth-child(3) { right: 17%; top: 25%; width: 128px; }
.stream-lab .guide-live-product-card:nth-child(4) { left: 40%; top: 57%; width: 205px; }
.stream-lab .guide-live-product-card:nth-child(5) { left: 8%; top: 47%; width: 148px; }
.stream-lab .guide-live-product-card:nth-child(6) { right: 7%; top: 47%; width: 160px; }
.stream-lab .guide-live-product-card:nth-child(7) { right: 16%; top: 70%; width: 132px; }
.stream-lab .guide-live-product-card:nth-child(8) { left: 16%; top: 70%; width: 126px; }

.stream-lab .guide-live-product-media {
    position: relative;
    display: block;
    overflow: visible;
    border-radius: 14px;
    background: rgba(250,248,244,.97);
    box-shadow: 0 14px 30px rgba(0,0,0,.28);
    text-decoration: none;
    cursor: pointer;
}

/* The number is the hotspot; the product itself remains the target. */
.stream-lab .guide-live-product-media::after {
    content: attr(data-stream-device);
    position: absolute;
    right: -10px;
    top: -10px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 3px solid #101112;
    border-radius: 999px;
    background: var(--stream-lime, #e4ff43);
    color: #101112;
    font-size: .72rem;
    font-weight: 900;
    box-shadow: 0 0 0 5px rgba(228,255,67,.14);
}

.stream-lab .guide-live-product-media img,
.stream-lab .guide-live-product-card.is-featured .guide-live-product-media img {
    width: 100%;
    height: 126px;
    padding: 10px;
    border-radius: 14px;
    background: transparent;
    object-fit: contain;
    transition: transform .18s ease, filter .18s ease;
}

.stream-lab .guide-live-product-card:hover .guide-live-product-media img,
.stream-lab .guide-live-product-media:focus-visible img,
.stream-lab .guide-live-product-card.is-selected .guide-live-product-media img {
    transform: translateY(-4px) scale(1.035);
}

.stream-lab .guide-live-product-media:focus-visible {
    outline: 3px solid var(--stream-lime, #e4ff43);
    outline-offset: 7px;
}

.stream-lab .guide-live-product-card.is-selected .guide-live-product-media {
    box-shadow: 0 0 0 4px var(--stream-lime, #e4ff43), 0 18px 38px rgba(0,0,0,.42);
}

.stream-lab .guide-live-product-badge {
    display: none;
}

/* Click-to-discover information card. Hidden until vanilla JS marks the device selected. */
.stream-lab .guide-live-product-body {
    position: absolute;
    left: 50%;
    top: calc(100% + 14px);
    z-index: 40;
    width: 320px;
    max-width: min(320px, 78vw);
    padding: 17px 18px 18px;
    transform: translate(-50%, 8px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 9px;
    background: rgba(12,13,14,.985);
    box-shadow: 0 20px 48px rgba(0,0,0,.5);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}

.stream-lab .guide-live-product-card:nth-child(n+4) .guide-live-product-body {
    top: auto;
    bottom: calc(100% + 14px);
}

.stream-lab .guide-live-product-card:nth-child(5) .guide-live-product-body,
.stream-lab .guide-live-product-card:nth-child(8) .guide-live-product-body {
    left: 0;
    transform: translate(0, 8px);
}

.stream-lab .guide-live-product-card:nth-child(6) .guide-live-product-body,
.stream-lab .guide-live-product-card:nth-child(7) .guide-live-product-body {
    right: 0;
    left: auto;
    transform: translate(0, 8px);
}

.stream-lab .guide-live-product-card.is-selected .guide-live-product-body {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition-delay: 0s;
}

.stream-lab .guide-live-product-card:nth-child(5).is-selected .guide-live-product-body,
.stream-lab .guide-live-product-card:nth-child(8).is-selected .guide-live-product-body,
.stream-lab .guide-live-product-card:nth-child(6).is-selected .guide-live-product-body,
.stream-lab .guide-live-product-card:nth-child(7).is-selected .guide-live-product-body {
    transform: translate(0, 0);
}

.stream-lab .guide-live-product-role {
    margin-bottom: 7px;
    color: var(--stream-lime, #e4ff43);
    font-size: .71rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.stream-lab .guide-live-product-brand {
    color: #93999d;
}

.stream-lab .guide-live-product-body h4 {
    min-height: 0;
    margin: 4px 0 12px;
    font-size: 1.02rem;
}

.stream-lab .guide-live-product-body h4 a {
    color: #fff;
}

.stream-lab .guide-live-product-editorial {
    display: grid;
    gap: 10px;
    margin: 0 0 12px;
}

.stream-lab .guide-live-product-editorial > div {
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.stream-lab .guide-live-product-editorial span {
    display: block;
    margin-bottom: 3px;
    color: #94999d;
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.stream-lab .guide-live-product-editorial p {
    margin: 0;
    color: #d2d2d2;
    font-size: .79rem;
    line-height: 1.48;
}

.stream-lab .guide-live-product-facts {
    min-height: 0;
    color: #bfc3c5;
}

.stream-lab .guide-live-product-price {
    margin-top: 10px;
    color: #fff;
}

.stream-lab .guide-live-product-link {
    display: inline-flex;
    margin-top: 10px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--stream-lime, #e4ff43);
    color: var(--stream-lime, #e4ff43);
    font-weight: 850;
}

.stream-lab .guide-live-product-footnote {
    margin: 0;
    padding: 17px clamp(20px, 4vw, 48px) 19px;
    border-top: 1px solid rgba(255,255,255,.12);
    background: #101112;
    color: #9ca1a5;
}

.stream-lab .guide-live-product-footnote::before {
    content: "Click a device to inspect it. Click the product link only when you want to leave the table. ";
    color: #fff;
    font-weight: 750;
}

.stream-lab .guide-live-product-empty {
    margin: 0;
    padding: 42px clamp(20px, 4vw, 48px);
    border: 0;
    background: #151719;
    color: #ddd;
}

.stream-lab .guide-live-product-empty a {
    color: #fff;
}

@media (max-width: 980px) {
    .stream-lab .guide-live-product-grid {
        min-height: 690px;
    }

    .stream-lab .guide-live-product-card:nth-child(1) { left: 41%; }
    .stream-lab .guide-live-product-card:nth-child(2) { left: 11%; }
    .stream-lab .guide-live-product-card:nth-child(3) { right: 11%; }
    .stream-lab .guide-live-product-card:nth-child(5) { left: 4%; }
    .stream-lab .guide-live-product-card:nth-child(6) { right: 4%; }
}

@media (max-width: 760px) {
    .stream-lab .guide-live-products__head {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* On smaller screens the same devices become a clear tap-to-open inventory table. */
    .stream-lab .guide-live-product-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
        min-height: 0;
        padding: 16px;
        border-width: 0;
        background: #27201b;
        overflow: visible;
    }

    .stream-lab .guide-live-product-grid::before,
    .stream-lab .guide-live-product-grid::after {
        display: none;
    }

    .stream-lab .guide-live-product-card,
    .stream-lab .guide-live-product-card.is-featured,
    .stream-lab .guide-live-product-card:nth-child(1),
    .stream-lab .guide-live-product-card:nth-child(2),
    .stream-lab .guide-live-product-card:nth-child(3),
    .stream-lab .guide-live-product-card:nth-child(4),
    .stream-lab .guide-live-product-card:nth-child(5),
    .stream-lab .guide-live-product-card:nth-child(6),
    .stream-lab .guide-live-product-card:nth-child(7),
    .stream-lab .guide-live-product-card:nth-child(8) {
        position: relative;
        inset: auto;
        width: auto;
        padding: 10px;
        border: 1px solid rgba(255,255,255,.08);
        border-radius: 10px;
        background: #17191a;
    }

    .stream-lab .guide-live-product-media {
        box-shadow: none;
    }

    .stream-lab .guide-live-product-media img,
    .stream-lab .guide-live-product-card.is-featured .guide-live-product-media img {
        height: 148px;
    }

    .stream-lab .guide-live-product-body,
    .stream-lab .guide-live-product-card:nth-child(n+4) .guide-live-product-body,
    .stream-lab .guide-live-product-card:nth-child(5) .guide-live-product-body,
    .stream-lab .guide-live-product-card:nth-child(6) .guide-live-product-body,
    .stream-lab .guide-live-product-card:nth-child(7) .guide-live-product-body,
    .stream-lab .guide-live-product-card:nth-child(8) .guide-live-product-body {
        position: static;
        width: auto;
        max-width: none;
        margin-top: 10px;
        padding: 0;
        transform: none;
        border: 0;
        background: transparent;
        box-shadow: none;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .stream-lab .guide-live-product-card.is-selected .guide-live-product-body,
    .stream-lab .guide-live-product-card:nth-child(5).is-selected .guide-live-product-body,
    .stream-lab .guide-live-product-card:nth-child(6).is-selected .guide-live-product-body,
    .stream-lab .guide-live-product-card:nth-child(7).is-selected .guide-live-product-body,
    .stream-lab .guide-live-product-card:nth-child(8).is-selected .guide-live-product-body {
        display: block;
        transform: none;
    }
}

@media (max-width: 500px) {
    .stream-lab .guide-live-product-grid {
        grid-template-columns: 1fr;
    }

    .stream-lab .guide-live-product-media img,
    .stream-lab .guide-live-product-card.is-featured .guide-live-product-media img {
        height: 180px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stream-lab .guide-live-product-card,
    .stream-lab .guide-live-product-media img,
    .stream-lab .guide-live-product-body {
        transition: none;
    }
}
