/* One-sentence search row (views/search_panel.mustache, js/components/nl-search.v1.js)
 * Versioned filename: bump on change. */

.cs-nl-row { padding: 2px 0 6px; }
.cs-nl-label { display: block; color: #fff; font: 600 15px/1.2 Gabarito, Inter, sans-serif; margin: 0 0 8px; letter-spacing: .01em; }
.cs-nl-box { position: relative; display: flex; align-items: stretch; gap: 8px; }
.cs-nl-icon { position: absolute; left: 14px; top: 16px; width: 20px; height: 20px; color: #6b7c8c; pointer-events: none; }
.cs-nl-input { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 14px 0 42px; border: 0; border-radius: 12px; background: #fff; color: #10233a;
  font: 400 17px/1.2 Inter, sans-serif; box-shadow: inset 0 0 0 1px rgba(16, 35, 58, .08); }
.cs-nl-input::placeholder { color: #8795a3; }
.cs-nl-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(250, 204, 21, .75); }
.cs-nl-go { flex: 0 0 auto; height: 52px; padding: 0 22px; border-radius: 12px; font-size: 15px; letter-spacing: .04em; }
.cs-nl-go[disabled] { opacity: .7; cursor: progress; }
.cs-nl-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-top: 8px; }
.cs-nl-hint { color: rgba(255, 255, 255, .78); font: 400 13px/1.35 Inter, sans-serif; }
.cs-nl-all { color: #fff; font: 600 13px/1.35 Inter, sans-serif; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.cs-nl-all:hover { color: #facc15; }
.cs-nl-status { margin-top: 8px; color: #fff; font: 500 14px/1.35 Inter, sans-serif; }
.cs-nl-status[data-tone="warn"] { color: #ffe08a; }
.cs-nl-row.is-busy .cs-nl-input { color: #6b7c8c; }

/* Which search a visitor gets is the 'nl_search' A/B mode: <html> carries
   ab-nl_search-a (today's structured fields) or ab-nl_search-b (the sentence),
   set server-side or by csAB.arm before the body paints. Without the b class
   everything below stays as it was. */
.cs-nl-row { display: none; }
html.ab-nl_search-b body:not(.cs-search-layout-ready) form#location_search .cs-nl-row { display: block; }
/* In sentence mode the structured row is folded until the parser fails. */
html.ab-nl_search-b body:not(.cs-search-layout-ready) form#location_search:not(.cs-nl-expanded) .cs-nl-structured { display: none; }
html.ab-nl_search-b form#location_search.cs-nl-expanded .cs-nl-row { padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .18); }
/* The docked/sidebar layouts (after a structured search, results pages) hide
   the sentence box: the filter form is the editing surface there. */
.cs-search-layout-ready .cs-nl-row, .filter-sidebar-search .cs-nl-row { display: none !important; }
/* The sentence pill is shorter than the stacked fields the hero was sized
   for: the water ends just under the credibility row (deal-layout.css keeps
   the structured numbers). */
@media (max-width: 639px) {
  html.ab-nl_search-b body[data-search-sidebar="home"]:not(.cs-search-layout-ready) .map_holder { height: 588px !important; }
  html.ab-nl_search-b body[data-search-sidebar="home"]:not(.cs-search-layout-ready) .cs-hero-search { margin-top: -348px; padding: 0 10px 32px; }
}
@media (max-width: 1023px) and (min-width: 640px) {
  html.ab-nl_search-b body[data-search-sidebar="home"]:not(.cs-search-layout-ready) .map_holder { height: 520px !important; }
  html.ab-nl_search-b body[data-search-sidebar="home"]:not(.cs-search-layout-ready) .cs-hero-search { margin-top: -318px; }
}

@media (max-width: 640px) {
  .cs-nl-box { flex-wrap: wrap; }
  .cs-nl-input { flex-basis: 100%; height: 48px; font-size: 16px; }
  .cs-nl-icon { top: 14px; }
  .cs-nl-go { flex: 1 1 100%; height: 44px; }
  .cs-nl-label { font-size: 14px; }
}

/* ---- results page: the sentence folded to a bar over the water ---- */
.cs-nl-bar { display: none; position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; padding: 0 0 6px; }
html.ab-nl_search-b .cs-nl-bar { display: block; }
.cs-nl-bar-form { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.cs-nl-bar .cs-nl-icon { left: calc(1rem + 14px); top: 14px; }
.cs-nl-bar .cs-nl-input { height: 48px; font-size: 16px; }
.cs-nl-bar .cs-nl-go { height: 48px; padding: 0 20px; }
/* The parsing message has a line of its own, reserved even while empty, so
   it never overlaps the results and the band never jumps. */
.cs-nl-bar .cs-nl-status { flex: 1 1 100%; min-height: 18px; margin: -2px 0 0; font-size: 13px; line-height: 18px; }
.cs-nl-bar .cs-nl-status[hidden] { display: block; visibility: hidden; }
.cs-nl-bar-form.is-busy .cs-nl-input { color: #6b7c8c; }
@media (max-width: 640px) {
  .cs-nl-bar { padding: 0 0 6px; }
  .cs-nl-bar .cs-nl-input { flex: 1 1 0; height: 44px; font-size: 15px; padding-left: 40px; }
  .cs-nl-bar .cs-nl-icon { top: 12px; }
  .cs-nl-bar .cs-nl-go { flex: 0 0 auto; height: 44px; padding: 0 14px; font-size: 13px; }
}
