217 lines
4.0 KiB
CSS
217 lines
4.0 KiB
CSS
.global-search {
|
|
position: relative;
|
|
flex: 1;
|
|
max-width: 400px;
|
|
margin: 0 24px;
|
|
}
|
|
|
|
.global-search__input-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.global-search__icon {
|
|
position: absolute;
|
|
left: 12px;
|
|
color: var(--text-secondary);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.global-search__input {
|
|
width: 100%;
|
|
padding: 8px 40px 8px 36px;
|
|
background: var(--bg-tertiary);
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius-md);
|
|
color: var(--text-primary);
|
|
font-size: 0.875rem;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.global-search__input:focus {
|
|
outline: none;
|
|
border-color: var(--accent-primary);
|
|
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
|
|
}
|
|
|
|
.global-search__input::placeholder {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.global-search__shortcut {
|
|
position: absolute;
|
|
right: 8px;
|
|
padding: 2px 6px;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-muted);
|
|
font-family: inherit;
|
|
font-size: 0.75rem;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.global-search__spinner {
|
|
position: absolute;
|
|
right: 36px;
|
|
width: 14px;
|
|
height: 14px;
|
|
border: 2px solid var(--border-primary);
|
|
border-top-color: var(--accent-primary);
|
|
border-radius: 50%;
|
|
animation: spin 0.6s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* Dropdown */
|
|
.global-search__dropdown {
|
|
position: absolute;
|
|
top: calc(100% + 8px);
|
|
left: 0;
|
|
right: 0;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-lg);
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.global-search__empty {
|
|
padding: 24px;
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
/* Sections */
|
|
.global-search__section {
|
|
padding: 8px 0;
|
|
border-bottom: 1px solid var(--border-primary);
|
|
}
|
|
|
|
.global-search__section:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.global-search__section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 4px 12px 8px;
|
|
color: var(--text-secondary);
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.global-search__count {
|
|
background: var(--bg-tertiary);
|
|
padding: 2px 6px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
/* Results */
|
|
.global-search__result {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
background: transparent;
|
|
border: none;
|
|
text-align: left;
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.global-search__result:hover,
|
|
.global-search__result.selected {
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.global-search__result svg {
|
|
flex-shrink: 0;
|
|
margin-top: 2px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.global-search__result-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
.global-search__result-name {
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.global-search__result-path {
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.global-search__result-desc {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* Badges */
|
|
.global-search__badge {
|
|
flex-shrink: 0;
|
|
padding: 2px 8px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.7rem;
|
|
font-weight: 500;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.global-search__badge.public {
|
|
background: rgba(16, 185, 129, 0.15);
|
|
color: var(--accent-primary);
|
|
}
|
|
|
|
.global-search__badge.private {
|
|
background: rgba(234, 179, 8, 0.15);
|
|
color: #eab308;
|
|
}
|
|
|
|
.global-search__badge.format {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
.global-search {
|
|
max-width: none;
|
|
margin: 0 12px;
|
|
}
|
|
|
|
.global-search__shortcut {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.global-search {
|
|
display: none;
|
|
}
|
|
}
|