/* Colours and type follow the Outlook pane mockup (OutlookPane.dc.html). Fonts are the system
   stack: the pane loads nothing from other origins except office.js. */
:root {
  --ink: #161c24;
  --ink-2: #262e39;
  --muted: #525e6d;
  --line: #e4e9ee;
  --field-line: #667484;
  --surface: #ffffff;
  --surface-2: #f3f6f8;
  --action: #007a73;
  --action-hover: #045f5a;
  --warn: #8a3b00;
  --warn-bg: #fff4e5;
  /* The app's combobox tokens (@stralos-co-nz/ui theme.ts): bg.hover gray.100, bg.selected
     teal.50, text.muted, focus.ring teal.700 and the overlay shadow. */
  --row-hover: #f3f6f8;
  --row-selected: #e6fbf9;
  --text-muted: #5f6c7c;
  --focus-ring: #007a73;
  --overlay-shadow: 0 12px 32px rgba(13, 27, 42, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font:
    400 14px/1.45 "Segoe UI",
    Inter,
    Arial,
    sans-serif;
}

a {
  color: var(--action);
}

a:hover {
  color: var(--action-hover);
}

.pane {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.pane-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.who {
  font-size: 12px;
  color: var(--muted);
}

.pane-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #667484;
}

.subject {
  font-size: 15px;
  font-weight: 600;
}

.muted,
.note {
  font-size: 13px;
  color: var(--muted);
}

.note {
  font-size: 12px;
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.field {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.field:focus {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 1px var(--focus-ring);
}

/* The searchable picker (src/combobox.ts), styled as the app's Combobox. */
.combo {
  position: relative;
}

.combo-input {
  padding-right: 40px;
  text-overflow: ellipsis;
}

.combo-input::placeholder {
  color: var(--text-muted);
}

.combo-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0 8px 0 0;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.combo-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.combo-panel {
  position: absolute;
  z-index: 2000;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  /* Eight whole rows and the padding, as the app's list. */
  max-height: 288px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--overlay-shadow);
}

.combo-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.combo-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.combo-option[aria-selected="true"] {
  background: var(--row-selected);
  font-weight: 600;
}

.combo-option[data-highlighted] {
  background: var(--row-hover);
}

.combo-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.combo-option[aria-disabled="true"] {
  color: var(--text-muted);
  cursor: default;
}

.combo-note {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.combo-check {
  flex-shrink: 0;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.combo-status {
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.combo-status:empty {
  display: none;
}

.kinds {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
}

.kinds label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.kinds input {
  width: 18px;
  height: 18px;
  accent-color: var(--action);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 500 14px/1 inherit;
  cursor: pointer;
}

.btn-primary {
  border-color: var(--action);
  background: var(--action);
  color: #ffffff;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

a.btn {
  text-decoration: none;
}

a.btn-primary:hover {
  background: var(--action-hover);
  color: #ffffff;
}

/* A text button: "Not in the list? Start a new project". */
.link-button {
  align-self: flex-start;
  min-height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: var(--action);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--action-hover);
}

.link-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.link-button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.form-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

#lead-form p {
  margin: 0;
}

#lead-form p:empty {
  display: none;
}

.warn {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn);
}

.ok {
  color: var(--action-hover);
}

.saved-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.fingerprint {
  margin: 0;
}

.fingerprint dt {
  font-size: 12px;
  color: var(--muted);
}

.fingerprint dd {
  margin: 0;
  word-break: break-all;
}

.mono {
  font:
    12px/1.4 Consolas,
    "IBM Plex Mono",
    monospace;
}

[hidden] {
  display: none !important;
}
