/**
 * sector-picker.css — base styles for the shared sector dropdown.
 *
 * Consumer-neutral. Consumers retheme via more-specific selectors
 * (e.g. .ptr-confirm .sector-picker__input { ... }).
 *
 * The base styles assume a dark surface; the PTR confirm card extends
 * them. Route 2 wizard will add its own overrides when it lands.
 */

.sector-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.sector-picker__combo {
  position: relative;
  width: 100%;
}

.sector-picker__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  outline: none;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15.5px;
  color: #fff;
  border-radius: 0;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.sector-picker__input:focus { border-color: #5B8BFF; }

.sector-picker__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #14141c;
  border: 1px solid rgba(255, 255, 255, 0.18);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.sector-picker__option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  gap: 12px;
  transition: background 0.12s;
}
.sector-picker__option:hover,
.sector-picker__option[aria-selected="true"] {
  background: rgba(91, 139, 255, 0.16);
  color: #fff;
}

.sector-picker__option-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sector-picker__option-group {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.42);
  flex-shrink: 0;
}

.sector-picker__escape {
  display: flex;
  justify-content: flex-end;
}
.sector-picker__escape[hidden] { display: none; }
.sector-picker__escape-btn {
  background: none;
  border: none;
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.15s;
}
.sector-picker__escape-btn:hover { color: #fff; }

.sector-picker__free {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* author display:flex above wins over the [hidden] UA default, so
   restore the expected "hidden = invisible" contract explicitly. */
.sector-picker__free[hidden] { display: none; }
.sector-picker__free-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  outline: none;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15.5px;
  color: #fff;
  border-radius: 0;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.sector-picker__free-input:focus { border-color: #5B8BFF; }
.sector-picker__free-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Library-aware suggestion chips + build-mine button (P1) ────────
 * Appears beneath the combo when librariesBuilt is provided AND the
 * input has typed text. Reuses existing brand tokens — no new colours,
 * mirror the .sector-picker__option / .sector-picker__escape-btn
 * patterns above for spacing and surface treatment.
 */
.sector-picker__suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sector-picker__suggestions[hidden] { display: none; }
.sector-picker__suggestions-label {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
}
.sector-picker__suggestions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sector-picker__suggestion {
  background: rgba(91, 139, 255, 0.10);
  border: 1px solid rgba(91, 139, 255, 0.35);
  outline: none;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: #fff;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, border-color 0.15s;
}
.sector-picker__suggestion:hover,
.sector-picker__suggestion:focus {
  background: rgba(91, 139, 255, 0.22);
  border-color: #5B8BFF;
}

.sector-picker__buildmine {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sector-picker__buildmine[hidden] { display: none; }
.sector-picker__buildmine-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.30);
  outline: none;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  border-radius: 0;
  text-align: left;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.sector-picker__buildmine-btn:hover,
.sector-picker__buildmine-btn:focus {
  border-color: #5B8BFF;
  border-style: solid;
  color: #fff;
  background: rgba(91, 139, 255, 0.08);
}
.sector-picker__buildmine-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Read-mode chip + Change button (P1 — library-aware) ────────────
 * Replaces the always-open combo with a static "this is what we
 * thought + Change" row when the picker has a confirmed selection.
 * Same surface treatment as .sector-picker__input so the visual
 * weight reads as "the picker has answered" rather than "extra UI".
 */
.sector-picker__readmode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  box-sizing: border-box;
  width: 100%;
}
.sector-picker__readmode[hidden] { display: none; }
.sector-picker__readmode-chip {
  font-family: inherit;
  font-size: 15.5px;
  color: #fff;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sector-picker__readmode-change {
  background: none;
  border: none;
  padding: 4px 0;
  color: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.15s;
  flex-shrink: 0;
}
.sector-picker__readmode-change:hover { color: #fff; }
