/* Bookmarks bar, search suggestions, recently played */

/* ---- bookmarks bar ---- */
#bookmarkbar {
  display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 8px;
  background: var(--c-surface); border-bottom: 1px solid var(--c-border);
  overflow: hidden; position: relative; flex-shrink: 0;
}
#bookmarkbar[hidden] { display: none; }
.bm-hint { color: var(--c-text-faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-item {
  display: flex; align-items: center; gap: 6px; flex: 0 0 auto; max-width: 180px; height: 26px; padding: 0 8px;
  border-radius: 6px; color: var(--c-text-secondary); font-size: 12.5px; cursor: pointer; user-select: none;
  white-space: nowrap; position: relative;
}
.bm-item span { overflow: hidden; text-overflow: ellipsis; }
.bm-item:hover { background: var(--c-surface-hover); }
.bm-item.dragging { opacity: .4; }
.bm-item.drop-before::before { content: ""; position: absolute; left: -2px; top: 3px; bottom: 3px; width: 2px; background: var(--c-text); border-radius: 2px; }
.bm-item.bm-overflow { visibility: hidden; position: absolute; pointer-events: none; }
.bm-icon { width: 16px; height: 16px; flex: 0 0 16px; object-fit: contain; font-size: 13px; text-align: center; color: var(--c-text-dim); }
#bookmarkbar .bm-more {
  margin-left: auto; flex: 0 0 auto; width: 28px; height: 26px; border: none; border-radius: 6px;
  background: transparent; color: var(--c-text-secondary); cursor: pointer; font-size: 12px;
}
#bookmarkbar .bm-more:hover { background: var(--c-surface-hover); }
#bookmarkbar .bm-more[hidden] { display: none; }

.bm-menu {
  position: fixed; z-index: 100000; min-width: 160px; max-width: 280px; padding: 4px;
  background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45); font-size: 13px; color: var(--c-text-secondary);
}
.bm-menu-row { padding: 7px 10px; border-radius: 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-menu-row:hover { background: var(--c-surface-hover); color: var(--c-text); }
.bm-menu-item { display: flex; align-items: center; gap: 8px; }

/* star inside the address bar */
#address-wrap #bookmark-star {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  color: var(--c-text-faint); font-size: 14px; cursor: pointer; border-radius: 50%;
}
#address-wrap #bookmark-star:hover { color: var(--c-text); background: var(--c-surface-hover); }
#address-wrap #bookmark-star.on { color: #f5c542; }
#address-wrap #bookmark-star.disabled { opacity: .35; cursor: default; }
#address-wrap #bookmark-star.disabled:hover { background: none; color: var(--c-text-faint); }
#address-bar { padding-right: 42px !important; }

/* settings toggle */
.misc-toggle { display: flex; align-items: center; gap: 10px; color: var(--c-text-secondary); font-size: 14px; cursor: pointer; }
.misc-toggle-hint { color: var(--c-text-faint); font-size: 12px; }

/* ---- search suggestions ---- */
.nt-searchbar { position: relative; }
.sg-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 1000; padding: 6px;
  background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.5); text-align: left;
}
.sg-list[hidden] { display: none; }
.sg-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--c-text-secondary); font-size: 14px; }
.sg-row i { color: var(--c-text-faint); font-size: 12px; width: 14px; text-align: center; }
.sg-row b { color: var(--c-text); font-weight: 600; }
.sg-row.active { background: var(--c-surface-hover); }

/* keep the menu button clear of the bookmarks bar */
body.has-bookmarkbar #menu-btn { top: 146px; }