.mls-container {
    position: relative;
    max-width: 350px; /* Reduced from 700px to make it perfectly sized on desktop */
    margin: auto; 
    width: 100%; /* It will still fluidly shrink on mobile screens */
    height: 100%; 
    display: flex;
    align-items: center; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* We also need to make sure the wrapper takes up the full width inside the flex container */
.mls-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #333;
    border-radius: 50px;
    background: #fff;
    overflow: hidden;
    height: 36px;
    width: 100%; /* Added this to keep it full width */
}

.mls-input {
    width: 100%;
    height: 100%;
    padding: 0 85px 0 20px;
    font-size: 14px;
    border: none;
    background: transparent;
    color: #333;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    line-height: 36px;
}

.mls-actions {
    position: absolute;
    right: 12px;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.mls-actions button, .mls-actions .mls-search-icon {
    pointer-events: auto;
}

.mls-clear-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.mls-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: mls-spin 0.8s linear infinite;
}

.mls-clear-btn svg { width: 16px; height: 16px; }
.mls-search-icon svg { width: 18px; height: 18px; }

.mls-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e1e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    border-radius: 12px; 
}

/* Results Styling (Thumbnails removed) */
.mls-item { 
    display: block; /* Changed from flex to block since there's no image */
    padding: 12px 16px; 
    text-decoration: none; 
    border-bottom: 1px solid #eee; 
}
.mls-item:last-child { border-bottom: none; }
.mls-item:hover { background: #f8f9fa; }

.mls-item-title { 
    font-size: 15px; 
    color: #3366cc; 
    text-decoration: none; 
    display: block; 
    margin-bottom: 4px; /* Added slight gap between title and excerpt */
}
.mls-item-excerpt { 
    font-size: 12px; 
    color: #777; 
    display: block;
    line-height: 1.4;
}
.mls-no-results { padding: 20px; color: #545454; font-style: italic; text-align: center; }

@keyframes mls-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Override for the Home Page Search Bar */
.home-hero-search .mls-container {
    max-width: 700px !important; /* Makes it nice and wide again */
    margin: 0 auto !important;   /* Centers it perfectly under your "Welcome!" text */
}

/* Search Keyword Highlighting */
.mls-highlight {
    background-color: transparent;
    color: #111; /* Makes the highlighted text slightly darker/bolder than the rest */
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(51, 102, 204, 0.4); /* Subtle blue underline */
}

/* Smart Sticky Result Styling */
.mls-sticky-result {
    background-color: #f0f6fc;
    border-bottom: 2px solid #c8d8e8;
    cursor: pointer;
}
.mls-sticky-result:hover {
    background-color: #e6f0fa;
}
.mls-sticky-title {
    font-size: 14px;
    font-weight: 600;
    color: #0366d6;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Active/Clicked state for local search snippets */
.mls-inpage-snippet.mls-snippet-active {
    background: #fff8e1 !important; 
    border-left-color: #ff9800 !important;
}