/* Live-demo – pedagogisk side-by-side på /gor-sa-har (Lager B) */

.qb-live-demo {
    margin-block: 3rem 2rem;
    padding-block: 0.5rem 2rem;
}

.qb-live-demo__hero {
    margin-bottom: 2rem;
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(var(--qb-accent-rgb, 244, 126, 74), 0.14) 0%, rgba(var(--qb-accent-rgb, 244, 126, 74), 0.04) 55%, rgba(15, 23, 42, 0.03) 100%);
    border: 1px solid rgba(var(--qb-accent-rgb, 244, 126, 74), 0.22);
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

.qb-live-demo__eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.qb-live-demo__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tblr-primary, #206bc4);
    background: rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.12);
    border: 1px solid rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.2);
}

.qb-live-demo__badge--muted {
    color: var(--tblr-secondary, #64748b);
    background: rgba(100, 116, 139, 0.1);
    border-color: rgba(100, 116, 139, 0.18);
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.qb-live-demo__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.qb-live-demo__lead {
    max-width: 42rem;
    margin-bottom: 1rem;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--tblr-body-color, #1e293b);
}

.qb-live-demo__notes {
    display: grid;
    gap: 0.45rem;
    max-width: 42rem;
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.qb-live-demo__notes li {
    position: relative;
    padding-left: 1.15rem;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--tblr-secondary, #64748b);
}

.qb-live-demo__notes li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--tblr-primary, #206bc4);
    opacity: 0.75;
}

.qb-live-demo__mode-picker {
    margin-bottom: 1.25rem;
}

.qb-live-demo__mode-label {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tblr-secondary, #64748b);
}

.qb-live-demo__stage-label {
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--tblr-secondary, #64748b);
}

.qb-live-demo__stage {
    position: relative;
}

.qb-live-demo__step-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24rem;
    gap: 1.25rem;
    align-items: start;
}

.qb-live-demo__host-viewport {
    min-width: 0;
    overflow-x: auto;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    background: var(--tblr-body-bg, #fff);
}

.qb-live-demo__host-inner {
    min-width: 62rem;
    padding: 1rem;
}

.qb-live-demo__phone-viewport {
    width: 24rem;
    max-width: 100%;
    justify-self: end;
}

.qb-home-how__phone--demo {
    width: 24rem;
    max-width: 100%;
    aspect-ratio: auto;
    min-height: 36rem;
    padding: 0.65rem;
}

.qb-home-how__phone--demo::before {
    width: 4.5rem;
    height: 0.65rem;
}

.qb-live-demo__phone-screen {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 1.15rem;
    overflow: hidden;
    background: var(--tblr-body-bg, #fff);
}

.qb-live-demo__phone-main {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0.75rem;
}

.qb-live-demo__waiting {
    min-height: 18rem;
    align-items: center;
}

.qb-spotify-mock {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #121212;
    color: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.qb-spotify-mock--compact {
    min-height: 80px;
}

.qb-spotify-mock__inner {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem 0.45rem;
}

.qb-spotify-mock__cover-wrap {
    flex-shrink: 0;
}

.qb-spotify-mock__cover {
    display: block;
    width: 3rem;
    height: 3rem;
    border-radius: 4px;
    object-fit: cover;
}

.qb-spotify-mock__cover--placeholder {
    background: linear-gradient(135deg, #1db954 0%, #191414 100%);
}

.qb-spotify-mock__meta {
    min-width: 0;
}

.qb-spotify-mock__track {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qb-spotify-mock__artist {
    margin-top: 0.1rem;
    font-size: 0.75rem;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qb-spotify-mock__brand {
    color: #1db954;
    opacity: 0.9;
}

.qb-spotify-mock__play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #1db954;
    color: #121212;
}

.qb-spotify-mock__bars {
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.12rem;
    width: 0.85rem;
    height: 0.75rem;
}

.qb-spotify-mock__bars span {
    display: block;
    width: 0.14rem;
    height: 100%;
    border-radius: 999px;
    background: currentColor;
    transform-origin: bottom center;
    animation: qb-spotify-mock-bar 0.9s ease-in-out infinite;
}

.qb-spotify-mock__bars span:nth-child(2) {
    animation-delay: 0.15s;
}

.qb-spotify-mock__bars span:nth-child(3) {
    animation-delay: 0.3s;
}

.qb-spotify-mock__progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.18);
}

.qb-spotify-mock__progress-fill {
    display: block;
    height: 100%;
    background: #1db954;
    animation: qb-spotify-mock-progress 8s linear infinite;
}

@keyframes qb-spotify-mock-bar {
    0%,
    100% {
        transform: scaleY(0.35);
    }

    50% {
        transform: scaleY(1);
    }
}

@keyframes qb-spotify-mock-progress {
    0% {
        opacity: 0.85;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.85;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qb-spotify-mock__bars span,
    .qb-spotify-mock__progress-fill {
        animation: none;
    }
}

.qb-live-demo__player-game,
.qb-live-demo__player-result {
    max-width: none;
}

.qb-live-host--demo .qb-live-host__title {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.qb-live-demo__step {
    position: relative;
}

.qb-live-demo__step.d-none {
    display: none;
}

.qb-live-demo__callouts {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.qb-live-demo__bubble {
    position: absolute;
    max-width: min(16.5rem, 46vw);
    padding: 0.65rem 0.8rem;
    border-radius: 0.85rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    transform: translate(-50%, calc(-100% - 10px));
    animation: qb-live-demo-bubble-in 0.35s ease-out;
}

.qb-live-demo__bubble[data-placement='below'] {
    transform: translate(-50%, 10px);
}

.qb-live-demo__bubble--host {
    border-color: rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.28);
}

.qb-live-demo__bubble--host .qb-live-demo__bubble-who {
    color: var(--tblr-primary, #206bc4);
}

.qb-live-demo__bubble--team {
    border-color: rgba(var(--qb-accent-rgb, 244, 126, 74), 0.35);
}

.qb-live-demo__bubble--team .qb-live-demo__bubble-who {
    color: var(--qb-accent, #f47e4a);
}

.qb-live-demo__bubble-who {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qb-live-demo__bubble-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--tblr-body-color, #1e293b);
}

.qb-live-demo__bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    transform: translateX(-50%) rotate(45deg);
}

.qb-live-demo__bubble[data-placement='above']::after {
    bottom: -7px;
    border-top: none;
    border-left: none;
}

.qb-live-demo__bubble[data-placement='below']::after {
    top: -7px;
    border-bottom: none;
    border-right: none;
}

.qb-live-demo__bubble--host[data-placement='above']::after {
    border-color: rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.28);
}

.qb-live-demo__bubble--team[data-placement='above']::after {
    border-color: rgba(var(--qb-accent-rgb, 244, 126, 74), 0.35);
}

@keyframes qb-live-demo-bubble-in {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-100% - 4px));
    }
    to {
        opacity: 1;
        transform: translate(-50%, calc(-100% - 10px));
    }
}

.qb-live-demo__highlight {
    outline: 3px solid rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.55);
    outline-offset: 3px;
    border-radius: 0.35rem;
    animation: qb-live-demo-pulse 1.4s ease-in-out infinite;
}

.qb-live-demo__cursor {
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    margin: -0.625rem 0 0 -0.625rem;
    border-radius: 50%;
    background: rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.85);
    box-shadow: 0 0 0 4px rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.25);
    pointer-events: none;
    z-index: 3;
}

@keyframes qb-live-demo-pulse {
    0%, 100% { outline-color: rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.35); }
    50% { outline-color: rgba(var(--tblr-primary-rgb, 32, 107, 196), 0.85); }
}

@media (max-width: 991.98px) {
    .qb-live-demo__step-grid {
        grid-template-columns: 1fr;
    }

    .qb-live-demo__phone-viewport {
        width: 100%;
        justify-self: stretch;
    }

    .qb-home-how__phone--demo {
        width: 100%;
        max-width: 24rem;
        margin-inline: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qb-live-demo__highlight {
        animation: none;
    }

    .qb-live-demo__bubble {
        animation: none;
    }

    .qb-live-demo__cursor {
        display: none !important;
    }
}
