/* Dropdown Container */
.pe-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 0.5rem;
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    max-height: 24rem; /* Equivalent to max-h-96 */
    overflow-y: auto;
    z-index: 100;
    display: none;
}

/* Custom Scrollbar for the exact look in your screenshot */
.pe-search-dropdown::-webkit-scrollbar {
    width: 6px;
}
.pe-search-dropdown::-webkit-scrollbar-track {
    background: transparent;
    margin: 8px 0;
}
.pe-search-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.pe-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Search Result Item Row */
.pe-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.pe-result-item:last-child {
    border-bottom: none;
}

.pe-result-item:hover {
    background-color: rgba(6, 187, 204, 0.05); /* hover:bg-[#06BBCC]/5 */
}

/* Icon Wrapper */
.pe-icon-box {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pe-icon-course {
    background-color: rgba(6, 187, 204, 0.1);
    color: #06bbcc;
}

.pe-icon-quiz {
    background-color: #f1f5f9;
    color: #64748b;
}

.pe-icon-box svg {
    width: 1rem;
    height: 1rem;
}

/* Text Content Area */
.pe-result-text {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pe-result-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pe-result-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right Side Badges */
.pe-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
}

.pe-badge-course {
    color: #06bbcc;
    background-color: rgba(6, 187, 204, 0.1);
}

.pe-badge-quiz {
    color: #94a3b8;
    background-color: #f1f5f9;
}

/* ==========================================================================
   MOBILE & SMALL SCREEN OPTIMIZATION FOR SEARCH DROPDOWN
   ========================================================================== */

@media (max-width: 768px) {
    .pe-search-dropdown {
        position: fixed;
        top: calc(var(--header-h, 4rem) + 0.5rem); 
        left: 1rem;
        width: calc(100vw - 2rem);
        max-width: none;
    }

    .pe-result-title, 
    .pe-result-subtitle {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2; 
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
