﻿/* =============================
   AUTOCOMPLETE DROPDOWN
   ============================= */
/* Suggestions container */
.autocomplete-suggestions {
    position: absolute; /* relative to .relative parent */
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 12px 12px;
    z-index: 10000;
    display: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.2s ease-in-out;
}

/* Sticky state for dropdown */
.home-search.sticky .autocomplete-suggestions {
    position: fixed !important; /* JS recalculates top/left/width */
    border-radius: 0 0 8px 8px;
    max-width: 700px; /* match form */
}

/* Single suggestion */
.autocomplete-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
}

    .autocomplete-suggestion:hover {
        background: #f7f7f7;
    }

/* =============================
   SCROLLBAR STYLING
   ============================= */
.autocomplete-suggestions::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
}

    .autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
        background: #999;
    }

/* =============================
   STICKY SEARCH BAR - CLEAN VERSION
   ============================= */
.home-search.sticky {
    position: fixed;
    top: 10px; /* Small gap from top */
    left: 50%;
    transform: translateX(-50%);
    width: 90%; /* Match banner width */
    max-width: 700px; /* Same as banner */
    z-index: 9999;
    /* ❌ REMOVED: padding, background, border - these create the white box */
    /* padding: 10px 20px; */
    /* background: #fff; */
    /* border: 2px solid #ef4444; */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Keep shadow for depth */
    animation: slideDown 0.3s ease;
}

    /* Make sure the form inside keeps its styling */
    .home-search.sticky form {
        background: white;
        border: 2px solid #ef4444;
        border-radius: 9999px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

/* =============================
   ANIMATIONS
   ============================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}
