/* ==========================================================================
   Guided demo
   ========================================================================== */

.demo-intro-dialog {
    width: min(760px, calc(100vw - 48px));
}

.demo-feature-list {
    margin: 12px 0 18px;
    padding-left: 22px;
}

.demo-feature-list li {
    margin: 6px 0;
}

.demo-tour-blocker {
    position: fixed;
    z-index: 1090;
    inset: 0;
}
.demo-tour-highlight {
    position: fixed;
    z-index: 1100;
    box-sizing: border-box;
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 0 0 9999px var(
        --demo-backdrop-color,
        rgb(0 0 0 / 35%)
    );
    pointer-events: none;
}
.demo-popover {
    position: fixed;
    z-index: 1200;
    width: min(360px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
    border: var(--border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    background: var(--bg-light);
    box-shadow: var(--shadow-md);
}

.demo-popover-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.demo-popover-header h4 {
    margin: 0;
    font-size: 1rem;
}

.demo-step-counter {
    flex-shrink: 0;
    color: color-mix(in srgb, var(--text-primary) 70%, white);
    font-size: 0.8rem;
    font-weight: 600;
}

.demo-popover p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.demo-popover p:last-child {
    margin-bottom: 0;
}

.demo-popover-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}
.demo-popover button {
    font-family: var(--font-stack);
    font-size: 0.85rem;
    cursor: pointer;
}

.demo-next-button {
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    color: var(--bg-light);
    background: var(--primary-color);
}
.demo-inline-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    line-height: 1;
}

.demo-inline-icon-success {
    background: var(--success-color);
}

.demo-inline-icon-skip {
    background: var(--danger-color);
}

.generate-buttons-section {
    gap: 16px;
}
.demo-document-btn {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-light);
}

.demo-document-btn:hover,
.demo-document-btn:active {
    color: var(--primary-color);
    background: var(--bg-accent);
}

@media (max-width: 760px) {
    .generate-buttons-section {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .generate-buttons-section .generate-btn {
        display: flex;
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        text-align: center;
    }
}
