.ahura-search-form-element {
    position: relative;
}

.ahura-search-form-element.with-cat {
    display: flex;
    gap: 9px;
}

.ahura-search-form-element.with-cat.template-3 {
    flex-direction: row-reverse;
}

.ahura-search-form-element.with-cat select {
    border: none;
    height: 50px;
    width: 150px;
    border-radius: 7px;
    background-color: #f0f0f0;
    padding: 8px;
    font-size: 13px;
    color: #505050;
    outline: 0;
}

.ahura-search-form-element .s-input {
    position: relative;
}

.ahura-search-form-element.with-cat .s-input {
    width: calc(100% - 150px);
}

.ahura-search-form-element:not(.with-cat) .s-input {
    width: 100%;
}

.ahura-search-form-element button {
    position: absolute;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    box-shadow: none;
    width: 50px;
    height: 100%;
    padding: 0;
    top: 0;
    font-size: 19px;
    color: #9e9fb1;
}

body.mw_rtl .ahura-search-form-element .btn-auto-align button {
    left: 0;
    right: auto;
}

body.mw_ltr .ahura-search-form-element .btn-auto-align button {
    right: 0;
    left: auto;
}

.ahura-search-form-element input[type=text] {
    box-shadow: 0 7px 35px 0 rgba(0,0,0,0.1);
}

.ahura-search-form-element #ajax_search_loading {
    left: 0;
    top: 0;
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.ahura-search-form-element #ajax_search_loading.show-loader {
    opacity: 1;
}

.ahura-search-form-element.with-btn #ajax_search_loading {
    width: 110px;
}

.ahura-search-form-element .search-item .item-cover {
    width: 50px;
}

.ahura-search-form-element .search-item .item-cover img {
    border-radius: 7px;
    object-fit: cover;
}

.ahura-search-form-element #ajax_search_res .search-item a {
    display: flex;
    gap: 10px;
}
/*
 * Opt-in "Search Suggestions" panel (popular and recent searches).
 * The panel buttons outrank the widget's "{{WRAPPER}} button" styles (search button) but stay below their own controls.
 */
.ahura-search-form-element .ah-search-suggest {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 20;
    padding: 16px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
    text-align: start;
}

.ahura-search-form-element .ah-search-suggest[hidden],
.ahura-search-form-element .ah-ss-recent[hidden] {
    display: none;
}

.ahura-search-form-element .ah-ss-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    color: #1f1f1f;
}

.ahura-search-form-element .ah-ss-title svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

.ahura-search-form-element .ah-ss-popular .ah-ss-title svg {
    color: #ef4056;
}

.ahura-search-form-element .ah-ss-recent .ah-ss-title svg {
    color: #3f4064;
}

.ahura-search-form-element .ah-ss-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ahura-search-form-element .ah-ss-popular + .ah-ss-recent {
    margin-top: 16px;
}

form .ah-search-suggest .ah-ss-chips button.ah-ss-chip {
    box-shadow: none;
    margin: 0;
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    color: #424750;
    background: none;
    border: 1px solid #e0e0e2;
    border-radius: 999px;
    cursor: pointer;
    transition: ease .15s;
}

form .ah-search-suggest .ah-ss-chips button.ah-ss-chip:hover,
form .ah-search-suggest .ah-ss-chips button.ah-ss-chip:focus-visible {
    color: #ef4056;
    border-color: #ef4056;
}

form .ah-search-suggest .ah-ss-chips button.ah-ss-chip svg {
    fill: none;
    width: 14px;
    height: 14px;
}

.ahura-search-form-element .ah-ss-recent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    font-size: 13px;
    color: #424750;
    border-bottom: 1px solid #f0f0f1;
}

.ahura-search-form-element .ah-ss-recent-item:last-child {
    border-bottom: 0;
}

.ahura-search-form-element .ah-ss-recent-item > svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    color: #a1a3a8;
}

form .ah-ss-recent-list .ah-ss-recent-item button.ah-ss-recent-q {
    box-shadow: none;
    margin: 0;
    position: static;
    flex: 1;
    display: block;
    width: auto;
    height: 100%;
    padding: 0;
    font-size: inherit;
    color: inherit;
    text-align: start;
    background: none;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

form .ah-ss-recent-list .ah-ss-recent-item button.ah-ss-recent-x {
    box-shadow: none;
    position: static;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    color: #a1a3a8;
    background: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

form .ah-ss-recent-list .ah-ss-recent-item button.ah-ss-recent-x:hover {
    background-color: #f0f0f1;
}

form .ah-ss-recent-list .ah-ss-recent-item button.ah-ss-recent-x svg {
    fill: none;
    width: 16px;
    height: 16px;
}
