/* Ekonatura · Search Interaction PASS v1.0 · 07/11/2026
   Shared visual contract for the GLOBAL Home search on every route and
   the /problemas/ side-drawer/mobile-sheet. Keep both existing engines,
   result destinations, content and event handlers. This is NOT a new search.
   Approved Home: padded result surface, subtle hover, no boxed-outlining
   or underline duplication; neutral graphite/cream in light and dark. */

body.ek-integrated #ek-search,
body.ek-integrated[data-route="/problemas/"] .ek-search-drawer{
  --ek-search-ink:#f5f1eb;
  --ek-search-muted:#d1cbc5;
  --ek-search-surface:#292d2e;
  --ek-search-hover:rgba(245,241,235,.10);
  --ek-search-focus:#dfa089;
  --ek-search-space-desktop:18px 20px;
  --ek-search-space-mobile:17px 16px;
  color:var(--ek-search-ink)!important;
}
/* Same single result affordance, on every page. In Home the earlier
   .ek-concept-page rule already declares the same geometry, so it stays
   pixel-consistent. No visual border at rest or when hovered. */
body.ek-integrated #ek-search :is(.ek-search-card,.ek-search-results>a){
  box-sizing:border-box!important;
  min-width:0!important;
  padding:var(--ek-search-space-desktop)!important;
  border:0!important;
  border-radius:16px!important;
  background:transparent!important;
  box-shadow:none!important;
  text-decoration:none!important;
  outline:0!important;
  transition:background-color .16s ease;
}
body.ek-integrated #ek-search :is(.ek-search-card,.ek-search-results>a):is(:hover,:focus-within){
  background:var(--ek-search-hover)!important;
  border-color:transparent!important;
  text-decoration:none!important;
}
body.ek-integrated #ek-search :is(.ek-search-card,.ek-search-results>a):focus:not(:focus-visible){
  outline:none!important;
}
body.ek-integrated #ek-search .ek-search-results>a:focus-visible,
body.ek-integrated #ek-search .ek-search-card:focus-within:has(:focus-visible){
  outline:2px solid var(--ek-search-focus)!important;
  outline-offset:2px!important;
}
body.ek-integrated #ek-search :is(.ek-search-results>a,.ek-search-card) :is(h3,p,small,span,.ek-result-title,.ek-result-type,.ek-search-description){
  color:var(--ek-search-ink)!important;
  text-decoration:none!important;
}
body.ek-integrated #ek-search :is(.ek-search-results>a,.ek-search-card) small,
body.ek-integrated #ek-search .ek-result-type{
  color:var(--ek-search-muted)!important;
}
body.ek-integrated #ek-search .ek-search-results{
  gap:4px!important;
  border:0!important;
  padding-top:4px!important;
}
body.ek-integrated #ek-search .ek-search-results>a{
  border:0!important;
  text-decoration:none!important;
}
body.ek-integrated #ek-search .ek-search-card :is(.ek-search-expand,a){
  min-height:44px;
}
/* One sensible palette for the Problems results surface; the overall shell
   remains a drawer on desktop, an accessible bottom sheet on mobile. */
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer{
  background:var(--ek-search-surface)!important;
  color:var(--ek-search-ink)!important;
  border:0!important;
  box-shadow:-12px 0 44px rgba(0,0,0,.16)!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-head{
  box-sizing:border-box!important;
  gap:20px!important;
  padding:34px 32px 16px!important;
  border:0!important;
  border-bottom:0!important;
  background:transparent!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-head h2{
  font:400 clamp(26px,2.4vw,32px)/1.2 var(--ek-font-heading,Georgia,serif)!important;
  color:var(--ek-search-ink)!important;
  margin:0 0 7px!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer :is(.ek-search-drawer-eyebrow,.symptom-status){
  color:var(--ek-search-muted)!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-close{
  box-sizing:border-box!important;
  flex:0 0 44px!important;
  display:grid!important;place-items:center!important;
  width:44px!important;height:44px!important;
  min-width:44px!important;min-height:44px!important;
  border:1px solid rgba(245,241,235,.48)!important;
  border-radius:50%!important;
  background:transparent!important;color:var(--ek-search-ink)!important;
  padding:0!important;box-shadow:none!important;
}
@media(hover:hover) and (pointer:fine){
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-close:hover{
   background:var(--ek-search-hover)!important;
 }
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-close:focus-visible{
  outline:2px solid var(--ek-search-focus)!important;
  outline-offset:2px!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-body{
  box-sizing:border-box!important;
  padding:10px 24px calc(32px + env(safe-area-inset-bottom,0px))!important;
  min-height:0!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:4px!important;
  padding:0!important;margin:0!important;
  list-style:none!important;
  max-width:100%!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results>li,
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-result{
  box-sizing:border-box!important;
  min-width:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  margin:0!important;
  padding:0!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results :is(.search-hit a,.symptom-result a){
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  min-height:44px!important;
  padding:var(--ek-search-space-desktop)!important;
  border:0!important;
  border-radius:16px!important;
  background:transparent!important;
  color:var(--ek-search-ink)!important;
  box-shadow:none!important;
  text-decoration:none!important;
  outline:0!important;
  transition:background-color .16s ease;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results :is(.search-hit a,.symptom-result a):is(:hover,:focus-visible){
  background:var(--ek-search-hover)!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results :is(.search-hit a,.symptom-result a):focus-visible{
  outline:2px solid var(--ek-search-focus)!important;
  outline-offset:2px!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results :is(.search-hit a,.symptom-result a) :is(h2,h3,h4,p,span,small,strong){
  color:inherit!important;
  text-decoration:none!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results :is(.search-hit a,.symptom-result a) :is(h2,h3,h4,.search-hit-title){
  font:400 clamp(23px,2vw,28px)/1.22 var(--ek-font-heading,Georgia,serif)!important;
  margin:0 0 6px!important;
  letter-spacing:normal!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results :is(.search-hit a,.symptom-result a) :is(p,small,.search-hit-excerpt,.search-hit-description){
  font:400 14px/1.52 var(--ek-font-body,system-ui,sans-serif)!important;
  color:var(--ek-search-muted)!important;
  margin:0!important;
  overflow-wrap:anywhere;
}
/* Drawer is one list — not a dense, multi-column card wall — at all widths.
   Header stays readable and close target never clips on a 390px screen. */
@media(max-width:700px){
 body.ek-integrated #ek-search :is(.ek-search-card,.ek-search-results>a){
   padding:var(--ek-search-space-mobile)!important;
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer{
   border:0!important;
   border-radius:24px 24px 0 0!important;
   box-shadow:0 -10px 40px rgba(0,0,0,.16)!important;
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-head{
   position:relative!important;
   align-items:center!important;
   padding:42px 18px 15px!important;
   gap:14px!important;
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-grab{
   top:13px!important;width:44px!important;height:5px!important;
   border-radius:999px!important;
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-head h2{
   font-size:25px!important;
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-body{
   padding:10px 12px calc(24px + env(safe-area-inset-bottom,0px))!important;
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results :is(.search-hit a,.symptom-result a){
   padding:var(--ek-search-space-mobile)!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body.ek-integrated #ek-search :is(.ek-search-card,.ek-search-results>a),
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-results a{
   transition:none!important;
 }
}


/* Compact, aligned drawer heading — visual QA feedback 07/11/2026.
   Heading is metadata, not a second result card. The header text baseline
   aligns with result card text: desktop 24+20=44px; mobile 12+16=28px.
   Existing X remains a 44px touch target and mobile grab stays visible. */
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:20px 28px 8px 44px!important;
  gap:16px!important;
  min-height:0!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-head>div{
  flex:1 1 auto!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  text-align:left!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-eyebrow{
  display:none!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-head h2{
  font-size:20px!important;
  line-height:1.24!important;
  font-weight:400!important;
  margin:0 0 4px!important;
  text-align:left!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-status{
  display:block!important;
  margin:0!important;
  padding:0!important;
  font-size:12px!important;
  line-height:1.45!important;
  text-align:left!important;
}
body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-body{
  padding-top:12px!important;
}
@media(max-width:700px){
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-head{
   padding:38px 16px 8px 28px!important;
   align-items:center!important;
   gap:10px!important;
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-head h2{
   font-size:19px!important;
   line-height:1.25!important;
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .symptom-status{
   font-size:12px!important;
 }
 body.ek-integrated[data-route="/problemas/"] .hub-search .ek-search-drawer .ek-search-drawer-body{
   padding-top:12px!important;
 }
}
