/* ===========================
   Smart Search (OC Custom)
   =========================== */

/* Suggestions Container */
.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--oc-white, #ffffff);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    z-index: 1001;
    margin: 0;
    padding: 20px 15px;
    box-sizing: border-box;
    font-family: 'Shabnam', sans-serif;
    direction: rtl;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--oc-blue, #008dd2) #e0e0e0;
}

/* Scrollbar */
.search-suggestions::-webkit-scrollbar { width: 8px; }
.search-suggestions::-webkit-scrollbar-track { background: #e0e0e0; border-radius: 4px; }
.search-suggestions::-webkit-scrollbar-thumb { background: var(--oc-blue, #008dd2); border-radius: 4px; }
.search-suggestions::-webkit-scrollbar-thumb:hover { background: #006b9f; }

.search-suggestions.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Result Item */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    gap: 20px;
}
.search-result-item:last-child { border-bottom: none; }

/* Result Image */
.search-result-image {
    flex: 0 0 100px;
    max-width: 100px;
}
.search-result-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

/* Result Content */
.search-result-content {
    flex: 1;
    text-align: right;
}
.search-result-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--oc-navy, #01202c);
    margin: 0 0 8px;
}
.search-result-excerpt {
    font-size: 14px;
    color: #555;
    margin: 0 0 12px;
    line-height: 1.5;
}
.search-result-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--oc-blue, #008dd2);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s ease;
}
.search-result-link:hover { background: #006b9f; }

/* Loading + No Results */
.search-loading,
.search-no-results {
    padding: 20px;
    text-align: center;
    font-size: 15px;
    color: #555;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .search-suggestions {
        padding: 15px;
        max-height: 300px;
        overflow-y: auto;
    }
    .search-result-item {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    .search-result-image {
        flex: 0 0 60px;
        max-width: 60px;
        order: 2;
    }
    .search-result-image img { max-height: 60px; }
    .search-result-content { flex: 1; order: 1; }
    .search-result-title { font-size: 16px; }
    .search-result-excerpt { font-size: 13px; }
    .search-result-link { font-size: 13px; padding: 6px 12px; }
}
