/* Wrapper and layout */
.fuse5-search-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Or overridden by Elementor alignment */
    width: 100%;
}

.fuse5-search-form-container {
    display: flex;
    width: 100%;
}

/* The actual form container acts as the bordered group */
.fuse5-search-form {
    display: flex;
    align-items: stretch;
    width: 100%;
    background-color: #fff;
    /* Box shadow and border managed by Elementor controls */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

/* Dropdown styling */
.fuse5-search-dropdown-wrapper {
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(0,0,0,0.1);
    background-color: #f9f9f9;
}

.fuse5-search-dropdown {
    border: none;
    padding: 12px 15px;
    outline: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    appearance: none; /* Hide default arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23333%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px; /* space for arrow */
}

/* Input area */
.fuse5-search-input-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
}

.fuse5-search-input {
    flex-grow: 1;
    border: none !important;
    padding: 12px 20px;
    outline: none;
    min-width: 0;
    font-size: 16px;
    background-color: transparent;
    box-shadow: none !important;
}

.fuse5-search-input:focus {
    box-shadow: none;
}

/* Button styling */
.fuse5-search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #d32f2f; /* default red, overrides in Elementor */
    color: #fff;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.fuse5-search-button:hover {
    background-color: #b71c1c;
}

.fuse5-search-icon-wrapper {
    display: flex;
    align-items: center;
}

.fuse5-search-icon-wrapper svg,
.fuse5-search-icon-wrapper i {
    width: 1em;
    height: 1em;
}

/* Live Suggestions Dropdown */
.fuse5-suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
}

.fuse5-suggestions-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
}

.fuse5-suggestions-dropdown a:last-child {
    border-bottom: none;
}

.fuse5-suggestions-dropdown a:hover {
    background-color: #f9f9f9;
}

.fuse5-suggestion-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #eee;
}

.fuse5-suggestion-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.fuse5-suggestion-loading,
.fuse5-suggestion-empty {
    padding: 15px 20px;
    color: #777;
    font-size: 14px;
    text-align: center;
}

/* Popular Searches */
.fuse5-popular-searches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    color: #555;
}

.fuse5-popular-label {
    font-weight: 600;
    color: #333;
}

.fuse5-popular-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.fuse5-popular-list li {
    margin: 0;
    display: flex;
    align-items: center;
}

.fuse5-popular-list li:not(:last-child)::after {
    content: ',';
    margin-right: 4px;
    color: #ccc;
}

.fuse5-popular-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fuse5-popular-link:hover {
    color: #000;
    text-decoration: underline;
}
