/* Guide-only chrome. The shared phone frame lives in core/phone-demo.css. */

.guide-demo.home-phone {
    margin: 1.5rem auto;
}

.guide-demo .home-phone__orb {
    display: none;
}

.guide-demo:not(.is-practice) .home-demo {
    display: none;
}

.guide-demo.home-phone,
.guide-demo .home-demo {
    animation: none;
    transition: none;
}

.guide-demo__start-audio {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.guide-demo .home-demo__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.guide-demo .home-demo__title {
    letter-spacing: normal;
}

.guide-demo .practice__favorite {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6f675c;
    cursor: pointer;
}

.guide-demo .practice__favorite svg {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.25;
}

.guide-demo .practice__favorite[aria-pressed="true"] {
    color: #6b2d2d;
}

.guide-demo .practice__favorite[aria-pressed="true"] svg {
    fill: currentColor;
    stroke: currentColor;
}

.guide-demo .home-demo__subtitle,
.guide-demo .home-demo__meta {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
}

/* The player keeps the drawer off-screen until .is-open. The tour sets
   .is-open and .is-tour-open itself and does not click Options, so the
   player toggle cannot close the drawer while hidden is still set. */
.guide-demo .practice__drawer.is-tour-open {
    transform: none;
    transition: none;
}

/* driver.js sets overflow:hidden on the parent of the highlighted control.
   That parent is a flex item, so the takeaway panel shrinks to a sliver
   and the card anchors to the clipped edge. Keep each panel at its content
   height and let the drawer body scroll. */
.guide-demo .practice__drawer-body > .practice__panel {
    flex-shrink: 0;
}

/* Wide screens: topic list beside the phone. Narrow screens: one dropdown.
   Both controls read the same Tour topics rows. */
.guide-demo__layout {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.25rem;
    width: min(100%, 48rem);
    margin: 0 auto;
    /* Same 50px as other streamfield blocks (sf-spacing 2). */
    padding-bottom: 50px;
}

.guide-demo__layout .guide-demo.home-phone {
    margin-top: 1.5rem;
}

.guide-demo__nav {
    flex: 0 0 13.5rem;
    margin-top: 1.5rem;
}

.driver-active .driver-overlay,
.driver-active .driver-overlay * {
    pointer-events: none;
}

.driver-active .guide-demo__nav {
    position: relative;
    z-index: 10001;
}

.driver-active .guide-demo__nav,
.driver-active .guide-demo__nav * {
    pointer-events: auto;
}

.guide-demo__nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.guide-demo__nav-list a {
    border: 0;
    background: transparent;
    color: #3d5555;
    font: inherit;
    cursor: pointer;
}

.guide-demo__nav-list a {
    display: block;
    margin: 0 0 0.55rem;
    padding: 0;
    text-align: left;
    text-decoration: none;
}

.guide-demo__nav-list a:hover,
.guide-demo__nav-list a:focus-visible {
    text-decoration: underline;
}

.guide-demo__nav-list a[aria-current="true"] {
    font-weight: 700;
}

.guide-demo__nav-group {
    margin: 1rem 0 0.3rem;
    color: var(--learnpali-teal);
    font-weight: 700;
    font-size: 0.8rem;
}

.guide-demo__nav-group:first-child {
    margin-top: 0;
}

.guide-demo__nav-topics,
.guide-demo__nav-scripts {
    list-style: none;
    margin: 0 0 0.2rem;
    padding: 0;
}

.guide-demo__nav-topics {
    margin-left: 0.15rem;
}

.guide-demo__nav-topics > li {
    margin: 0 0 0.15rem;
}

.guide-demo__nav-topic {
    margin: 0.35rem 0 0.15rem;
    color: #1c3333;
    font-weight: 700;
    font-size: 0.85rem;
}

.guide-demo__nav-scripts {
    margin-left: 0.75rem;
}

.guide-demo__pick {
    display: none;
}

.guide-demo__pick-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color--text);
    font-size: 1rem;
    font-weight: 600;
}

/* Same chrome as wagtailio .select-wrapper__select: bordered field and teal chevron. */
.guide-demo__pick select {
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 10px 2.75rem 10px 1rem;
    border: 1px solid var(--color--text);
    border-radius: 5px;
    background-color: var(--color--background);
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23007D7E" height="15" viewBox="0 0 15 15" width="15" xmlns="http://www.w3.org/2000/svg"><path d="M4.91 6.402a.644.644 0 00.902 0l3.72-3.718c.273-.274.273-.684 0-.93l-.602-.629c-.274-.246-.684-.246-.93 0L5.348 3.777 2.723 1.125c-.246-.246-.657-.246-.93 0l-.602.629c-.273.246-.273.656 0 .93l3.72 3.718z"/></svg>');
    background-repeat: no-repeat;
    background-position: 95% 65%;
    color: var(--color--text);
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    appearance: none;
}

@media (forced-colors: active) {
    .guide-demo__pick select {
        background-image: none;
        appearance: auto;
    }
}

@media (max-width: 719px) {
    .guide-demo__layout {
        display: block;
        /* This block is not in .grid, whose first column is $gutter (30px). */
        padding-inline: 30px;
    }

    .guide-demo__nav {
        flex: none;
        width: min(100%, 380px);
        margin: 1rem auto 0;
    }

    .guide-demo__nav-list {
        display: none;
    }

    .guide-demo__pick {
        display: block;
    }
}

.home-phone.guide-demo.is-locked .practice__stage,
.home-phone.guide-demo.is-locked .practice__toolbar,
.home-phone.guide-demo.is-locked .practice__drawer,
.home-phone.guide-demo.is-locked .practice__scrim {
    pointer-events: none;
}

.home-phone.guide-demo.is-locked.is-tour-scroll .practice__drawer,
.home-phone.guide-demo.is-locked.is-tour-scroll .practice__drawer * {
    pointer-events: auto;
}

.guide-demo__skip {
    margin-right: auto;
    border: 0;
    background: transparent;
    color: #3d5555;
    font: inherit;
    cursor: pointer;
}
