/* Scoped to the two header forms; legacy search results keep their own layout. */
body .lf-header-search {
    --lf-search-surface: #f8f9f8;
    --lf-search-border: #dce0dc;
    --lf-search-text: #292f2a;
    --lf-search-placeholder: #707970;
    --lf-search-shadow: inset 0 2px 4px rgba(24, 35, 25, .12), inset 0 -1px 0 rgba(255, 255, 255, .9);
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    margin: 0;
}
body.dark-mode .lf-header-search {
    --lf-search-surface: #191d1a;
    --lf-search-border: #383f39;
    --lf-search-text: #eef1ee;
    --lf-search-placeholder: #a0aaa1;
    --lf-search-shadow: inset 0 2px 5px rgba(0, 0, 0, .38), inset 0 -1px 0 rgba(255, 255, 255, .03);
}
/* Specificity and important rules override the old theme's duplicate input styles. */
body .lf-header-search input[type="search"] {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 48px 0 14px !important;
    border: 1px solid var(--lf-search-border) !important;
    border-radius: 12px !important;
    background: var(--lf-search-surface) !important;
    color: var(--lf-search-text) !important;
    font-size: 16px !important;
    line-height: normal !important;
    box-shadow: var(--lf-search-shadow) !important;
    transition: border-color .18s ease, outline-color .18s ease;
}
body .lf-header-search input[type="search"]::placeholder {
    color: var(--lf-search-placeholder) !important;
    opacity: 1;
}
body .lf-header-search input[type="search"]:focus {
    border-color: var(--lf-primary-color) !important;
    outline: 2px solid rgba(var(--lf-primary-rgb), .3) !important;
    outline-offset: 2px;
}
body .lf-header-search button[type="submit"] {
    position: absolute;
    inset: 0 0 auto auto;
    transform: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 12px 12px 0 !important;
    background: transparent !important;
    color: var(--lf-primary-color) !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
}
body .lf-header-search button[type="submit"]:hover {
    color: var(--lf-primary-hover) !important;
    background: rgba(var(--lf-primary-rgb), .08) !important;
}
body .lf-header-search button[type="submit"]:focus-visible {
    outline: 2px solid var(--lf-primary-color) !important;
    outline-offset: -3px;
}
body .lf-header-search button[type="submit"] svg {
    display: block;
    flex: none;
    width: 21px;
    height: 21px;
    pointer-events: none;
}
body .mobile-header .mobile-search { min-width: 0; }
@media (prefers-reduced-motion: reduce) {
    body .lf-header-search input[type="search"],
    body .lf-header-search button[type="submit"] { transition: none; }
}
