.notebook-list-shell {
    position: relative;
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
}

.notebook-list-shell > #notebook-list { height: 100%; }

#notebook-list .notebook-item {
    isolation: isolate;
    background: #ffffff;
    color: #71717a;
    box-shadow: none;
}

#notebook-list .notebook-item::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    border: 1px solid transparent;
    border-radius: 8px;
    pointer-events: none;
}

#notebook-list .notebook-item.is-selected {
    color: #18181b;
    font-weight: 500;
}

#notebook-list .notebook-item.is-selected::before {
    border-color: var(--notebook-frame-border, #18181b);
    background: var(--notebook-frame-bg, #e9e9eb);
    transform: translateY(var(--notebook-frame-y, 0px))
        scale(var(--notebook-frame-x-scale, 1), var(--notebook-frame-y-scale, 1));
}

.notebook-default-icon { color: #a1a1aa; }
.is-selected .notebook-default-icon { color: #18181b; }

.notebook-hover-frame {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    border: 1px solid #b5b5b9;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
}

@media (hover: hover) {
    #notebook-list .notebook-item:hover { color: #18181b; }
    #notebook-list .notebook-item:focus-within .notebook-actions > span { display: none; }
    #notebook-list .notebook-item:focus-within .notebook-actions > div { display: flex; }
    /* The native hover border remains usable when the animation cannot load. */
    .notebook-list-shell:not(.has-notebook-magnet) .notebook-item:not(.is-selected):hover::before {
        border-color: #b5b5b9;
    }
}

/* Touch has no hover preview: reveal tools after selection so a first tap
   cannot turn into a click on a tool that appeared under the finger. */
@media (hover: none) {
    #notebook-list .notebook-item:not(.is-selected) .notebook-actions > span { display: inline; }
    #notebook-list .notebook-item:not(.is-selected) .notebook-actions > div { display: none; }
    #notebook-list .notebook-item.is-selected .notebook-actions > span { display: none; }
    #notebook-list .notebook-item.is-selected .notebook-actions > div { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
    #notebook-list .notebook-item { transition: none; }
}
