/* New Here: beacons and hints. Colours follow the panel's primary palette. */

.nh-layer {
    position: fixed;
    inset: 0;
    z-index: 45;
    pointer-events: none;
}

/* Focus mode: the rest of the page is blurred, dimmed and inert. */

.nh-backdrop {
    position: fixed;
    pointer-events: auto;
    background: rgb(9 9 11 / 0.28);
    backdrop-filter: blur(3px) saturate(0.9);
    -webkit-backdrop-filter: blur(3px) saturate(0.9);
}

.nh-backdrop.nh-enter {
    animation: nh-fade 180ms ease-out;
}

.dark .nh-backdrop {
    background: rgb(0 0 0 / 0.45);
}

.nh-spotlight {
    position: fixed;
    pointer-events: auto;
    border-radius: 0.625rem;
    box-shadow:
        0 0 0 2px var(--primary-500, #f59e0b),
        0 0 0 6px color-mix(in oklab, var(--primary-500, #f59e0b) 25%, transparent);
}

@keyframes nh-fade {
    from {
        opacity: 0;
    }
}

.nh-beacon {
    position: fixed;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-25%, -25%);
}

.nh-beacon[hidden],
.nh-popover[hidden] {
    display: none;
}

.nh-beacon:focus-visible {
    outline: 2px solid var(--primary-500, #f59e0b);
    outline-offset: 3px;
    border-radius: 9999px;
}

.nh-beacon-dot,
.nh-beacon-ping {
    position: absolute;
    inset: 3px;
    border-radius: 9999px;
    background: var(--primary-500, #f59e0b);
}

.nh-beacon-dot {
    box-shadow: 0 0 0 2px #fff;
}

.dark .nh-beacon-dot {
    box-shadow: 0 0 0 2px var(--gray-900, #18181b);
}

.nh-beacon-ping {
    animation: nh-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.6;
}

@keyframes nh-ping {
    75%,
    100% {
        transform: scale(2.6);
        opacity: 0;
    }
}

.nh-popover {
    position: fixed;
    width: min(20rem, calc(100vw - 16px));
    padding: 0.875rem 1rem 0.75rem;
    border-radius: 0.75rem;
    background: #fff;
    color: var(--gray-950, #09090b);
    box-shadow:
        0 0 0 1px rgb(0 0 0 / 0.06),
        0 10px 30px -8px rgb(0 0 0 / 0.25);
    pointer-events: auto;
    font-size: 0.875rem;
    line-height: 1.4;
    animation: nh-enter 160ms ease-out;
}

.dark .nh-popover {
    background: var(--gray-900, #18181b);
    color: #fff;
    box-shadow:
        0 0 0 1px rgb(255 255 255 / 0.1),
        0 10px 30px -8px rgb(0 0 0 / 0.6);
}

.nh-popover::before {
    content: '';
    position: absolute;
    left: var(--nh-arrow-left, 50%);
    width: 10px;
    height: 10px;
    background: inherit;
    transform: translateX(-50%) rotate(45deg);
}

.nh-popover[data-placement='bottom']::before {
    top: -5px;
    box-shadow: -1px -1px 0 0 rgb(0 0 0 / 0.06);
}

.nh-popover[data-placement='top']::before {
    bottom: -5px;
    box-shadow: 1px 1px 0 0 rgb(0 0 0 / 0.06);
}

@keyframes nh-enter {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
}

.nh-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.375rem;
}

.nh-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.0625rem 0.5rem;
    border-radius: 9999px;
    background: color-mix(in oklab, var(--primary-500, #f59e0b) 15%, transparent);
    color: var(--primary-700, #b45309);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dark .nh-badge {
    color: var(--primary-300, #fcd34d);
}

.nh-counter {
    color: var(--gray-500, #71717a);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.nh-title {
    margin: 0;
    font-weight: 600;
}

.nh-hint {
    margin: 0.25rem 0 0;
    color: var(--gray-600, #52525b);
}

.dark .nh-hint {
    color: var(--gray-300, #d4d4d8);
}

.nh-popover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.nh-button,
.nh-link {
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 0.8125rem;
}

.nh-button {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--primary-600, #d97706);
    color: #fff;
    font-weight: 600;
}

.nh-button:hover {
    background: var(--primary-500, #f59e0b);
}

.nh-link {
    padding: 0;
    background: none;
    color: var(--gray-500, #71717a);
}

.nh-link:hover {
    color: var(--gray-700, #3f3f46);
    text-decoration: underline;
}

.dark .nh-link:hover {
    color: var(--gray-200, #e4e4e7);
}

.nh-button:focus-visible,
.nh-link:focus-visible {
    outline: 2px solid var(--primary-500, #f59e0b);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .nh-beacon-ping {
        animation: none;
        opacity: 0;
    }

    .nh-popover,
    .nh-backdrop {
        animation: none;
    }

}
