/* Universal Customer Register search control — aligned with the Planyx Admin design system. */
body.ops-tailwind input[data-customer-picker-enhanced="true"] {
  display: none !important;
}

body.ops-tailwind .customer-picker {
  position: relative;
  display: grid;
  gap: 9px;
  width: 100%;
}

body.ops-tailwind .customer-picker-search-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--px-border, var(--ja-border, #dbe4f0));
  border-radius: 10px;
  background: var(--px-surface, var(--ja-surface, #fff));
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

body.ops-tailwind .customer-picker-search-shell:focus-within {
  border-color: var(--px-primary, #2563eb);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 14%);
}

body.ops-tailwind .customer-picker-search-icon {
  display: grid;
  place-items: center;
  flex: 0 0 43px;
  color: var(--px-text-muted, var(--ja-muted, #64748b));
  font-size: 21px;
  line-height: 1;
}

body.ops-tailwind .customer-picker-search {
  width: 100% !important;
  min-width: 0;
  height: 46px !important;
  padding: 0 72px 0 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  outline: 0 !important;
  background: transparent !important;
  color: var(--px-text, var(--ja-text, #0f172a)) !important;
  box-shadow: none !important;
  font: inherit;
}

body.ops-tailwind .customer-picker-search::placeholder {
  color: var(--px-text-muted, var(--ja-muted, #94a3b8));
}

body.ops-tailwind .customer-picker-search-hint {
  position: absolute;
  right: 11px;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--px-border, var(--ja-border, #dbe4f0));
  border-radius: 7px;
  background: var(--px-surface-soft, #f8fafc);
  color: var(--px-text-muted, var(--ja-muted, #64748b));
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  pointer-events: none;
}

body.ops-tailwind .customer-picker-results {
  position: absolute;
  z-index: 80;
  top: 57px;
  left: 0;
  right: 0;
  max-height: 320px;
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--px-border, var(--ja-border, #dbe4f0));
  border-radius: 12px;
  background: var(--px-surface, var(--ja-surface, #fff));
  box-shadow: 0 18px 48px rgb(15 23 42 / 18%);
}

body.ops-tailwind .customer-picker-results[hidden] {
  display: none !important;
}

body.ops-tailwind .customer-picker-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--px-text, var(--ja-text, #0f172a));
  text-align: left;
  cursor: pointer;
}

body.ops-tailwind .customer-picker-option:hover,
body.ops-tailwind .customer-picker-option.is-active {
  background: var(--px-primary-soft, #eff6ff);
}

body.ops-tailwind .customer-picker-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgb(37 99 235 / 22%);
  border-radius: 10px;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .03em;
}

body.ops-tailwind .customer-picker-option-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body.ops-tailwind .customer-picker-option-copy strong,
body.ops-tailwind .customer-picker-selected-copy strong {
  overflow: hidden;
  color: var(--px-text, var(--ja-text, #0f172a));
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ops-tailwind .customer-picker-option-copy small,
body.ops-tailwind .customer-picker-selected-copy small {
  overflow: hidden;
  color: var(--px-text-muted, var(--ja-muted, #64748b));
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ops-tailwind .customer-picker-status {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--px-surface-soft, #f1f5f9);
  color: var(--px-text-muted, var(--ja-muted, #475569));
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

body.ops-tailwind .customer-picker-message {
  padding: 14px 12px;
  color: var(--px-text-muted, var(--ja-muted, #64748b));
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

body.ops-tailwind .customer-picker-message.error {
  color: #dc2626;
}

body.ops-tailwind .customer-picker-message.loading {
  color: var(--px-primary, #2563eb);
}

body.ops-tailwind .customer-picker-selected {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgb(16 185 129 / 25%);
  border-radius: 10px;
  background: rgb(16 185 129 / 7%);
}

body.ops-tailwind .customer-picker-selected[hidden] {
  display: none !important;
}

body.ops-tailwind .customer-picker-selected-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #059669;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

body.ops-tailwind .customer-picker-selected-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body.ops-tailwind .customer-picker-clear {
  padding: 7px 9px;
  border: 1px solid var(--px-border, var(--ja-border, #dbe4f0));
  border-radius: 8px;
  background: var(--px-surface, var(--ja-surface, #fff));
  color: var(--px-primary, #2563eb);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

body.ops-tailwind .customer-picker-clear:hover {
  border-color: var(--px-primary, #2563eb);
  background: var(--px-primary-soft, #eff6ff);
}

body.ops-tailwind .customer-picker-help {
  color: var(--px-text-muted, var(--ja-muted, #64748b));
  font-size: 10px;
  line-height: 1.45;
}

html[data-ops-theme="dark"] body.ops-tailwind .customer-picker-search-shell,
html[data-ops-theme="dark"] body.ops-tailwind .customer-picker-results,
html[data-ops-theme="dark"] body.ops-tailwind .customer-picker-clear {
  border-color: #273449;
  background: #0f172a;
}

html[data-ops-theme="dark"] body.ops-tailwind .customer-picker-search-hint,
html[data-ops-theme="dark"] body.ops-tailwind .customer-picker-status {
  border-color: #334155;
  background: #172033;
  color: #a7b4c7;
}

html[data-ops-theme="dark"] body.ops-tailwind .customer-picker-option:hover,
html[data-ops-theme="dark"] body.ops-tailwind .customer-picker-option.is-active,
html[data-ops-theme="dark"] body.ops-tailwind .customer-picker-clear:hover {
  background: rgb(37 99 235 / 18%);
}

html[data-ops-theme="dark"] body.ops-tailwind .customer-picker-avatar {
  border-color: rgb(96 165 250 / 28%);
  background: rgb(37 99 235 / 18%);
  color: #93c5fd;
}

html[data-ops-theme="dark"] body.ops-tailwind .customer-picker-selected {
  border-color: rgb(52 211 153 / 25%);
  background: rgb(16 185 129 / 10%);
}

@media (max-width: 620px) {
  body.ops-tailwind .customer-picker-option {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  body.ops-tailwind .customer-picker-status {
    display: none;
  }

  body.ops-tailwind .customer-picker-results {
    max-height: 260px;
  }
}
