.custom-product-search-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #4a4a4ad9;
    line-height: 1;
}

.custom-product-search-toggle svg {
    width: 20px;
    height: 20px;
}

.custom-product-search-overlay {
    position: fixed;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 2147483647;
    display: none;
    width: 100vw;
    height: 100vh;
    margin: 0 !important;
    transform: none !important;
}

.custom-product-search-overlay.is-active {
    display: block;
}

.custom-product-search-overlay .search-modal__overlay {
    position: absolute;
    inset: 0;
    background: transparent !important;
}

.custom-product-search-panel {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100px;
    max-height: 100px;
    padding: 0 16px;
    margin: 0 !important;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.custom-product-search-panel .search-modal__header {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 700px;
    height: 100%;
    margin: 0 auto !important;
    padding: 0 !important;
}

.custom-product-search-panel .search-modal__header > .flex {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.custom-product-search-panel .search-modal__filters,
.custom-product-search-panel .search-group,
.custom-product-search-form {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.custom-product-search-form {
    position: relative;
    margin: 0;
}

.custom-product-search-form .input-base--wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 52px;
    border: 2px solid #22c38e;
    background: #fff;
}

.custom-product-search-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #8f9694;
    transform: translateY(-50%);
    pointer-events: none;
}

.custom-product-search-icon svg {
    width: 20px;
    height: 20px;
}

.custom-product-search-input {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 16px 0 44px !important;
    background: transparent !important;
    color: #111;
    font-size: 16px;
    line-height: 1.2;
}

.custom-product-search-input::placeholder {
    color: #7f8785;
    opacity: 1;
}

.custom-product-search-input:focus {
    box-shadow: none !important;
}

.custom-product-search-cancel {
    flex: 0 0 auto;
    min-width: 104px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-transform: none;
    cursor: pointer;
}

.custom-product-search-cancel .search-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 24px;
}

.custom-product-search-cancel svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    fill: currentColor;
}

body.custom-product-search-open {
    overflow: hidden;
}

body.custom-product-search-open .custom-product-search-overlay {
    position: fixed !important;
    z-index: 2147483647 !important;
}

body.custom-product-search-open .header-wrapper,
body.custom-product-search-open .header-wrapper.stuck {
    z-index: 1 !important;
}

body.custom-product-search-open #wpadminbar {
    z-index: 1 !important;
}

.admin-bar .custom-product-search-overlay {
    top: 0 !important;
}

@media (max-width: 849px) {
    .custom-product-search-panel {
        height: 86px;
        max-height: 86px;
        padding: 0 12px;
    }

    .custom-product-search-panel .search-modal__header > .flex {
        gap: 8px;
    }

    .custom-product-search-form .input-base--wrapper {
        height: 48px;
    }

    .custom-product-search-input {
        font-size: 14px;
        padding-left: 42px !important;
    }

    .custom-product-search-cancel {
        min-width: 86px;
    }

    .custom-product-search-cancel .search-modal__close {
        padding: 0 6px;
    }
}
