/* =========================================
   Prism onboarding — product tour overlay +
   welcome checklist shared styling.
   ========================================= */

/* ----- Tour overlay (kept lightweight) ----- */
.prism-tour-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.prism-tour-overlay.prism-tour-active {
    pointer-events: auto;
    opacity: 1;
    background: rgba(10, 14, 24, 0.45);
}

.prism-tour-spotlight {
    position: absolute;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(10, 14, 24, 0.55), 0 0 0 3px var(--ps-accent, #5b7cfa);
    pointer-events: none;
    transition: top 0.18s ease, left 0.18s ease, width 0.18s ease, height 0.18s ease;
    background: transparent;
    display: none;
}

.prism-tour-tooltip {
    position: absolute;
    display: none;
    background: var(--ps-bg, #fff);
    color: var(--ps-text-primary, #111);
    border: 1px solid var(--ps-border-default, #e3e5ec);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(10, 14, 24, 0.22);
    padding: 16px 18px 14px;
    width: 380px;
    max-width: calc(100vw - 24px);
    font-family: var(--ps-font, inherit);
    z-index: 9999;
}

.prism-tour-progress {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ps-text-muted, #8a8f98);
    margin-bottom: 6px;
}

.prism-tour-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ps-text-primary, #111);
    margin-bottom: 6px;
    line-height: 1.3;
}

.prism-tour-body {
    font-size: 13.5px;
    color: var(--ps-text-secondary, #4a4f5a);
    line-height: 1.55;
    margin-bottom: 14px;
}

.prism-tour-body b { color: var(--ps-text-primary, #111); font-weight: 600; }

.prism-tour-body ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.prism-tour-body li {
    margin-bottom: 3px;
    line-height: 1.5;
}

.prism-tour-body li:last-child { margin-bottom: 0; }

.prism-tour-body code {
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    background: var(--ps-bg-subtle, #f5f6f8);
    border: 1px solid var(--ps-border-subtle, #ebecef);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--ps-text-primary, #111);
}

.prism-tour-hint {
    margin-top: 10px;
    padding: 8px 11px;
    background: var(--ps-bg-subtle, #f5f6f8);
    border: 1px solid var(--ps-border-subtle, #ebecef);
    border-radius: 6px;
    font-size: 12.5px;
    color: var(--ps-text-secondary, #4a4f5a);
    line-height: 1.5;
}

.prism-tour-hint b { color: var(--ps-text-primary, #111); }

.prism-tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.prism-tour-nav { display: flex; gap: 8px; }

.prism-tour-skip,
.prism-tour-prev,
.prism-tour-next {
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    background: transparent;
    color: var(--ps-text-primary, #111);
}

.prism-tour-skip {
    color: var(--ps-text-muted, #8a8f98);
}

.prism-tour-skip:hover {
    color: var(--ps-text-primary, #111);
    background: var(--ps-bg-subtle, #f5f6f8);
}

.prism-tour-prev {
    border-color: var(--ps-border-default, #e3e5ec);
}

.prism-tour-prev:hover {
    background: var(--ps-bg-subtle, #f5f6f8);
}

.prism-tour-next.prism-tour-primary {
    background: var(--ps-accent, #5b7cfa);
    color: #fff;
    border-color: var(--ps-accent, #5b7cfa);
}

.prism-tour-next.prism-tour-primary:hover {
    filter: brightness(0.95);
}

@media (max-width: 560px) {
    .prism-tour-tooltip {
        width: calc(100vw - 24px);
        left: 12px !important;
    }
}

/* ----- Welcome checklist ----- */
.ob-checklist {
    border: 1px solid var(--ps-border-subtle);
    border-radius: var(--ps-r-md, 10px);
    background: var(--ps-bg, #fff);
    padding: var(--ps-space-5, 1.25rem) var(--ps-space-6, 1.5rem);
    margin-bottom: var(--ps-space-5, 1.25rem);
}

.ob-checklist-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ps-space-4, 1rem);
    margin-bottom: var(--ps-space-4, 1rem);
}

.ob-checklist-title {
    font-size: var(--ps-text-md, 1rem);
    font-weight: 600;
    color: var(--ps-text-primary);
    margin: 0 0 4px;
}

.ob-checklist-subtitle {
    font-size: var(--ps-text-sm, 0.875rem);
    color: var(--ps-text-secondary);
    margin: 0;
}

.ob-checklist-progress {
    display: flex;
    align-items: center;
    gap: var(--ps-space-3, 0.75rem);
    min-width: 140px;
}

.ob-checklist-progress-bar {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: var(--ps-bg-subtle, #f1f2f5);
    overflow: hidden;
}

.ob-checklist-progress-fill {
    display: block;
    height: 100%;
    background: var(--ps-accent);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.ob-checklist-progress-text {
    font-size: var(--ps-text-sm, 0.875rem);
    font-weight: 600;
    color: var(--ps-text-primary);
    white-space: nowrap;
}

.ob-checklist-dismiss {
    background: transparent;
    border: none;
    color: var(--ps-text-muted);
    font-size: var(--ps-text-sm, 0.875rem);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.12s, color 0.12s;
}

.ob-checklist-dismiss:hover {
    color: var(--ps-text-primary);
    background: var(--ps-bg-subtle);
}

.ob-checklist-items {
    display: grid;
    gap: var(--ps-space-2, 0.5rem);
}

.ob-item {
    display: flex;
    align-items: center;
    gap: var(--ps-space-3, 0.75rem);
    padding: var(--ps-space-3, 0.75rem) var(--ps-space-4, 1rem);
    border: 1px solid var(--ps-border-subtle);
    border-radius: var(--ps-r-sm, 6px);
    background: var(--ps-bg);
    transition: border-color 0.12s, background 0.12s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.ob-item:hover {
    border-color: var(--ps-border-default);
    background: var(--ps-bg-subtle);
}

.ob-item.ob-item-done {
    background: var(--ps-accent-subtle);
    border-color: transparent;
}

.ob-item.ob-item-done:hover {
    background: var(--ps-accent-subtle);
    filter: brightness(0.98);
}

.ob-item-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--ps-border-default);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    background: var(--ps-bg);
}

.ob-item-done .ob-item-check {
    background: var(--ps-accent);
    border-color: var(--ps-accent);
    color: #fff;
}

.ob-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ob-item-title {
    font-size: var(--ps-text-base, 0.9375rem);
    font-weight: 600;
    color: var(--ps-text-primary);
    line-height: 1.3;
}

.ob-item-done .ob-item-title {
    text-decoration: line-through;
    color: var(--ps-text-muted);
    text-decoration-color: var(--ps-accent);
    text-decoration-thickness: 1.5px;
}

.ob-item-desc {
    font-size: var(--ps-text-sm, 0.8125rem);
    color: var(--ps-text-secondary);
    line-height: 1.4;
}

.ob-item-arrow {
    color: var(--ps-text-muted);
    flex-shrink: 0;
    transition: transform 0.12s, color 0.12s;
}

.ob-item:hover .ob-item-arrow {
    color: var(--ps-accent);
    transform: translateX(2px);
}

.ob-item-done .ob-item-arrow { visibility: hidden; }

/* Кнопка «Пропустити» — позначає пункт як пройдений вручну, без необхідності
   реально йти на /monitoring чи /batch-search. Поряд зі стрілкою-arrow,
   видна лише поки пункт не done (логіка у Razor). */
.ob-item-skip {
    background: transparent;
    border: 1px solid transparent;
    color: var(--ps-text-muted);
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    margin-right: 0.5rem;
}
.ob-item-skip:hover {
    background: var(--ps-surface-alt);
    border-color: var(--ps-border-subtle);
    color: var(--ps-text-primary);
}

.ob-checklist-footer {
    margin-top: var(--ps-space-3, 0.75rem);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--ps-space-3, 0.75rem);
}

.ob-checklist-footer button {
    background: transparent;
    border: none;
    color: var(--ps-text-muted);
    font-size: var(--ps-text-sm, 0.8125rem);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.12s, background 0.12s;
}

.ob-checklist-footer button:hover {
    color: var(--ps-accent-text, var(--ps-accent));
    background: var(--ps-bg-subtle);
}

@media (max-width: 640px) {
    .ob-checklist-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ob-checklist-progress {
        width: 100%;
        min-width: 0;
    }
}
