/* Guided tours: a dim overlay with a lit hole over the step's anchor, and a popover beside it.
   TourHost.razor.js sizes the blocks, the hole and the spotlight, and places the popover. */

[data-tour] {
    scroll-margin-top: 5rem;
}

.tour {
    position: fixed;
    inset: 0;
    z-index: 2100;
    pointer-events: none;
}

.tour-block,
.tour-hole {
    position: fixed;
    pointer-events: auto;
}

.tour-block {
    background: rgba(15, 23, 42, 0.55);
}

.tour[data-click] .tour-hole {
    pointer-events: none;
}

.tour-spotlight {
    position: fixed;
    border-radius: 8px;
    box-shadow: 0 0 0 2px var(--primary-color), 0 0 0 6px rgba(255, 255, 255, 0.35);
    pointer-events: none;
    transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.tour[data-centred] .tour-spotlight {
    box-shadow: none;
}

.tour-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(22rem, calc(100vw - 2rem));
    padding: 1rem 1.125rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    outline: none;
    transition: opacity 0.15s ease;
}

.tour:not([data-ready]) .tour-popover {
    opacity: 0;
    visibility: hidden;
}

.tour[data-centred] .tour-popover {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tour-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.tour-count {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.tour-close {
    display: inline-flex;
    padding: 0.25rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.tour-close:hover,
.tour-close:focus-visible {
    background: var(--nav-hover-bg);
    color: var(--text-primary);
}

.tour-close svg {
    width: 16px;
    height: 16px;
}

.tour-title {
    margin: 0 0 0.375rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-heading);
}

.tour-body {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.tour-note {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0.625rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.tour-note svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tour-actions-end {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .tour-popover,
    .tour[data-centred] .tour-popover {
        top: auto;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        width: auto;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tour-spotlight,
    .tour-popover {
        transition: none;
    }
}

.getting-started-step {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.getting-started-step:hover {
    border-color: var(--primary-color);
}

.tour-list-intro {
    margin: 0 0 1rem;
    color: var(--text-secondary);
}

.tour-list-group {
    margin: 1.25rem 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.tour-list {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tour-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.tour-list-main {
    display: grid;
    gap: 0.125rem;
    min-width: 0;
}

.tour-list-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-heading);
}

.tour-list-summary {
    font-size: 0.875rem;
    color: var(--text-muted);
}
