/**
 * TelCCfree — Portal search controls (extracted from 7.0 mockup)
 * Search UI only — no theme toggle styles.
 */

.cursor-pointer { cursor: pointer; }
.touch-manipulation {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ── Tailwind-equivalent search utilities ── */
.relative { position: relative; }
.max-w-xs { max-width: 20rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.text-slate-400 { color: #94a3b8; }

/* ── Modern inline search (desktop) + expandable (mobile) ── */
.telc-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.telc-search-field {
  display: none;
  position: relative;
  width: 100%;
  max-width: 14rem;
}

.telc-search-field__icon {
  position: absolute;
  inset-block: 0;
  left: 0;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  pointer-events: none;
}

.telc-search-field__svg {
  display: block;
  flex-shrink: 0;
}

.telc-search-input {
  width: 100%;
  height: 40px;
  padding: 0 0.75rem 0 2.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.875rem;
  color: #1a1a2e;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.telc-search-input::placeholder {
  color: #94a3b8;
}

.telc-search-input:hover {
  border-color: #cbd5e1;
}

.telc-search-input:focus {
  border-color: rgba(233, 30, 140, 0.45);
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.12);
}

.telc-search-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.telc-search-btn:hover {
  background: #fff;
  color: #1a1a2e;
  border-color: #cbd5e1;
}

.telc-search-wrap.expanded .telc-search-btn {
  color: #e91e8c;
  border-color: rgba(233, 30, 140, 0.28);
  box-shadow: 0 2px 8px rgba(233, 30, 140, 0.12);
}

@media (min-width: 640px) {
  .telc-search-field {
    display: block;
  }

  .telc-search-btn--mobile {
    display: none;
  }

  .telc-search-wrap.telc-search-wrap--inline .telc-search-input,
  .telc-search-wrap--inline .telc-search-input {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 639px) {
  .telc-search-field {
    display: block;
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    max-width: none;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: width 300ms ease, opacity 300ms ease;
  }

  .telc-search-field .telc-search-input {
    width: min(176px, 42vw);
    opacity: 0;
    pointer-events: none;
    padding-left: 2.5rem;
    transition: opacity 300ms ease;
  }

  .telc-search-wrap.expanded .telc-search-field {
    width: min(176px, 42vw);
    opacity: 1;
    pointer-events: auto;
  }

  .telc-search-wrap.expanded .telc-search-field .telc-search-input {
    opacity: 1;
    pointer-events: auto;
  }
}

html.dark .telc-search-btn {
  background: rgba(30, 41, 59, 0.85);
  border-color: #334155;
  color: #94a3b8;
}

html.dark .telc-search-btn:hover {
  background: #334155;
  color: #e2e8f0;
}

html.dark .telc-search-input {
  background: rgba(30, 41, 59, 0.92);
  border-color: #334155;
  color: #e2e8f0;
}

html.dark .telc-search-input::placeholder {
  color: #64748b;
}

html.dark .telc-search-input:focus {
  border-color: rgba(244, 143, 177, 0.45);
  box-shadow: 0 0 0 3px rgba(244, 143, 177, 0.14);
}

html.dark .telc-search-wrap.expanded .telc-search-btn {
  color: #f48fb1;
  border-color: rgba(244, 143, 177, 0.35);
}
