/* Form wrapper */
#category-select-form.wp-block-search {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* Input + Button Container */
.wp-block-search__inside-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 40px;
    background-color: #fff;
    padding: 6px 10px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Input styling */
#category-search.wp-block-search__input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px 12px 40px;
    font-size: 16px;
    border-radius: 40px;
    background: url('data:image/svg+xml;utf8,<svg fill="gray" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5L20.49 19l-5-5zm-6 0C8.01 14 6 11.99 6 9.5S8.01 5 10.5 5 15 7.01 15 9.5 12.99 14 10.5 14z"/></svg>') no-repeat 12px center;
    background-size: 18px;
    background-color: transparent;
}

/* Submit button (unstyled except size and shape) */
.wp-block-search__button {
    border: none;
    margin-left: 10px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    white-space: nowrap;
}

/* Dropdown styling */
.select-category {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #ccc;
    max-height: 250px;
    overflow-y: auto;
    background: #fff;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    z-index: 9999;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Ensure parent container allows overflow */
#category-select-form {
    position: relative; /* required for absolute dropdown */
    z-index: 9999;
}

/* Individual dropdown items */
.select-category li {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.2s ease;
}

.select-category li img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    object-fit: cover;
    border-radius: 4px;
}

.select-category li:hover {
    background-color: #f1f1f1;
}

/* Special styling for "No results" message */
.select-category #no-results-message {
    text-align: center;
    color: #999;
    padding: 12px;
    pointer-events: none;
    font-style: italic;
}

/* Responsive layout */
@media (max-width: 600px) {
    .wp-block-search__inside-wrapper {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border-radius: 20px;
    }

    #category-search.wp-block-search__input {
        padding: 12px 40px;
        margin-bottom: 10px;
        width: 100%;
    }

    .wp-block-search__button {
        width: 100%;
        margin-left: 0;
        padding: 12px 0;
    }

    .select-category {
        top: 100%;
        width: 100%;
    }
}
