/* ============================================================
   Perfex Search Module v2.0.0 — Sidebar Search Styles
   All classes prefixed with pfx-search-
   ============================================================ */

/* --- Container --- */
.pfx-search-sidebar-form {
    position: relative;
    padding: 10px 15px;
}

/* --- Input wrapper --- */
.pfx-search-input-wrapper {
    position: relative;
}

.pfx-search-sidebar-form .form-control {
    padding-right: 56px;
    font-size: 13px;
    height: 34px;
}

/* --- Shortcut badge "/" --- */
.pfx-search-shortcut-badge {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-family: monospace;
    color: #adb5bd;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 0 4px;
    line-height: 18px;
    pointer-events: none;
    user-select: none;
}

/* --- Search / Clear button --- */
.pfx-search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #868e96;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pfx-search-btn:hover {
    color: #495057;
}

/* --- Transition classes (Feature 6) --- */
#side-menu > li,
#side-menu > li > ul > li {
    transition: opacity 150ms ease;
}

.pfx-search-hiding {
    opacity: 0 !important;
}

.pfx-search-showing {
    opacity: 0 !important;
}

/* --- Counter "3 / 15" (Feature 7) --- */
.pfx-search-counter {
    font-size: 11px;
    color: #868e96;
    text-align: right;
    padding: 2px 0 0 0;
    line-height: 1;
}

/* --- No results message (Feature 2) --- */
.pfx-search-no-results {
    font-size: 12px;
    color: #868e96;
    text-align: center;
    padding: 12px 0 4px 0;
    font-style: italic;
}

/* --- Text highlight (Feature 5) --- */
.pfx-search-highlight {
    background-color: #fff3cd;
    color: inherit;
    padding: 0;
    border-radius: 2px;
}

.pfx-search-highlight-wrapper {
    /* Structural only — no visual styling */
}

/* --- Recents dropdown (Feature 8) --- */
.pfx-search-recents {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    position: relative;
}

.pfx-search-recents-title {
    font-size: 11px;
    color: #868e96;
    padding: 6px 10px 2px 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.pfx-search-recents-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pfx-search-recent-item {
    border-top: 1px solid #f1f3f5;
}

.pfx-search-recent-item:first-child {
    border-top: none;
}

.pfx-search-recent-link {
    display: block;
    padding: 6px 10px;
    color: #495057;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pfx-search-recent-link:hover {
    background: #f8f9fa;
    color: #212529;
    text-decoration: none;
}

.pfx-search-recent-icon {
    color: #adb5bd;
    margin-right: 6px;
    font-size: 12px;
}

/* --- Dark sidebar theme support --- */
.sidebar-dark-primary .pfx-search-recents,
.sidebar-dark .pfx-search-recents {
    background: #343a40;
    border-color: #4b545c;
}

.sidebar-dark-primary .pfx-search-recent-link,
.sidebar-dark .pfx-search-recent-link {
    color: #c2c7d0;
}

.sidebar-dark-primary .pfx-search-recent-link:hover,
.sidebar-dark .pfx-search-recent-link:hover {
    background: #3d444b;
    color: #fff;
}

.sidebar-dark-primary .pfx-search-recents-title,
.sidebar-dark .pfx-search-recents-title {
    color: #8a9099;
}

.sidebar-dark-primary .pfx-search-no-results,
.sidebar-dark .pfx-search-no-results {
    color: #8a9099;
}

.sidebar-dark-primary .pfx-search-counter,
.sidebar-dark .pfx-search-counter {
    color: #8a9099;
}

.sidebar-dark-primary .pfx-search-shortcut-badge,
.sidebar-dark .pfx-search-shortcut-badge {
    color: #8a9099;
    border-color: #4b545c;
}

.sidebar-dark-primary .pfx-search-highlight,
.sidebar-dark .pfx-search-highlight {
    background-color: #856404;
    color: #fff;
}
