html:has(.t-search[open]) {
  overflow: hidden;
}

.t-search {
  --t-search-gutter: clamp(17px, 4vw, 31px);
  --t-search-top: min(10dvh, 88px);
  position: fixed;
  inset: var(--t-search-top) 0 auto;
  width: min(640px, calc(100% - 32px));
  max-width: none;
  max-height: min(670px, calc(var(--t-search-viewport, 100dvh) - var(--t-search-top) - 16px));
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #fff5;
  border-radius: 19px;
  background: var(--brand-cream);
  color: var(--brand-navy);
  box-shadow: 0 28px 84px #050b27a6;
  font: 400 1rem/1.4 var(--editorial-sans, 'DM Sans', system-ui, sans-serif);
}

.t-search[open] { display: flex; flex-direction: column; }
.t-search [hidden] { display: none !important; }
.t-search::backdrop {
  background: #080e23b5;
  backdrop-filter: blur(6px);
}

.t-search-header {
  flex: none;
  display: grid;
  gap: 17px;
  padding: 22px var(--t-search-gutter) 24px;
  background: radial-gradient(ellipse at 100% 0%, #74415a 0%, transparent 49%), var(--brand-navy);
  color: white;
}

.t-search-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.tulipa-brand .t-search h2 {
  margin: 0;
  color: #fff;
  font: 650 clamp(1.45rem, 4.8vw, 2rem)/1.14 var(--editorial-display, 'DM Sans', system-ui, sans-serif);
  letter-spacing: -.043em;
}

.t-search svg { display: block; width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.t-search button { cursor: pointer; }
.t-search :is(.t-search-close,.t-search-clear) {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #fff4;
  border-radius: 50%;
  background: #ffffff15;
  color: white;
}
.t-search .t-search-close:hover { background: #fff3; }

.t-search .t-search-form {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 55px;
  margin: 0;
  padding: 4px 5px 4px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #fff;
  color: var(--brand-navy);
  box-shadow: 0 3px 15px #070b2026;
}
.t-search .t-search-form:focus-within { border-color: #626984; box-shadow: 0 0 0 3px #ffffff35; }
.t-search-symbol { color: var(--brand-red); flex: none; }
.t-search .t-search-form input {
  display: block;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
  color: var(--brand-navy);
  font: 500 1rem/1.35 var(--editorial-sans, 'DM Sans', system-ui, sans-serif);
  appearance: none;
}
.t-search .t-search-form input::placeholder { color: #606a81; opacity: 1; }
.t-search input::-webkit-search-cancel-button { display: none; }
.t-search .t-search-clear { border: 0; background: #f2edf2; color: var(--brand-navy); }
.t-search .t-search-clear:hover { background: var(--brand-blush); }

.t-search-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 19px var(--t-search-gutter) 25px;
}
.t-search .t-search-status {
  margin: 0 0 11px;
  color: #565f75;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .035em;
}
.t-search .t-search-results {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.t-search .t-search-results.is-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.t-search-results li { min-width: 0; margin: 0; padding: 0; }
.t-search .t-search-results a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 7px 11px 7px 13px;
  border-radius: 9px;
  color: var(--brand-navy);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
  transition: color .18s ease, background-color .18s ease;
}
.t-search-results.is-quick a { min-height: 53px; border: 1px solid #e5ddd9; background: #ffffffad; }
.t-search .t-search-results a:is(:hover,:focus-visible) { color: var(--brand-red); background: var(--brand-blush); }
.t-search-arrow {
  display: grid;
  flex: none;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-red);
  background: #f3e8ea;
}
.t-search-arrow svg { width: 16px; height: 16px; }
.t-search-empty { border: 1px solid #e5ddd9; border-radius: 9px; padding: 13px 14px; background: white; }
.t-search-empty p { margin: 0; color: #4d5972; font-size: .94rem; }
.t-search-empty button { margin-top: 8px; padding: 6px 10px; border: 1px solid #e6dadd; border-radius: 6px; background: var(--brand-blush); color: var(--brand-red); font: inherit; }
.t-search :is(a,button):focus-visible { outline: 2px solid var(--brand-red); outline-offset: -2px; }
.t-search button.t-search-close:focus-visible { outline-color: white; }
.t-search .t-search-form input:focus-visible { outline: none; }

@media (max-width: 600px) {
  .t-search { --t-search-top: max(12px, env(safe-area-inset-top)); width: calc(100% - 24px); border-radius: 15px; }
  .t-search-header { gap: 13px; padding-block: 15px 17px; }
  .t-search-body { padding-block: 15px 18px; }
  .t-search .t-search-results a { font-size: .875rem; }
}

@media (max-width: 340px) {
  .t-search .t-search-results.is-quick { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .t-search[open] { animation: t-search-enter .24s cubic-bezier(.2,.65,.3,1) both; }
  @keyframes t-search-enter { from { opacity: .55; translate: 0 -7px; } to { opacity: 1; translate: 0 0; } }
}
