/* global-search.css */
.global-search-container {
    position: relative;
    width: 100%;
}

.global-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card-bg, #FFFFFF);
    border: 1px solid var(--card-border-color, #EAECF0);
    border-radius: 8px;
    box-shadow: 0 14px 28px -18px rgba(10, 13, 18, 0.28), 0 6px 12px -8px rgba(10, 13, 18, 0.18);
    z-index: 1000;
    max-height: 360px;
    overflow-y: auto;
    display: none;
    padding: 4px 0;
}

.settings-topbar__search .global-search-results {
    width: 320px;
    left: auto;
    right: 0;
    top: calc(100% + 10px);
}

.global-search-results.active {
    display: block;
}

.search-section-header {
    padding: 8px 12px 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--table-header-color, #85888E);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid #F4F4F5;
}

.search-result-item:hover {
    background: #FAFAFA;
}

.search-result-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    background: #FAFAFA;
    border: 1px solid #F1F2F4;
    border-radius: 6px;
    color: #8A8F98;
}

.search-result-icon svg {
    width: 17px;
    height: 17px;
}

.search-result-icon--image {
    overflow: hidden;
    background: #F5F5F5;
}

.search-result-icon--image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.search-result-title {
    font-size: 13px;
    font-weight: 600;
    color: #252B37;
    line-height: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-subtitle {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    line-height: 12px;
    color: #85888E;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #C6C9CE;
}

.search-result-arrow svg {
    width: 16px;
    height: 16px;
}

.search-no-results {
    padding: 18px 12px;
    text-align: center;
    color: var(--text-secondary, #535862);
    font-size: 13px;
}

.global-search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    margin-left: auto;
    background: transparent;
    color: #717680;
    cursor: pointer;
}

.global-search-clear:hover {
    color: #414651;
    background: #F5F5F5;
}

.global-search-clear.is-visible {
    display: flex;
}

.sidebar__search-input,
.sidebar-search-input,
.settings-topbar__search-input {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar__search-input::-webkit-search-cancel-button,
.sidebar-search-input::-webkit-search-cancel-button,
.settings-topbar__search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

/* Scrollbar styling for a premium feel */
.global-search-results::-webkit-scrollbar {
    width: 6px;
}

.global-search-results::-webkit-scrollbar-track {
    background: transparent;
}

.global-search-results::-webkit-scrollbar-thumb {
    background: var(--table-border-color, #E9EAEB);
    border-radius: 3px;
}

.global-search-results::-webkit-scrollbar-thumb:hover {
    background: var(--input-border-color, #D0D5DD);
}
