/* What thoughtbot teammates see on top of a client's portal */
.tb-bar {
  --tb-ink: #1a1010;
  --tb-line: rgba(245, 243, 239, 0.12);
  --tb-text: #cfc6c1;
  --tb-accent: #f5f3ef;
  position: relative;
  background:
    radial-gradient(120% 220% at 0% 0%, rgba(224, 49, 49, 0.14), transparent 45%),
    linear-gradient(180deg, #241717, var(--tb-ink));
  color: var(--tb-text);
  border-bottom: 1px solid #000;
  box-shadow: inset 0 -1px 0 var(--tb-line);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.tb-bar--editing {
  --tb-accent: #f2b45c;
  background:
    radial-gradient(120% 220% at 0% 0%, rgba(242, 180, 92, 0.18), transparent 45%),
    linear-gradient(180deg, #2a1c12, #1c120c);
}
.tb-bar--editing::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: linear-gradient(90deg, #f2b45c, rgba(242, 180, 92, 0.2)); }
.tb-bar__inner { max-width: var(--page); margin: 0 auto; padding: 9px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; }

.tb-bar__status { margin: 0; display: flex; align-items: center; gap: 12px; min-width: 0; }
.tb-bar__mode { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; background: rgba(245, 243, 239, 0.08); box-shadow: inset 0 0 0 1px var(--tb-line); color: var(--tb-accent); font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.tb-bar--editing .tb-bar__mode { background: rgba(242, 180, 92, 0.16); box-shadow: inset 0 0 0 1px rgba(242, 180, 92, 0.45); }
.tb-bar__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-bar__text strong { color: #fff; font-weight: 600; }
.tb-bar__aside { color: #a39a95; }
.tb-bar__icon { flex: none; }

.tb-bar__actions { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px var(--tb-line); }
.tb-bar__action { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; color: #f5f3ef; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color 120ms ease, color 120ms ease; }
.tb-bar__action .tb-bar__icon { color: #a39a95; transition: color 120ms ease; }
.tb-bar__action:hover { background: rgba(245, 243, 239, 0.1); color: #fff; }
.tb-bar__action:hover .tb-bar__icon { color: var(--tb-accent); }
.tb-bar__action:focus-visible { outline: 2px solid var(--tb-accent); outline-offset: 1px; }
.tb-bar__action--quiet { color: #cfc6c1; font-weight: 400; }
.tb-bar__divider { width: 1px; height: 16px; margin: 0 4px; background: var(--tb-line); }

@media (prefers-reduced-motion: reduce) {
  .tb-bar__action, .tb-bar__action .tb-bar__icon { transition: none; }
}

/* Narrow screens keep the mode, the client and the actions, with icons only. */
@media (max-width: 900px) {
  .tb-bar__aside { display: none; }
}
@media (max-width: 640px) {
  .tb-bar__inner { padding-top: 8px; padding-bottom: 8px; }
  .tb-bar__actions { width: 100%; justify-content: space-between; }
  .tb-bar__action span:not(.sr-only) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tb-bar__action { flex: 1; justify-content: center; padding: 0 8px; }
  .tb-bar__divider { display: none; }
}

.dot--ink { background: var(--paper); }

/* The teammates' client directory */
.directory { margin-top: 56px; }
.directory__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.directory__search { position: relative; flex: 1 1 320px; max-width: 420px; }
.directory__search-icon { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }
.directory__input { width: 100%; padding: 8px 32px 8px 26px; border: 0; background: none; font: inherit; font-size: 17px; color: var(--ink); }
.directory__input::placeholder { color: #8a817c; }
.directory__input:focus { outline: none; }
.directory__input::-webkit-search-cancel-button { -webkit-appearance: none; }
/* The / shortcut, shown until the search is in use. */
.directory__key { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 6px; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); pointer-events: none; }
.directory__search:focus-within .directory__key, .directory__input:not(:placeholder-shown) + .directory__key { display: none; }
.directory__summary { margin: 0; }
.directory__low { display: inline-flex; align-items: center; gap: 6px; color: var(--red-ink); }
.directory__hint { margin: 10px 0 0; }

.directory__table { width: 100%; margin-top: 20px; border-collapse: collapse; font-size: 14px; }
.directory__table thead th { padding: 0 16px 10px 0; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; text-align: left; color: var(--ink-faint); border-bottom: 1px solid var(--line); }
.directory__table td, .directory__table tbody th { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; text-align: left; font-weight: 400; }
.directory__row:hover { background: linear-gradient(90deg, transparent, var(--paper-deep) 8%, var(--paper-deep) 92%, transparent); }
.directory__client { width: 26%; }
.directory__client-link { font-family: var(--serif); font-size: 21px; line-height: 1.2; text-decoration: none; }
.directory__client-link:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.directory__tag { margin-left: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); }
.directory__projects { width: 36%; }
.directory__project { display: block; color: var(--ink-soft); text-decoration: none; line-height: 1.5; }
.directory__project:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.directory__leads { width: 20%; color: var(--ink-soft); }
.directory__rating { white-space: nowrap; }
.directory__rating .small { margin-left: 6px; }
.directory__empty { margin: 24px 0 0; }
.rating-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 999px; background: var(--green); vertical-align: 1px; }
.rating-dot--low { background: var(--red); }
.rating-dot--stale { background: var(--line-strong); }
.directory__low .rating-dot { margin-right: 0; }

/* On a phone, each client is a card: name, then projects, lead and rating. */
@media (max-width: 760px) {
  .directory__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .directory__table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .directory__table td, .directory__table tbody th { padding: 0; border: 0; width: auto; }
  .directory__client { grid-column: 1; }
  .directory__rating { grid-column: 2; grid-row: 1; text-align: right; }
  .directory__projects, .directory__leads { grid-column: 1 / -1; }
  .directory__leads { font-size: 13px; }
  .directory__row:hover { background: none; }
}

button:disabled, .button:disabled { opacity: 0.45; cursor: not-allowed; }
.directory__table tr[hidden] { display: none; }

