/* Bio "Search Bar" block — shared by the builder (chart-template / chart-template-bg)
   and the public bio page (frontend/view-diet). The block is saved into the page's
   HTML; assets/js/frontend/bio-search.js wires it up on the public page only. */
.bio-search {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.bio-search .bio-search-input {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    height: 56px;
    margin: 0;
    padding: 0 52px 0 54px;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    color: #111827;
    outline: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: border-color .2s, box-shadow .2s;
}

.bio-search .bio-search-input::placeholder {
    color: #9CA3AF;
    font-weight: 500;
}

/* Hide the browser's own clear (×) — the block has its own. */
.bio-search .bio-search-input::-webkit-search-cancel-button,
.bio-search .bio-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    display: none;
}

.bio-search .bio-search-input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08), 0 2px 8px rgba(15, 23, 42, 0.06);
}

.bio-search .bio-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.bio-search .bio-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #F3F4F6;
    color: #4B5563;
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    display: none;
    transition: background .2s;
}

.bio-search .bio-search-clear:hover {
    background: #E5E7EB;
}

.bio-search.bio-search-has-query .bio-search-clear {
    display: block;
}

/* In the builder a click selects the block — the field is not typed into there. */
.generate-diet-html-t .bio-search-input,
.generate-diet-html-t-bg .bio-search-input {
    pointer-events: none;
}

.bio-search-empty {
    display: none;
    text-align: center;
    color: #6B7280;
    font-size: 14px;
    padding: 18px 0;
}

.bio-search-empty.bio-search-show {
    display: block;
}

.bio-search-hidden {
    display: none !important;
}
