/* All presentation rules are scoped to the search dialog. */
.toopa-search-v1 {
  --ts-ink: #111;
  --ts-muted: #737373;
  --ts-soft: #f5f5f5;
  --ts-ease: cubic-bezier(.22, 1, .36, 1);
  position: fixed !important;
  inset: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100vh;
  height: 100dvh;
  max-height: none !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ts-ink) !important;
  overflow: hidden !important;
  direction: rtl;
  text-align: right;
  font: inherit;
  line-height: 1.65;
  overscroll-behavior: contain;
}
.toopa-search-v1:not([open]) { display: none !important; }
.toopa-search-v1 *, .toopa-search-v1 *::before, .toopa-search-v1 *::after { box-sizing: border-box; }
.toopa-search-v1 [hidden] { display: none !important; }
.toopa-search-v1::backdrop { background: rgba(0, 0, 0, 0); transition: background 220ms ease; }
.toopa-search-v1.is-open::backdrop { background: rgba(0, 0, 0, .42); }
.toopa-search-v1 .ts-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: min(350px, 92dvh);
  max-height: 92vh;
  max-height: 92dvh;
  padding-bottom: 42px;
  background: #fff;
  opacity: 0;
  transform: translateY(-18px);
  transition: transform 280ms var(--ts-ease), opacity 180ms ease;
  overflow: hidden;
}
.toopa-search-v1.is-open .ts-panel { opacity: 1; transform: translateY(0); }
.toopa-search-v1 .ts-top {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) minmax(0, 1140px) minmax(70px, 1fr);
  gap: 28px;
  align-items: center;
  padding: 12px 40px;
  flex: 0 0 auto;
}
.toopa-search-v1 .ts-logo { display: inline-flex; justify-self: start; width: 64px; height: 64px; text-decoration: none; align-items: center; justify-content: center; color: #111; }
.toopa-search-v1 .ts-logo img { width: 58px; height: 58px; object-fit: contain; border-radius: 50%; }
.toopa-search-v1 .ts-logo span { font-size: 15px; font-weight: 800; white-space: nowrap; }
.toopa-search-v1 .ts-form {
  position: relative;
  display: flex;
  gap: 0;
  align-items: center;
  width: 100%;
  margin: 0;
  height: 42px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--ts-soft);
  box-shadow: none;
  transition: background 160ms ease, border-color 160ms ease;
}
.toopa-search-v1 .ts-form:focus-within { background: #ededed; border-color: #d3d3d3; }
.toopa-search-v1 input.ts-input {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0;
  margin: 0;
  padding: 0 6px;
  background: transparent !important;
  box-shadow: none !important;
  color: #111 !important;
  font: inherit;
  font-size: 16px;
  direction: rtl;
  text-align: start;
}
.toopa-search-v1 input.ts-input::placeholder { color: #777; opacity: 1; }
.toopa-search-v1 input.ts-input::-webkit-search-cancel-button { display: none; }
.toopa-search-v1 button { font: inherit; cursor: pointer; text-transform: none; box-shadow: none; letter-spacing: normal; }
.toopa-search-v1 .ts-icon-btn {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #111;
  background: transparent;
}
.toopa-search-v1 .ts-icon-btn:hover { background: #dedede; }
.toopa-search-v1 svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.toopa-search-v1 .ts-cancel { justify-self: end; min-height: 44px; padding: 8px 4px; border: 0; color: #111; background: transparent; font-size: 15px; font-weight: 600; }
.toopa-search-v1 .ts-cancel:hover { color: #666; text-decoration: underline; text-underline-offset: 5px; }
.toopa-search-v1 :is(button, a):focus-visible { outline: 2px solid #111; outline-offset: 4px; }
.toopa-search-v1 .ts-scroll { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; flex: 1 1 auto; min-height: 0; }
.toopa-search-v1 .ts-body { width: min(1140px, calc(100% - 280px)); margin-inline: auto; padding-top: 26px; }
.toopa-search-v1 .ts-guide { display: inline-flex; align-items: center; gap: 14px; color: #111; text-decoration: none; font-weight: 600; font-size: 15px; }
.toopa-search-v1 .ts-guide-badge { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid #b1d63d; border-radius: 50%; background: radial-gradient(ellipse at 65% 35%, #fff 4%, #f5ffcf 40%, #dcff73 75%, #c6f24e); }
.toopa-search-v1 .ts-guide:hover .ts-guide-badge { transform: scale(1.06); }
.toopa-search-v1 .ts-guide-badge { transition: transform 180ms ease; }
.toopa-search-v1 .ts-label { margin: 40px 0 16px; color: var(--ts-muted); font-size: 14px; font-weight: 400; }
.toopa-search-v1 .ts-chips { display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 0; margin: 0; list-style: none; }
.toopa-search-v1 .ts-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 18px; border-radius: 100px; background: var(--ts-soft); color: #111; font-size: 14px; font-weight: 600; text-decoration: none; transition: background 160ms ease, transform 180ms ease; }
.toopa-search-v1 .ts-chip:hover { background: #e7e7e7; transform: translateY(-1px); }
.toopa-search-v1 .ts-result-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.toopa-search-v1 .ts-heading { margin: 0; color: #111; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.toopa-search-v1 .ts-all { color: #111; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.toopa-search-v1 .ts-matches { margin-bottom: 22px; }
.toopa-search-v1 .ts-matches .ts-label { margin: 0 0 10px; }
.toopa-search-v1 .ts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; margin: 0; padding: 0; list-style: none; }
.toopa-search-v1 .ts-product { min-width: 0; animation: ts-card-in 260ms var(--ts-ease) both; animation-delay: calc(var(--ts-order, 0) * 25ms); }
.toopa-search-v1 .ts-product > a { display: block; color: #111; text-decoration: none; }
.toopa-search-v1 .ts-picture { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; width: 100%; overflow: hidden; background: #f6f6f6; }
.toopa-search-v1 .ts-picture img { display: block; width: 100%; height: 100%; margin: 0; object-fit: contain; transition: transform 240ms var(--ts-ease); }
.toopa-search-v1 .ts-product a:hover img { transform: scale(1.04); }
.toopa-search-v1 .ts-product a:hover .ts-name { text-decoration: underline; text-underline-offset: 3px; }
.toopa-search-v1 .ts-name { margin: 11px 0 5px; font-size: 14px; color: #111; font-weight: 500; line-height: 1.7; overflow-wrap: anywhere; }
.toopa-search-v1 .ts-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13px; color: #111; font-weight: 600; }
.toopa-search-v1 .ts-old { color: #777; font-size: 12px; font-weight: 400; }
.toopa-search-v1 .ts-stock { display: block; margin-top: 3px; color: #777; font-size: 12px; }
.toopa-search-v1 .ts-status { min-height: 24px; margin: 0 0 14px; color: #666; font-size: 14px; }
.toopa-search-v1 .ts-status:empty { min-height: 0; margin: 0; }
.toopa-search-v1 .ts-error { border-radius: 12px; padding: 18px; background: #f6f6f6; }
.toopa-search-v1 .ts-skeleton { display: block; aspect-ratio: 1; background: #f2f2f2; border-radius: 2px; animation: ts-pulse 900ms ease-in-out infinite alternate; }
.toopa-search-v1 .ts-skeleton::after { content: ''; display: block; width: 68%; height: 12px; background: #ebebeb; position: relative; top: calc(100% + 12px); }
.toopa-search-v1 .ts-bottom { margin-top: 28px; text-align: center; }
.toopa-search-v1 .ts-view-all { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border-radius: 100px; padding: 9px 26px; background: #111; color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
.toopa-search-v1 .ts-view-all:hover { background: #444; }
.toopa-search-v1 .ts-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes ts-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ts-pulse { from { opacity: .5; } to { opacity: 1; } }
@media (min-width: 1600px) { .toopa-search-v1 .ts-body { width: 1140px; } }
@media (max-width: 1100px) {
  .toopa-search-v1 .ts-top { grid-template-columns: 65px minmax(0, 1fr) 65px; gap: 18px; padding-inline: 24px; }
  .toopa-search-v1 .ts-body { width: calc(100% - 214px); }
  .toopa-search-v1 .ts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .toopa-search-v1 .ts-panel { min-height: 100%; max-height: 100%; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .toopa-search-v1 .ts-top { grid-template-columns: minmax(0, 1fr) 46px; gap: 12px; padding: max(16px, env(safe-area-inset-top)) 16px 14px; }
  .toopa-search-v1 .ts-logo { display: none; }
  .toopa-search-v1 .ts-form { height: 48px; }
  .toopa-search-v1 .ts-icon-btn { width: 38px; flex-basis: 38px; height: 42px; }
  .toopa-search-v1 .ts-cancel { font-size: 14px; }
  .toopa-search-v1 .ts-body { width: auto; margin: 0 20px; padding-top: 24px; }
  .toopa-search-v1 .ts-guide { font-size: 14px; }
  .toopa-search-v1 .ts-label { margin-top: 34px; }
  .toopa-search-v1 .ts-chips { gap: 10px; }
  .toopa-search-v1 .ts-chip { min-height: 40px; padding-inline: 15px; font-size: 13px; }
  .toopa-search-v1 .ts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .toopa-search-v1 .ts-name { font-size: 13px; }
  .toopa-search-v1 .ts-price { font-size: 12px; }
  .toopa-search-v1 .ts-heading { font-size: 15px; }
  .toopa-search-v1 .ts-all { font-size: 12px; }
  .toopa-search-v1 .ts-result-top { align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .toopa-search-v1 *, .toopa-search-v1::backdrop { transition: none !important; animation: none !important; }
}
