/**
 * Sidebar Menu Search Styles - Matte Dark Grey
 * Sectoor ERP
 */

.sidebar .sidebar-search-wrapper,
.sidebar-search-wrapper {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #111827 !important;
    padding: 10px 12px 8px 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.sidebar-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.sidebar-search-icon {
    position: absolute;
    left: 10px;
    width: 14px;
    height: 14px;
    color: #9ca3af !important;
    pointer-events: none;
    z-index: 2;
}

/* Force dark grey on search input across all states */
.sidebar input.sidebar-search-input,
.sidebar-search-wrapper input.form-control,
#sidebarSearchInput.form-control,
#sidebarSearchInput {
    padding-left: 32px !important;
    padding-right: 58px !important;
    height: 33px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    background-color: #1f2937 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

#sidebarSearchInput::placeholder {
    color: #6b7280 !important;
    font-size: 12px;
}

#sidebarSearchInput:focus {
    background-color: #262f3f !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08) !important;
    outline: none !important;
}

.sidebar-search-kbd {
    position: absolute;
    right: 7px;
    font-size: 10px;
    font-family: inherit;
    font-weight: 600;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    padding: 1.5px 5px;
    pointer-events: none;
    line-height: 1.2;
    user-select: none;
    z-index: 2;
}

.sidebar-search-clear {
    position: absolute;
    right: 7px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    z-index: 3;
}

.sidebar-search-clear:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-search-clear i,
.sidebar-search-clear svg {
    width: 14px;
    height: 14px;
}

.sidebar-search-empty {
    padding: 24px 16px;
    text-align: center;
    color: #6b7280;
}

.sidebar-search-empty svg,
.sidebar-search-empty i {
    width: 22px;
    height: 22px;
    margin-bottom: 6px;
    color: #4b5563;
}

.sidebar-search-empty p {
    font-size: 12px;
    margin-bottom: 0;
}

/* --- Folded Sidebar States --- */
.sidebar-folded:not(.open-sidebar-folded) .sidebar-search-wrapper {
    padding: 10px 14px 4px 14px !important;
    background-color: #111827 !important;
}

.sidebar-folded:not(.open-sidebar-folded) .sidebar-search-input {
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-indent: -9999px;
    cursor: pointer;
    width: 38px !important;
    margin: 0 auto;
    background-color: #1f2937 !important;
}

.sidebar-folded:not(.open-sidebar-folded) .sidebar-search-icon {
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    color: #9ca3af;
}

.sidebar-folded:not(.open-sidebar-folded) .sidebar-search-kbd,
.sidebar-folded:not(.open-sidebar-folded) .sidebar-search-clear {
    display: none !important;
}
