.tl-smart-search {
  --tl-ss-bg: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,248,252,.94));
  --tl-ss-border: rgba(15, 23, 42, .08);
  --tl-ss-shadow: 0 22px 56px rgba(15, 23, 42, .08);
  --tl-ss-radius: 24px;
  background: var(--tl-ss-bg);
  border: 1px solid var(--tl-ss-border);
  border-radius: var(--tl-ss-radius);
  box-shadow: var(--tl-ss-shadow);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.tl-smart-search--home {
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,255,255,.9));
  backdrop-filter: blur(14px);
}

.tl-smart-search--home-mobile {
  background: linear-gradient(180deg, rgba(255,255,255,.985), rgba(248,251,255,.96));
  border-color: rgba(30, 64, 175, .10);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .09);
}

.tl-smart-search--results {
  margin-bottom: 18px;
}

.tl-smart-search--results.tl-smart-search--compact {
  padding: 12px 14px;
  gap: 8px;
  margin-bottom: 10px;
}

.tl-smart-search--results.tl-smart-search--headless {
  padding-top: 14px;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__form {
  gap: 6px;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__scope {
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__scope-note,
.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__context {
  display: none;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__scope-title {
  font-size: .79rem;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__scope-note,
.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__context-label,
.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__hint,
.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__feedback {
  font-size: .76rem;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__active-query {
  font-size: .84rem;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__scope-option span,
.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__context-chip,
.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__preview-chip,
.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__chip {
  padding: 7px 12px;
  font-size: .78rem;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__control {
  padding: 7px;
  border-radius: 16px;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__active-bar {
  padding: 10px 12px;
  gap: 8px;
  border-radius: 16px;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__input {
  padding-block: 7px;
  font-size: .95rem;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__submit {
  padding: 11px 15px;
  border-radius: 13px;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__preview {
  padding: 10px 12px;
  border-radius: 16px;
}

.tl-smart-search__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tl-smart-search__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(37, 99, 235, .08);
  color: #1d4ed8;
  font-size: .77rem;
  font-weight: 900;
}

.tl-smart-search__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 900;
  color: #0f172a;
}

.tl-smart-search__description {
  margin: 6px 0 0;
  color: #475569;
  font-size: .93rem;
  line-height: 1.78;
}


.tl-smart-search__form-body {
  display: grid;
  gap: 10px;
}

.tl-smart-search.is-collapsed .tl-smart-search__form-body[hidden] {
  display: none !important;
}

.tl-smart-search__active-bar {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248,250,252,.96), rgba(255,255,255,.98));
  padding: 12px 14px;
}

.tl-smart-search__active-copy,
.tl-smart-search__active-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tl-smart-search__active-copy {
  min-width: 0;
}

.tl-smart-search__active-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(37, 99, 235, .10);
  color: #1d4ed8;
  font-size: .77rem;
  font-weight: 900;
}

.tl-smart-search__active-query {
  min-width: 0;
  flex: 1 1 280px;
  font-size: .9rem;
  font-weight: 900;
  color: #0f172a;
}

.tl-smart-search__active-actions {
  justify-content: flex-end;
}

.tl-smart-search__active-action,
.tl-smart-search__active-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 13px;
  font: inherit;
  font-size: .81rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.tl-smart-search__active-action {
  border: 0;
  background: #0f172a;
  color: #fff;
}

.tl-smart-search__active-reset {
  border: 1px solid rgba(15, 23, 42, .09);
  background: rgba(255,255,255,.92);
  color: #0f172a;
}

.tl-smart-search__active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tl-smart-search__active-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(255,255,255,.94);
  color: #0f172a;
  font-size: .8rem;
  font-weight: 800;
  padding: 7px 12px;
}

.tl-smart-search__mode-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tl-smart-search__mode-pill {
  position: relative;
}

.tl-smart-search__mode-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.tl-smart-search__mode-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .24);
  background: rgba(248,250,252,.92);
  color: #334155;
  font-size: .8rem;
  font-weight: 800;
}

.tl-smart-search__mode-pill input:checked + span {
  border-color: rgba(37, 99, 235, .34);
  background: rgba(37, 99, 235, .09);
  color: #1d4ed8;
}
.tl-smart-search__form {
  display: grid;
  gap: 12px;
}

.tl-smart-search__scope {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(248,250,252,.92), rgba(255,255,255,.96));
}

.tl-smart-search__scope-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tl-smart-search__scope-title {
  font-size: .85rem;
  font-weight: 900;
  color: #0f172a;
}

.tl-smart-search__scope-note {
  font-size: .77rem;
  color: #64748b;
  font-weight: 700;
}

.tl-smart-search__scope-options {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tl-smart-search__scope-option {
  position: relative;
  cursor: pointer;
}

.tl-smart-search__scope-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.tl-smart-search__scope-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 14px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: rgba(255,255,255,.94);
  color: #334155;
  font-size: .83rem;
  font-weight: 800;
  transition: .18s ease;
}

.tl-smart-search__scope-option input:checked + span {
  border-color: rgba(37, 99, 235, .34);
  background: rgba(37, 99, 235, .09);
  color: #1d4ed8;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
}

.tl-smart-search__context {
  display: grid;
  gap: 8px;
}

.tl-smart-search__context-label {
  font-size: .77rem;
  color: #64748b;
  font-weight: 800;
}

.tl-smart-search__context-chips,
.tl-smart-search__preview-chips,
.tl-smart-search__chips,
.tl-smart-search-banner__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tl-smart-search__context-chip,
.tl-smart-search__preview-chip,
.tl-smart-search__chip,
.tl-smart-search-banner__chip {
  border: 1px solid rgba(148, 163, 184, .26);
  background: rgba(255,255,255,.92);
  color: #0f172a;
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 8px 13px;
}

.tl-smart-search__control {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 18px;
  padding: 8px;
}

.tl-smart-search__control.has-voice {
  grid-template-columns: 42px minmax(0,1fr) 42px auto;
}

.tl-smart-search__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  background: rgba(241, 245, 249, .95);
}

.tl-smart-search__icon svg {
  width: 20px;
  height: 20px;
}

.tl-smart-search__input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  color: #0f172a;
  padding: 8px 4px;
}

.tl-smart-search__input::placeholder {
  color: #94a3b8;
}

.tl-smart-search__voice {
  position: relative;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(241, 245, 249, .95);
  color: #0f172a;
  cursor: pointer;
  transition: .18s ease;
}

.tl-smart-search__voice:hover {
  background: rgba(226, 232, 240, .95);
}

.tl-smart-search__voice:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .38);
  outline-offset: 2px;
}

