/* ===== TV3 Category Search — visuals & native clear removal ===== */

/* kill the default browser clear/cancel button */
.tv3-cat-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.tv3-cat-search__input::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}
.tv3-cat-search__input::-ms-reveal {
  display: none;
}

/* container */
.tv3-cat-search {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  color: var(--wp--preset--color--white);
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* search icon (left) */
.tv3-cat-search__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  opacity: 1;
}
.tv3-cat-search__svg {
  width: 24px;
  height: 24px;
  display: block;
  color: currentColor;
}

/* input */
.tv3-cat-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--wp--preset--color--white);
  caret-color: var(--wp--preset--color--white);
  font-size: 16px;
  line-height: 100%;
  font-weight: 400;
  letter-spacing: -0.5px;
}
.tv3-cat-search__input::placeholder {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  opacity: 1;
}

/* SVG X button (always visible on focus, regardless of text) */
.tv3-cat-search__clear {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 6px;
  background: none;
  border: 0;
  color: var(--wp--preset--color--white);
  cursor: pointer;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.tv3-cat-search:focus-within .tv3-cat-search__clear {
  visibility: visible;
  opacity: 1;
}
.tv3-cat-search__clear:hover,
.tv3-cat-search__clear:focus-visible {
  color: var(--wp--preset--color--accent);
}

.tv3-cat-search:focus-within {
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
