/* Typeahead Search Premium Styling */

.typeahead-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 12px 12px;
    margin-top: 0;
    z-index: 999999 !important;
    overflow: visible !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-top: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: block;
    visibility: visible !important;
    opacity: 1;
    pointer-events: auto;
    width: 100% !important;
    /* Forces same width as parent search bar */
}

@media (min-width: 992px) {
    .search-desktop-dropdown {
        width: auto !important;
        /* Small width (icon only) */
        position: relative;
    }
}

.search-dropdown-premium {
    position: absolute !important;
    top: 100% !important;
    /* Position below the navbar */
    right: 0 !important;
    transform: none !important;
    /* Remove vertical centering */
    width: 600px !important;
    max-width: 80vw !important;
    padding: 0 !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15) !important;
    overflow: visible !important;
    z-index: 1000 !important;
    margin-top: 15px !important;
    /* Add some spacing from the navbar */
    display: none;
    /* Controlled by show class */
}

.search-dropdown-premium .typeahead-dropdown {
    max-height: 480px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 15px !important;
}

/* Custom Scrollbar for Search Results Only */
.search-dropdown-premium .typeahead-dropdown::-webkit-scrollbar {
    width: 5px;
}

.search-dropdown-premium .typeahead-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.search-dropdown-premium .typeahead-dropdown::-webkit-scrollbar-thumb {
    background: rgba(106, 52, 229, 0.2);
    border-radius: 10px;
}

.search-dropdown-premium .typeahead-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 52, 229, 0.4);
}

.search-desktop-dropdown.show .search-dropdown-premium {
    display: block !important;
    animation: slideInFromBottom 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}





/* Truncation Utilities */
.truncate-1 {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
}



/* New Search Bar Style (Matching Image) - Refined Padding */
.premium-search-input {
    background-color: #fff !important;
    border: none !important;
    border-bottom: 2px solid var(--primary, #4c3398) !important;
    border-radius: 0 !important;
    padding: 15px 60px 15px 25px !important;
    /* Added 25px left padding */
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    color: #333 !important;
    box-shadow: none !important;
    width: 100% !important;
}

.premium-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.premium-search-submit {
    position: absolute;
    right: 15px;
    /* Adjust right position */
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--primary, #4c3398);
    font-size: 1.35rem;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}




#typeahead-results {
    width: 100%;
    /* Ensure content fills the dropdown width */
    padding: 20px;
}

.typeahead-section {
    margin-bottom: 20px;
}

.typeahead-section:last-child {
    margin-bottom: 0;
}

.typeahead-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Destination Cards (Grid) */
.destination-card-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.destination-card-mini:hover {
    background: rgba(0, 0, 0, 0.03);
}

.destination-img-mini {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.destination-info-mini h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.destination-info-mini p {
    margin: 0;
    font-size: 0.75rem;
    color: #777;
}

/* List Items (Experiences & Tours) */
.typeahead-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: #444;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.typeahead-item:hover {
    background: rgba(var(--primary-rgb, 10, 10, 10), 0.05);
    color: var(--primary, #000);
}

.typeahead-item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7f6;
    border-radius: 50%;
    color: #555;
    font-size: 0.9rem;
}

.typeahead-item:hover .typeahead-item-icon {
    background: var(--primary, #000);
    color: #fff;
}

/* Recent Search Pills */
.recent-search-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.recent-search-pill:hover {
    background: #fff;
    border-color: var(--primary, #4c3398);
    color: var(--primary, #4c3398);
}

.recent-search-remove {
    margin-left: 4px;
    padding: 2px;
    color: #ccc;
    font-size: 0.7rem;
    cursor: pointer;
    transition: color 0.2s;
}

.recent-search-remove:hover {
    color: #ff4757;
}

.recent-search-pill i {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Mobile Specific */
@media (max-width: 991px) {
    .typeahead-dropdown {
        position: relative;
        width: 100% !important;
        background: white;
        margin-top: 10px;
        box-shadow: none !important;
        border: none;
    }

    #typeahead-results {
        width: 100% !important;
        padding: 10px 15px;
        /* Better mobile padding */
    }

    .destination-card-mini {
        padding: 8px;
    }
}

/* Dark Mode Support (if app uses it) */
[data-theme="dark"] .typeahead-dropdown {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .destination-info-mini h6 {
    color: #eee;
}

[data-theme="dark"] .typeahead-item {
    color: #ccc;
}

[data-theme="dark"] .typeahead-item-icon {
    background: #2a2a2a;
    color: #aaa;
}

[data-theme="dark"] .recent-search-pill {
    background: #2a2a2a;
    border-color: #333;
    color: #999;
}