@use "../../styles/variables.scss" as *; .bases-toolbar { position: relative; display: inline-block; margin: 1rem 0; font-family: var(--bodyFont); .bases-toolbar-item { display: inline-block; position: relative; &.bases-toolbar-views-menu { .text-icon-button { display: flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; background: var(--light); border: 1px solid var(--lightgray); border-radius: 6px; color: var(--darkgray); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.15s ease; user-select: none; &:hover { background: var(--highlight); border-color: var(--gray); } &.has-active-menu { border-color: var(--secondary); background: var(--highlight); } .text-button-icon { display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: var(--gray); flex-shrink: 0; svg { width: 16px; height: 16px; } &.mod-aux { opacity: 0.7; } } .text-button-label { font-size: 0.875rem; color: var(--dark); font-weight: 500; } } } } .menu-scroll { position: absolute; top: calc(100% + 0.5rem); left: 0; z-index: 100; max-height: 400px; background: var(--light); border: 1px solid var(--lightgray); border-radius: 8px; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); overflow: hidden; min-width: 280px; display: none; } &:has(.text-icon-button.has-active-menu) .menu-scroll { display: block; } .bases-toolbar-menu-container { display: flex; flex-direction: column; max-height: 400px; .search-input-container { position: relative; padding: 0.5rem; border-bottom: 1px solid var(--lightgray); input[type="search"] { width: 100%; padding: 0.375rem 0.75rem; padding-right: 2rem; background: var(--light); border: 1px solid var(--secondary); border-radius: 6px; font-size: 0.875rem; color: var(--dark); outline: none; transition: box-shadow 0.15s ease; font-family: var(--bodyFont); &::placeholder { color: var(--gray); opacity: 0.7; } &:focus { box-shadow: 0 0 0 2px var(--highlight); } &::-webkit-search-cancel-button { display: none; } } .search-input-clear-button { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; cursor: pointer; opacity: 0.5; transition: opacity 0.15s ease; color: var(--gray); &:hover { opacity: 1; } &[hidden] { display: none; } svg { width: 14px; height: 14px; } } } .bases-toolbar-items { overflow-y: auto; max-height: 340px; &::-webkit-scrollbar { width: 8px; } &::-webkit-scrollbar-track { background: transparent; } &::-webkit-scrollbar-thumb { background: var(--lightgray); border-radius: 4px; &:hover { background: var(--gray); } } .suggestion-group { &[data-group="views"] { padding: 0.25rem 0; text-transform: lowercase; } } .suggestion-item { display: block; text-decoration: none; color: inherit; cursor: pointer; &.bases-toolbar-menu-item { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; margin: 0 0.25rem; border-radius: 4px; transition: background 0.15s ease; &:hover { background: var(--lightgray); } &.mod-active { font-weight: $semiBoldWeight; } &.is-selected { .bases-toolbar-menu-item-info { .bases-toolbar-menu-item-name { font-weight: 600; color: var(--secondary); } } } .bases-toolbar-menu-item-info { display: flex; align-items: center; gap: 0.5rem; flex: 1; .bases-toolbar-menu-item-info-icon { display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; color: var(--gray); flex-shrink: 0; svg { width: 16px; height: 16px; } } .bases-toolbar-menu-item-name { font-size: 0.875rem; color: var(--dark); } } .clickable-icon.bases-toolbar-menu-item-icon { display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; opacity: 0; transition: opacity 0.15s ease; color: var(--gray); flex-shrink: 0; svg { width: 16px; height: 16px; } } &:hover .clickable-icon.bases-toolbar-menu-item-icon { opacity: 0.5; } } } } } } @media all and ($mobile) { .bases-toolbar { .menu-scroll { min-width: 240px; left: auto; } } }