/* =====================
   9. SIDEBAR
   ===================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #0092c8;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5fb;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* =====================
   10. SEARCH WIDGET
   ===================== */
.search-widget {
    position: relative;
}

/* Search input pill */
.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #f4f8fc;
    border: 2px solid #d0e8f5;
    border-radius: 30px;
    padding: 6px 14px;
    transition: all 0.3s ease;
}

.search-input-wrap:focus-within {
    border-color: #0092c8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 146, 200, 0.12);
}

.search-input-wrap i.fa-search {
    color: #0092c8;
    font-size: 15px;
    flex-shrink: 0;
}

#smartSearch {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    padding: 6px 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #333;
}

#smartSearch::placeholder {
    color: #aaa;
}

/* Clear (×) button — visible only when input has text */
.search-clear-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 14px;
    transition: color 0.2s;
    display: none;
}

.search-clear-btn:hover {
    color: #e25a5a;
}

.search-clear-btn.visible {
    display: block;
}

/* Status bar below input (shows typing dots + result count) */
.search-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: #888;
    min-height: 22px;
    padding: 0 4px;
}

/* Animated typing indicator (3 bouncing dots) */
.typing-dots {
    display: none;
    gap: 3px;
    align-items: center;
}

.typing-dots.active {
    display: flex;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #0092c8;
    border-radius: 50%;
    animation: bounce 0.9s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

/* Result count badge */
.search-result-count {
    font-weight: 600;
    color: #0092c8;
}

/* Keyword chip displayed in status bar */
.keyword-chip {
    display: inline-flex;
    align-items: center;
    background: #e8f5fb;
    color: #0092c8;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    gap: 4px;
}

/* Live preview dropdown below search box */
.search-preview {
    margin-top: 12px;
    display: none;
    flex-direction: column;
    gap: 6px;
}

.search-preview.open {
    display: flex;
}

/* Individual preview result row */
.search-preview-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none !important;
    border: 1px solid #f0f0f0;
    animation: fadeSlideIn 0.25s ease forwards;
    opacity: 0;
}

.search-preview-item:hover {
    background: #eef7fc;
    border-color: #b8def5;
}

.search-preview-item img {
    width: 48px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.preview-text .preview-title {
    font-size: 12px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-text .preview-ago {
    font-size: 11px;
    color: #aaa;
}

/* Keyword highlight inside preview titles */
.preview-title mark {
    background: linear-gradient(120deg, #bbebff 0%, #d4f4ff 100%);
    color: #0056a3;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}