/* STYLES POU REZILTA CHÈCH - Lis kontak modèn */
.search-results {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(109, 40, 210, 0.2);
    margin-top: 8px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid rgba(109, 40, 210, 0.1);
}

.search-section {
    padding: 0;
}

.search-section:not(:last-child) {
    border-bottom: 1px solid rgba(109, 40, 210, 0.1);
}

.search-section-title {
    padding: 16px 20px 12px;
    font-weight: 700;
    color: #6d28d2;
    font-size: 14px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    letter-spacing: 0.5px;
    margin: 0;
    border-bottom: 1px solid rgba(109, 40, 210, 0.05);
}

/* ATIK REZILTA - Style lis kontak */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    overflow: hidden;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* IMAGE/AVATAR - FIKS pou toujou kenbe espas*/
.result-image {
    flex-shrink: 0;
    margin-right: 16px;
    position: relative;
    /* FIKS - toujou pran menm espas */
    width: 48px;
    height: 48px;
}

.search-result-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /*transition: all 0.3s ease;*/
    background: #f8f9fa;
    display: block;
}

/* FALLBACK IMAGE */
.search-result-default-image {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(135deg, #6d28d2 0%, #9c4ae0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
    border: 2px solid rgba(109, 40, 210, 0.1);
}

.search-result-default-image:hover {
    box-shadow: 0 4px 12px rgba(109, 40, 210, 0.3);
}

/* KONTI TÈS - Asire w ke li pa anvayi espas imaj */.result-content {
    flex: 1;
    min-width: 0;
    margin-left: 0;
}

.search-result-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
    margin-bottom: -2px;
    line-height: 1.3;
}

.search-result-description {
    color: #718096;
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* KATEGORI ENdikatè */
.search-result-item::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6d28d2;
    opacity: 0;
    /*transition: all 0.3s ease;*/
}

/* MESAJ SAN REZILTA */
.no-results, .error-message {
    padding: 40px 20px;
    text-align: center;
    color: #718096;
    font-style: italic;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
}

.error-message {
    color: #e53e3e;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

/* SCROLLBAR Pesonalize */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(109, 40, 210, 0.3);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(109, 40, 210, 0.5);
}

/* SIPÒ POU GIF AK ANIMATIONS */
.search-result-image.gif-support {
    animation: none !important;
}

.search-result-image[src$=".gif"] {
    border-color: #ff6b6b;
}

.search-result-image[src$=".svg"] {
    border-color: #4ecdc4;
}

.search-result-image[src$=".webp"] {
    border-color: #45b7d1;
}
@media (max-width: 768px) {
    .search-result-item {
        padding: 2px 5px !important;
    }
}
/*RESPONSIVE DESIGN - Kenbe espas fiks yo*/
@media (max-width: 768px) {
    .search-results {
        width: 95%;
        max-height: 60vh;
        margin-top: 5px;
        border-radius: 8px;
    }

    .result-image {
        margin-right: 12px;
        width: 42px; /* FIJO */
        height: 42px; /* FIJO */
    }

    .search-result-title {
        font-size: 15px;
    }

    .search-result-description {
        font-size: 13px;
    }

    .search-result-default-image {
        font-size: 16px;
    }
    .search-result-item {
        padding: 2px 5px;
    }
}

@media (max-width: 480px) {
    .search-result-item {
        padding: 2px 4px;
    }

    .result-image {
        width: 40px;
        height: 40px;
    }

    .search-result-default-image {
        font-size: 16px;
    }
}

/* ANIMATIONS ANTRE */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.search-results {
    animation: slideInDown 0.3s ease;
}

/* LOADING STATE */
.search-loading {
    padding: 20px;
    text-align: center;
    color: #6d28d2;
    font-style: italic;
}

.search-loading::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
                .25em 0 0 rgba(0,0,0,0),
                .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: #6d28d2;
        text-shadow:
                .25em 0 0 rgba(0,0,0,0),
                .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
                .25em 0 0 #6d28d2,
                .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
                .25em 0 0 #6d28d2,
                .5em 0 0 #6d28d2;
    }
}