/* ============================================================
   TECH PICKER — smart mechanic assignment with availability check
   ============================================================ */

.tech-picker { position: relative; width: 100%; }

/* ---- Trigger ---- */
.tp-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: var(--surf-0);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-1);
  cursor: pointer;
  transition: border-color .12s, background .12s;
  font-family: inherit;
  text-align: left;
  min-height: 48px;
}
.tp-trigger:hover { border-color: var(--text-3); }
.tp-trigger:focus-visible { outline: 2px solid var(--text-1); outline-offset: -2px; }

.tp-trigger-main { flex: 1; min-width: 0; }
.tp-trigger-name {
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tp-trigger-role {
  font-size: 11px; color: var(--text-3); margin-top: 2px;
  display: flex; align-items: center; gap: 4px;
}
.tp-placeholder {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-3); font-size: 13px;
}

/* ---- Warning strip (when selected tech unavailable) ---- */
.tp-warning {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px; padding: 10px 12px;
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: var(--radius-1);
  color: var(--accent);
}
.tp-warning-soft {
  background: var(--orange-tint);
  border-color: var(--orange);
  color: var(--orange);
}
.tp-warning > :global(svg), .tp-warning > svg { flex-shrink: 0; }

/* ---- Dropdown ---- */
.tp-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 100;
  background: var(--surf-0);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-1);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 540px;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ---- Search bar ---- */
.tp-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surf-1);
}
.tp-search > svg { color: var(--text-3); flex-shrink: 0; }
.tp-search input {
  flex: 1;
  border: 0; background: transparent; outline: 0;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-1);
  min-width: 0;
}
.tp-search input::placeholder { color: var(--text-3); }
.tp-date-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 10px; font-weight: 700;
  border-radius: var(--radius-1);
  text-transform: uppercase; letter-spacing: 0.4px;
  white-space: nowrap;
}

/* ---- Scrollable list ---- */
.tp-list { overflow-y: auto; max-height: 440px; padding: 6px 0; }

.tp-group { padding: 4px 0; }
.tp-group + .tp-group { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 8px; }

.tp-group-hd {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px 6px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.6px; text-transform: uppercase;
}
.tp-group-hint {
  margin-left: auto;
  color: var(--text-3);
  font-size: 10px; font-weight: 600; text-transform: none; letter-spacing: 0;
  font-style: italic;
}

/* ---- Row ---- */
.tp-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 0; border-left: 2px solid transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
}
.tp-row:hover:not(.is-disabled) { background: var(--surf-1); border-left-color: var(--text-1); }
.tp-row.is-sel { background: var(--surf-1); border-left-color: var(--text-1); }
.tp-row.is-disabled { opacity: 0.55; cursor: not-allowed; }
.tp-row.is-disabled:hover { background: transparent; }

.tp-row-main { flex: 1; min-width: 0; }

.tp-row-name {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 13px; font-weight: 700;
}
.tp-row-name > span:first-child {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 200px;
}
.tp-role {
  font-size: 10px; color: var(--text-3); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.3px;
}

.tp-row-av {
  display: flex; align-items: center; gap: 6px;
  margin-top: 3px;
  font-size: 11px;
}
.tp-row-av .text-3 {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tp-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.tp-specs {
  display: flex; flex-wrap: wrap; gap: 3px;
  margin-top: 4px;
}
.tp-spec {
  padding: 1px 5px;
  background: var(--surf-2);
  color: var(--text-2);
  font-size: 9px; font-weight: 600;
  border-radius: var(--radius-1);
  text-transform: uppercase; letter-spacing: 0.3px;
}

/* ---- Load bar ---- */
.tp-load {
  flex-shrink: 0;
  width: 80px;
  text-align: right;
}
.tp-load-bar {
  height: 4px;
  background: var(--surf-2);
  border-radius: var(--radius-1);
  overflow: hidden;
  margin-bottom: 3px;
}
.tp-load-bar > div { height: 100%; transition: width .3s; }
.tp-load-lbl {
  font-size: 10px; color: var(--text-3); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---- Footer hint ---- */
.tp-footer {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--line-2);
  background: var(--surf-1);
  color: var(--text-3);
  font-size: 10px; line-height: 1.4;
}
.tp-footer > svg { flex-shrink: 0; }

/* ---- Dark theme tuning ---- */
[data-theme="dark"] .tp-dropdown { box-shadow: 0 8px 28px rgba(0,0,0,.45); }
