/* The list search field (Shared/Filters/SearchBox.razor; mockup 007 B).
   A plain stylesheet linked in Pages/_Layout.cshtml rather than SearchBox.razor.css: a scoped
   stylesheet of a new component reaches the styles bundle only on a full rebuild, and a panel
   run with hot reload, or a browser holding the old bundle, then showed the field unstyled.
   Every class starts with "search-", so nothing else in the panel matches these rules. */

/* The field and the mode switch stay on one row at any width, as in the mockup. */
.search-toolbar { display: flex; align-items: stretch; gap: 12px; flex-wrap: nowrap; margin-top: 1rem; }

.search-field {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; margin: 0;
    height: 42px; padding: 0 12px;
    background: #FFFFFF; border: 1px solid #CFD4D9; border-radius: 6px;
    transition: border-color .15s, box-shadow .15s;
}
.search-field:focus-within { border-color: #5B2E8E; box-shadow: 0 0 0 3px rgba(91, 46, 142, .14); }
.search-lens { width: 18px; height: 18px; flex: 0 0 18px; color: #91268F; }
.search-field input {
    flex: 1; min-width: 0; height: 100%;
    border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important;
    padding: 0 !important; font-size: 14px; color: #1F2430;
}
.search-field input::placeholder { color: #9AA0AA; }

.search-clear {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: #6c757d;
    font-size: 12px; cursor: pointer; padding: 0;
}
.search-clear:hover { background: #F0E9F7; color: #5B2E8E; }
.search-clear:focus-visible { outline: 2px solid #91268F; outline-offset: 1px; }

/* The mode switch: one tray, two icon options, the chosen one lifted. Same height as the field. */
.search-modes {
    display: inline-flex; align-items: center; gap: 2px; height: 42px; padding: 3px;
    background: #EEF0F4; border-radius: 6px; flex: 0 0 auto;
}
.search-mode {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 100%;
    padding: 0; border: 0; border-radius: 4px; background: transparent; color: #5A606B; cursor: pointer;
    transition: background .15s, color .15s;
}
.search-mode:hover { color: #5B2E8E; }
.search-mode.is-on { background: #FFFFFF; color: #5B2E8E; box-shadow: 0 1px 3px rgba(31, 36, 48, .14); }
.search-mode:focus-visible { outline: 2px solid #91268F; outline-offset: 1px; }
.search-mode svg { width: 24px; height: 16px; flex: 0 0 24px; }

@media (prefers-reduced-motion: reduce) {
    .search-field, .search-mode { transition: none; }
}