.tl-smart-search__voice-ring {
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(.86);
  transition: .18s ease;
}

.tl-smart-search__voice svg {
  width: 18px;
  height: 18px;
}

.tl-smart-search.is-voice-ready .tl-smart-search__voice {
  background: rgba(219, 234, 254, .9);
  color: #1d4ed8;
}

.tl-smart-search.is-voice-listening .tl-smart-search__voice {
  background: rgba(239, 68, 68, .12);
  color: #b91c1c;
}

.tl-smart-search.is-voice-listening .tl-smart-search__voice-ring {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 0 6px rgba(239, 68, 68, .12);
}

.tl-smart-search.is-voice-processing .tl-smart-search__voice {
  background: rgba(250, 204, 21, .16);
  color: #92400e;
}

.tl-smart-search__voice[disabled] {
  opacity: .75;
  cursor: not-allowed;
}

.tl-smart-search__voice-status {
  font-size: .82rem;
  font-weight: 800;
  color: #1d4ed8;
}

.tl-smart-search.is-voice-listening .tl-smart-search__voice-status {
  color: #b91c1c;
}

.tl-smart-search.is-voice-processing .tl-smart-search__voice-status {
  color: #92400e;
}

.tl-smart-search__submit {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  font: inherit;
  font-weight: 900;
  padding: 12px 18px;
  cursor: pointer;
  white-space: nowrap;
}

