/* ========== SEARCH ========== */

.search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;

    background: rgba(0, 0, 0, 0.04);
    color: #6b7280;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

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

.search-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #374151;
}

body.dark .search-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #9ca3af;
}

body.dark .search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

/* Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 20px;
    width: 320px;

    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 12px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 200;
}

.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.dark .search-dropdown {
    background: rgba(18, 23, 20, 0.9);
    border: 1px solid rgba(52, 211, 153, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

#searchInput {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    background: #f9fafb;
    color: #1f2937;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

#searchInput:focus {
    border-color: #34d399;
    background: #ffffff;
}

body.dark #searchInput {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #e5e7eb;
}

body.dark #searchInput:focus {
    border-color: #34d399;
    background: #1f1f1f;
}

#searchInput::placeholder {
    color: #9ca3af;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

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

body.dark .search-result-item:hover {
    background: #2a2a2a;
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

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

.search-result-icon--dark {
    background: #1a1a1a;
}

body.dark .search-result-icon--dark {
    background: #2a2a2a;
}

.search-result-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

body.dark .search-result-info h4 {
    color: #f3f4f6;
}

.search-result-info span {
    font-size: 12px;
    color: #6b7280;
}

body.dark .search-result-info span {
    color: #9ca3af;
}

.search-empty {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* ========== CUSTOM SCROLLBAR ========== */

.search-results::-webkit-scrollbar {
    width: 6px;
}

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

.search-results::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* DARK MODE scrollbar */
body.dark .search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

body.dark .search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Firefox */
.search-results {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

body.dark .search-results {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
