/* ============================================================================
   Global Search — Top bar search with dropdown results
   ============================================================================ */

.lf-global-search {
    position: relative;
    flex: 0 1 360px;
    margin: 0 1rem;
}

.lf-global-search .lf-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lf-global-search .lf-search-icon {
    position: absolute;
    left: 0.75rem;
    color: #8c9bb5;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 2;
}

.lf-global-search .lf-search-input {
    width: 100%;
    padding: 0.45rem 2.2rem 0.45rem 2.2rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    background: #f8f9fb;
    color: #333;
    transition: all 0.2s ease;
}

.lf-global-search .lf-search-input:focus {
    outline: none;
    border-color: #1F4E79;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.1);
}

.lf-global-search .lf-search-input::placeholder {
    color: #adb5bd;
}

.lf-global-search .lf-search-shortcut {
    position: absolute;
    right: 0.6rem;
    display: flex;
    align-items: center;
    gap: 2px;
    pointer-events: none;
}

.lf-global-search .lf-search-shortcut kbd {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    font-size: 0.65rem;
    font-family: inherit;
    color: #8c9bb5;
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    line-height: 1.3;
}

/* Results dropdown */
.lf-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    max-height: 420px;
    overflow-y: auto;
    display: none;
}

.lf-search-results.lf-search-open {
    display: block;
}

.lf-search-results .lf-search-category {
    padding: 0.5rem 0.85rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8c9bb5;
    border-top: 1px solid #f0f0f0;
}

.lf-search-results .lf-search-category:first-child {
    border-top: none;
}

.lf-search-result-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    text-decoration: none;
    color: #333;
    transition: background 0.15s;
    cursor: pointer;
    gap: 0.65rem;
}

.lf-search-result-item:hover,
.lf-search-result-item.lf-search-highlighted {
    background: #f0f5ff;
    color: #1F4E79;
}

.lf-search-result-item .lf-result-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    background: #eef2f7;
    color: #1F4E79;
    font-size: 0.9rem;
}

.lf-search-result-item .lf-result-text {
    flex: 1;
    min-width: 0;
}

.lf-search-result-item .lf-result-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lf-search-result-item .lf-result-subtitle {
    font-size: 0.75rem;
    color: #8c9bb5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lf-search-result-item .lf-result-badge {
    flex-shrink: 0;
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
}

.lf-search-empty {
    padding: 1.5rem;
    text-align: center;
    color: #8c9bb5;
}

.lf-search-empty i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.lf-search-loading {
    padding: 1rem;
    text-align: center;
    color: #8c9bb5;
    font-size: 0.85rem;
}

/* ============================================================================
   Help Panel — Sliding panel from the right
   ============================================================================ */

.lf-help-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 0.5rem;
}

.lf-help-btn:hover {
    background: #1F4E79;
    border-color: #1F4E79;
    color: #fff;
}

.lf-help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.lf-help-overlay.lf-help-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lf-help-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 1070;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: none;
}

.lf-help-panel.lf-help-visible {
    right: 0;
    pointer-events: auto;
}

.lf-help-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1F4E79;
    color: #fff;
}

.lf-help-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.lf-help-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
    line-height: 1;
}

.lf-help-close:hover {
    opacity: 1;
}

.lf-help-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.lf-help-section {
    margin-bottom: 1.5rem;
}

.lf-help-section h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1F4E79;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lf-help-section p,
.lf-help-section li {
    font-size: 0.82rem;
    color: #555;
    line-height: 1.6;
}

.lf-help-section ul {
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
}

.lf-help-section .lf-help-shortcut-list {
    list-style: none;
    padding: 0;
}

.lf-help-section .lf-help-shortcut-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.lf-help-section .lf-help-shortcut-list kbd {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.72rem;
    color: #555;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.lf-help-tip {
    background: #f0f7ff;
    border-left: 3px solid #1F4E79;
    padding: 0.6rem 0.8rem;
    border-radius: 0 0.4rem 0.4rem 0;
    margin-bottom: 0.75rem;
}

.lf-help-tip p {
    margin: 0;
    font-size: 0.8rem;
    color: #1F4E79;
}

.lf-help-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    font-size: 0.75rem;
    color: #8c9bb5;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .lf-global-search {
        flex: 0 1 200px;
    }
    .lf-help-panel {
        width: 100%;
        right: -100%;
    }
}