.tl-smart-search__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tl-smart-search__hint,
.tl-smart-search__voice-status,
.tl-smart-search__feedback {
  font-size: .83rem;
  color: #64748b;
}

.tl-smart-search__feedback {
  color: #0f766e;
  font-weight: 800;
}

.tl-smart-search.is-loading .tl-smart-search__submit {
  opacity: .86;
  pointer-events: none;
}

.tl-smart-search__preview {
  display: grid;
  gap: 10px;
  border: 1px dashed rgba(15, 23, 42, .12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248,250,252,.96), rgba(255,255,255,.98));
  padding: 12px 14px;
}

.tl-smart-search__preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tl-smart-search__preview-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, .05);
  color: #0f172a;
  font-size: .76rem;
  font-weight: 900;
}

.tl-smart-search__preview-state {
  color: #475569;
  font-size: .84rem;
  font-weight: 700;
}

.tl-smart-search__preview.is-loading .tl-smart-search__preview-state {
  color: #0f766e;
}

.tl-smart-search__preview.is-text-mode {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
}

.tl-smart-search__preview.is-warning {
  border-style: solid;
  border-color: rgba(245, 158, 11, .28);
  background: linear-gradient(180deg, rgba(255,251,235,.98), rgba(255,255,255,.98));
}

.tl-smart-search__preview.is-warning .tl-smart-search__preview-badge {
  background: rgba(245, 158, 11, .14);
  color: #92400e;
}

.tl-smart-search__preview.is-warning .tl-smart-search__preview-state {
  color: #92400e;
}

.tl-smart-search__preview-chip--action {
  cursor: pointer;
}

.tl-smart-search__chip {
  cursor: pointer;
}

.tl-smart-search-banner {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: linear-gradient(180deg, rgba(239,246,255,.96), rgba(255,255,255,.97));
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 18px;
}

.tl-smart-search-banner--compact {
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  margin-bottom: 12px;
}

.tl-smart-search-banner__bar,
.tl-smart-search-banner__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tl-smart-search-banner__bar {
  justify-content: space-between;
}

.tl-smart-search-banner__summary {
  min-width: 0;
  flex: 1 1 320px;
}

.tl-smart-search-banner__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(37, 99, 235, .11);
  color: #1d4ed8;
  font-weight: 900;
  font-size: .79rem;
}

.tl-smart-search-banner__query {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  font-size: .92rem;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-smart-search-banner__lead {
  margin: 10px 0 0;
  color: #475569;
  font-size: .87rem;
  line-height: 1.7;
}

.tl-smart-search-banner__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tl-smart-search-banner__action,
.tl-smart-search-banner__reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 900;
  border-radius: 999px;
  padding: 10px 14px;
}

.tl-smart-search-banner__action {
  background: #0f172a;
  color: #fff;
}

.tl-smart-search-banner__reset {
  background: rgba(255,255,255,.92);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, .09);
}


.tl-chipsbar--smart {
  padding: 9px 12px;
  margin-top: 10px;
}

.tl-chipsbar--smart .tl-chips {
  display: none;
}

.tl-chipsbar--smart .tl-chip-actions {
  width: 100%;
  justify-content: flex-start;
}
.tl-smart-search--home-mobile .tl-smart-search__description {
  font-size: .88rem;
  line-height: 1.72;
}

