.mobile-note-navigator {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    contain: content;
}

.mobile-navigator-toolbar {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    border-bottom: 1px solid var(--main-border-color);
    background: var(--main-background-color);
}

.mobile-navigator-back {
    font-size: 1.6em;
    min-width: 40px;
    min-height: 40px;
}

.mobile-navigator-back.invisible {
    visibility: hidden;
}

.mobile-navigator-scroll {
    position: relative;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-navigator-scroll.is-pending .mobile-navigator-body {
    visibility: hidden;
}

.mobile-navigator-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    color: var(--muted-text-color, var(--main-text-color));
    pointer-events: none;
}

.mobile-navigator-current-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: var(--accented-background-color, var(--hover-item-background-color));
    border-bottom: 2px solid var(--main-border-color);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    color: var(--main-text-color);
}

.mobile-navigator-current-tile:active {
    filter: brightness(0.95);
}

.mobile-navigator-current-tile.is-active {
    background: var(--active-item-background-color);
    color: var(--active-item-text-color);
}

.mobile-navigator-current-tile.is-archived {
    opacity: 0.7;
}

.mobile-navigator-current-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
}

.mobile-navigator-current-icon {
    flex: 0 0 auto;
    font-size: 1.3em;
}

.mobile-navigator-current-title {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.15em;
    font-weight: 600;
}

.mobile-navigator-current-open {
    flex: 0 0 auto;
    font-size: 1.1em;
    opacity: 0.6;
}

.mobile-navigator-current-preview {
    position: relative;
    height: 140px;
    overflow: hidden;
    font-size: 0.92em;
    line-height: 1.35;
    color: var(--muted-text-color, var(--main-text-color));
    pointer-events: none;
}

/* Hide stale content during the brief window between commit and the new content
   being rendered into the DOM, so the preview doesn't flash the previous note's
   content before the new one arrives. */
.mobile-navigator-current-preview .note-book-content:not(.note-book-content-ready) {
    visibility: hidden;
}

.mobile-navigator-current-preview::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 32px;
    background: linear-gradient(to bottom, transparent, var(--accented-background-color, var(--hover-item-background-color)));
}

.mobile-navigator-current-preview:empty,
.mobile-navigator-current-preview .note-book-content:empty {
    display: none;
}

.mobile-navigator-current-preview .note-book-content {
    max-width: 100%;
}

.mobile-navigator-current-preview img,
.mobile-navigator-current-preview video {
    max-width: 100%;
    height: auto;
}

.mobile-navigator-list {
    display: flex;
    flex-direction: column;
}

.mobile-navigator-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--main-border-color);
    color: var(--main-text-color);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-navigator-row:active {
    background: var(--hover-item-background-color);
}

.mobile-navigator-row.is-active {
    background: var(--active-item-background-color);
    color: var(--active-item-text-color);
}

.mobile-navigator-row.is-archived {
    opacity: 0.55;
}

.mobile-navigator-row.is-pending {
    cursor: progress;
}

.mobile-navigator-preloader {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    pointer-events: none;
    visibility: hidden;
}

.mobile-navigator-row-icon {
    flex: 0 0 auto;
    font-size: 1.2em;
}

.mobile-navigator-row-title {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1em;
}

.mobile-navigator-row-chevron {
    flex: 0 0 auto;
    font-size: 1.4em;
    opacity: 0.5;
}
