/* Horizontal rail + queue list demo templates */

#productsScroll.demo-view-horizontal-rail {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 4px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

#productsScroll.demo-view-horizontal-rail .demo-rail-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    background: #111318;
    color: #e8eaed;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.demo-rail-image-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #1f242c;
}

.demo-rail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.demo-rail-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}

.demo-rail-body {
    padding: 12px 14px 14px;
}

.demo-rail-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    min-height: 2.7em;
    margin-bottom: 6px;
}

.demo-rail-price {
    font-size: 14px;
    color: #bdc1c6;
    margin-bottom: 10px;
}

.demo-rail-open {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: #e50914;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.demo-rail-open:hover {
    filter: brightness(1.08);
}

/* Queue list (Spotify-style order) */
#productsScroll.demo-view-queue-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-width: 720px;
}

.demo-queue-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-bottom: 1px solid #e8eaed;
    background: #fff;
}

.demo-queue-row:hover {
    background: #f8f9fa;
}

.demo-queue-idx {
    width: 24px;
    text-align: right;
    font-size: 13px;
    color: #70757a;
    font-variant-numeric: tabular-nums;
}

.demo-queue-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f3f4;
}

.demo-queue-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-queue-info {
    flex: 1;
    min-width: 0;
}

.demo-queue-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-queue-meta {
    font-size: 12px;
    color: #5f6368;
    margin-top: 2px;
}

.demo-queue-play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #dadce0;
    background: #fff;
    color: #1967d2;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.demo-queue-play:hover {
    background: #e8f0fe;
}

/* Session metrics (catalog) */
.session-metrics-panel {
    margin: 24px auto 0;
    max-width: 1200px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8eaed;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.session-metrics-panel h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #202124;
}

.session-metrics-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    font-size: 13px;
    color: #5f6368;
    margin-bottom: 16px;
}

.session-metrics-meta strong {
    color: #202124;
}

.session-metrics-chart-wrap {
    max-width: 420px;
    margin-top: 12px;
}

.session-metrics-scores {
    margin-top: 16px;
    font-size: 12px;
    color: #45474d;
    max-height: 160px;
    overflow: auto;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    font-family: ui-monospace, monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

body.runtime-offer-demo .session-metrics-chart-wrap {
    opacity: 0.85;
}