.tl-smart-search--home-mobile .tl-smart-search__chips {
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.tl-smart-search--home-mobile .tl-smart-search__chips::-webkit-scrollbar {
  display: none;
}

.tl-smart-search--home-mobile .tl-smart-search__chip {
  flex: 0 0 auto;
}

@media (max-width: 1023px) {
  .tl-smart-search {
    padding: 16px;
    border-radius: 22px;
  }

  .tl-smart-search__control {
    grid-template-columns: 40px minmax(0,1fr);
  }

  .tl-smart-search__control.has-voice {
    grid-template-columns: 40px minmax(0,1fr) 40px;
  }

  .tl-smart-search__submit {
    grid-column: 1 / -1;
    width: 100%;
  }

  .tl-smart-search__preview-head,
  .tl-smart-search-banner__actions,
  .tl-smart-search__meta,
  .tl-smart-search__scope-head {
    align-items: flex-start;
  }
}

@media (max-width: 767.98px) {
  .tl-smart-search--home-mobile {
    padding: 14px;
    border-radius: 20px;
    gap: 12px;
  }

  .tl-smart-search--home-mobile .tl-smart-search__eyebrow {
    margin-bottom: 6px;
    font-size: .74rem;
  }

  .tl-smart-search--home-mobile .tl-smart-search__title {
    font-size: 1rem;
  }

  .tl-smart-search--home-mobile .tl-smart-search__control {
    padding: 7px;
    gap: 8px;
    border-radius: 16px;
  }

  .tl-smart-search--home-mobile .tl-smart-search__icon,
  .tl-smart-search--home-mobile .tl-smart-search__voice {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .tl-smart-search--home-mobile .tl-smart-search__submit {
    padding-block: 11px;
    border-radius: 13px;
  }

  .tl-smart-search__scope {
    padding: 10px;
    border-radius: 16px;
  }

  .tl-smart-search__scope-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tl-smart-search__scope-option span {
    width: 100%;
  }

  .tl-smart-search--results.tl-smart-search--compact {
    padding: 12px;
  }

  .tl-smart-search--results.tl-smart-search--compact .tl-smart-search__scope-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .tl-smart-search--results.tl-smart-search--compact .tl-smart-search__scope-option {
    flex: 1 1 0;
  }

  .tl-smart-search-banner {
    padding: 16px;
    border-radius: 20px;
  }

  .tl-smart-search-banner__bar,
  .tl-smart-search-banner__summary,
  .tl-smart-search-banner__actions {
    align-items: flex-start;
  }

  .tl-smart-search-banner__query {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .tl-smart-search-banner__actions {
    width: 100%;
    justify-content: stretch;
  }

  .tl-smart-search-banner__action,
  .tl-smart-search-banner__reset {
    flex: 1 1 0;
    width: auto;
    text-align: center;
  }

  .tl-chipsbar--smart .tl-chip-actions {
    gap: 6px;
  }
}

@media (min-width: 1024px) {
  .tl-chipsbar--smart .tl-chip-actions {
    width: auto;
    margin-inline-start: auto;
    justify-content: flex-end;
  }
}


.tl-smart-search--results.tl-smart-search--compact.is-collapsed .tl-smart-search__form {
  margin-top: 0;
}

.tl-smart-search--results.tl-smart-search--compact.is-collapsed .tl-smart-search__meta,
.tl-smart-search--results.tl-smart-search--compact.is-collapsed .tl-smart-search__preview {
  display: none;
}

.tl-smart-search--results.tl-smart-search--compact .tl-smart-search__active-actions {
  margin-inline-start: auto;
}

@media (max-width: 767.98px) {
  .tl-smart-search--results.tl-smart-search--compact {
    padding: 10px 12px;
    border-radius: 18px;
  }

  .tl-smart-search--results.tl-smart-search--compact .tl-smart-search__active-bar {
    padding: 10px;
  }

  .tl-smart-search__active-copy,
  .tl-smart-search__active-actions {
    align-items: flex-start;
  }

  .tl-smart-search__active-actions {
    width: 100%;
    justify-content: stretch;
  }

  .tl-smart-search__active-action,
  .tl-smart-search__active-reset {
    flex: 1 1 0;
    width: auto;
  }

  .tl-smart-search__mode-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tl-smart-search__mode-pill span {
    width: 100%;
  }
}
