/* Live Demo player — track-runner chrome around iframe slides + video embeds. */

body {
    background: var(--ps-offwhite);
    overflow-x: hidden;
}

/* Session strip — persistent customer branding across all steps */
.ld-session-strip {
    background: white;
    border-bottom: 1px solid var(--ps-border);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.ld-session-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--ps-green-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.ld-session-logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}
.ld-session-info { flex-shrink: 0; }
.ld-session-prospect-wrap { flex-shrink: 0; }
.ld-session-eyebrow {
    font-family: 'Barlow', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--ps-text-light);
    margin-bottom: 1px;
}
.ld-session-label,
.ld-session-prospect {
    font-family: 'Barlow', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ps-dark);
    line-height: 1.2;
}
.ld-session-spacer { flex: 1; }

.ld-session-rep-info {
    flex-shrink: 0;
    text-align: right;
    line-height: 1.2;
}
.ld-session-rep-name {
    font-family: 'Barlow', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ps-dark);
}

.ld-session-rep {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ps-green-pale);
    border: 1px solid var(--ps-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ld-session-rep img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ld-session-exit {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ps-text-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ld-session-exit:hover {
    border-color: var(--ps-border);
    color: var(--ps-accent);
}
.ld-session-exit svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Sticky step nav — pill chips, mirrors sales-demo pattern */
.ld-step-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(244, 247, 246, 0.94);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--ps-border);
    padding: 10px 24px;
}

.ld-step-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}
.ld-step-nav-inner::-webkit-scrollbar { display: none; }

.ld-step-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--ps-border);
    color: var(--ps-text-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
}
.ld-step-chip:hover {
    border-color: var(--ps-dark);
    color: var(--ps-dark);
}
.ld-step-chip.is-active {
    background: var(--ps-dark);
    color: white;
    border-color: var(--ps-dark);
}

.ld-step-num {
    width: 18px;
    height: 18px;
    background: var(--ps-green-light);
    color: var(--ps-dark);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}
.ld-step-chip.is-active .ld-step-num {
    background: var(--ps-accent);
    color: white;
}

.ld-step-icon {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.8;
    flex-shrink: 0;
}

/* Stage — the iframe / video / Q&A area */
.ld-stage {
    /* No fixed max-width — frames below cap themselves based on viewport
       height so big monitors can use the extra space. */
    max-width: none;
    margin: 0 auto;
    padding: 16px 24px 24px;
}

/* Reserve 240px for chrome: topbar (~44) + session strip (~52) + step nav
   (~56) + rail (~66) + stage padding (~24). The track-header row was
   removed so we get back ~75px of vertical space for video. */
.ld-stage-frame {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(29, 58, 68, 0.12);
    aspect-ratio: 16 / 9;
    position: relative;
    width: 100%;
    max-width: calc((100vh - 240px) * 16 / 9);
    max-height: calc(100vh - 240px);
    margin-left: auto;
    margin-right: auto;
}
/* Slide stage uses 16:10 because Claude Design exports default to that ratio */
.ld-stage-frame.ld-stage-frame-slide {
    aspect-ratio: 16 / 10;
    background: #0F2127;
    max-width: calc((100vh - 240px) * 16 / 10);
}

.ld-stage-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.ld-stage-frame wistia-player {
    width: 100%;
    height: 100%;
    display: block;
}

/* Welcome step — personalized title card before the bundled opener */
.ld-stage-welcome {
    background: white;
    border-radius: 12px;
    padding: 56px 64px 48px;
    box-shadow: 0 8px 24px rgba(29, 58, 68, 0.12);
    border-top: 4px solid var(--ps-accent);
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    /* Cap text-heavy cards at a readable width even on big monitors */
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.ld-welcome-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
}

.ld-welcome-customer {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.ld-welcome-customer-logo {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    background: var(--ps-green-pale);
    object-fit: contain;
    padding: 10px;
    flex-shrink: 0;
    border: 1px solid var(--ps-border);
}
.ld-welcome-customer-logo-empty { padding: 0; }

.ld-welcome-customer-info { min-width: 0; flex: 1; }

.ld-welcome-eyebrow {
    font-family: 'Barlow', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ps-text-light);
    margin-bottom: 4px;
}

.ld-welcome-customer-name {
    font-family: 'Barlow', sans-serif;
    font-size: 1.5rem;
    color: var(--ps-dark);
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.ld-welcome-prospect {
    font-size: 0.95rem;
    color: var(--ps-text-light);
    margin-top: 4px;
}

.ld-welcome-rep {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    text-align: right;
}

.ld-welcome-rep-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ps-green-light);
    flex-shrink: 0;
}

.ld-welcome-rep-info { text-align: right; }

.ld-welcome-rep-name {
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    color: var(--ps-dark);
    font-weight: 600;
    line-height: 1.2;
}

.ld-welcome-rep-title {
    font-size: 0.85rem;
    color: var(--ps-text-light);
    margin-top: 2px;
}

.ld-welcome-headline {
    font-family: 'Barlow', sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--ps-dark);
    text-align: center;
    letter-spacing: -2px;
    line-height: 1;
    margin: 0;
}

.ld-welcome-begin {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--ps-dark);
    color: white;
    border: 0;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.ld-welcome-begin:hover {
    background: var(--ps-dark-deep);
    transform: translateY(-1px);
}
.ld-welcome-begin svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 720px) {
    .ld-stage-welcome { padding: 40px 28px 32px; min-height: 420px; }
    .ld-welcome-top { flex-direction: column; align-items: stretch; gap: 24px; }
    .ld-welcome-rep { text-align: left; flex-direction: row; }
    .ld-welcome-rep-info { text-align: left; }
    .ld-welcome-customer-name { font-size: 1.25rem; }
    .ld-welcome-headline { font-size: 3rem; letter-spacing: -1px; }
}

/* Q&A step — different visual from slide/video */
.ld-stage-qa {
    background: white;
    border-radius: 12px;
    padding: 56px 64px;
    box-shadow: 0 8px 24px rgba(29, 58, 68, 0.12);
    border-left: 4px solid var(--ps-accent);
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.ld-stage-qa h2 {
    font-family: 'Barlow', sans-serif;
    font-size: 1.8rem;
    color: var(--ps-dark);
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

.ld-stage-qa .ld-qa-prompt {
    font-size: 1rem;
    color: var(--ps-text-light);
    margin-bottom: 24px;
    max-width: 640px;
}

.ld-qa-suggestions {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ld-qa-suggestions li {
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
    color: var(--ps-text);
    margin-bottom: 8px;
}
.ld-qa-suggestions li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ps-accent);
}

/* Video stage uses same frame as slide; iframe-only differences handled in JS */

/* Footer rail — prev / next + step title + open-in-new */
.ld-rail {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--ps-border);
    padding: 14px 24px;
    z-index: 90;
}

.ld-rail-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ld-rail-step {
    flex-grow: 1;
    min-width: 0;
}
.ld-rail-step-eyebrow {
    font-family: 'Barlow', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ps-text-light);
    margin-bottom: 2px;
}
.ld-rail-step-title {
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ps-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ld-rail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border: 1px solid var(--ps-border);
    border-radius: 8px;
    color: var(--ps-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ld-rail-btn:hover:not(:disabled) {
    border-color: var(--ps-dark);
    color: var(--ps-dark);
}
.ld-rail-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.ld-rail-btn-primary {
    background: var(--ps-dark);
    color: white;
    border-color: var(--ps-dark);
}
.ld-rail-btn-primary:hover:not(:disabled) {
    background: var(--ps-dark-deep);
    color: white;
    border-color: var(--ps-dark-deep);
}
.ld-rail-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ld-rail-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--ps-text-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ld-rail-open:hover {
    color: var(--ps-dark);
    border-color: var(--ps-border);
    text-decoration: none;
}
.ld-rail-open svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Empty / error states */
.ld-empty {
    max-width: 720px;
    margin: 80px auto;
    background: white;
    border-radius: 12px;
    padding: 40px 48px;
    box-shadow: 0 2px 8px rgba(29, 58, 68, 0.06);
    border-left: 4px solid var(--ps-green-light);
    text-align: center;
}
.ld-empty h2 {
    font-family: 'Barlow', sans-serif;
    color: var(--ps-dark);
    font-size: 1.4rem;
    margin-bottom: 8px;
}
.ld-empty p {
    color: var(--ps-text-light);
    font-size: 0.95rem;
}

@media (max-width: 800px) {
    .ld-stage { padding: 16px 16px 120px; }
    .ld-stage-qa { padding: 32px 24px; }
    .ld-rail-inner { gap: 8px; }
    .ld-rail-btn { padding: 8px 12px; font-size: 0.85rem; }
    .ld-rail-step { display: none; }
    .ld-rail-open { display: none; }
    .ld-session-strip { gap: 12px; padding: 8px 16px; }
    .ld-session-prospect-wrap { display: none; }
}
