/* ============================================================
   Org Chart Prototype — Black Ink Intranet
   Option D: Focused pivot view (default) + Indented list (toggle)
   ============================================================ */

.oc-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 80px;
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, sans-serif);
}

.oc-banner {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  color: #6D4C00;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 24px;
}
.oc-banner strong { color: #4E3700; }

/* ── Toolbar ────────────────────────────────────────── */
.oc-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.oc-toolbar__search {
  flex: 1;
  position: relative;
  max-width: 480px;
}

.oc-toolbar__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #999;
  pointer-events: none;
}

#oc-search {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  font-size: 14px;
  background: #FAFAFA;
  transition: border-color 150ms ease, background 150ms ease;
}
#oc-search:focus {
  outline: none;
  border-color: #333;
  background: #fff;
}

.oc-toolbar__actions {
  display: flex;
  gap: 8px;
}

.oc-toolbar__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Search results dropdown */
.oc-search-results {
  position: relative;
  margin-top: 4px;
  max-width: 480px;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-height: 320px;
  overflow-y: auto;
  z-index: 10;
}

.oc-search-results__item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #F0F0F0;
  font-size: 14px;
}
.oc-search-results__item:last-child { border-bottom: none; }
.oc-search-results__item:hover,
.oc-search-results__item:focus { background: #F5F5F5; }

.oc-search-results__name { font-weight: 600; color: #111; }
.oc-search-results__title { font-size: 12px; color: #666; }
.oc-search-results__empty { padding: 16px; color: #999; font-size: 13px; text-align: center; }

/* ── Pivot view ─────────────────────────────────────── */
.oc-pivot {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.oc-loading,
.oc-empty {
  padding: 48px 24px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* Breadcrumb */
.oc-breadcrumb {
  width: 100%;
  margin-bottom: 32px;
  font-size: 13px;
  color: #666;
  min-height: 20px;
}
.oc-breadcrumb__item {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #666;
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 150ms ease;
}
.oc-breadcrumb__item:hover { text-decoration-color: currentColor; }
.oc-breadcrumb__item--current {
  color: #111;
  font-weight: 600;
  cursor: default;
  text-decoration: none;
}
.oc-breadcrumb__sep {
  margin: 0 8px;
  color: #BBB;
}

/* Section labels */
.oc-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  margin: 0 0 12px;
  text-align: center;
}

/* Manager section above */
.oc-manager-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}

/* Connector arrows */
.oc-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
}
.oc-connector svg {
  width: 24px;
  height: 24px;
  color: #BBB;
}
.oc-connector--small svg { width: 16px; height: 16px; }

/* Cards */
.oc-card {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  padding: 14px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  user-select: none;
}
.oc-card:hover {
  border-color: #999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.oc-card:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.oc-card__name {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin: 0 0 2px;
}
.oc-card__title {
  font-size: 12px;
  color: #666;
  margin: 0 0 4px;
}
.oc-card__meta {
  font-size: 11px;
  color: #999;
  margin: 0;
}

/* Focused (the big central card) */
.oc-card--focused {
  padding: 24px 32px;
  border-width: 2px;
  border-color: #111;
  min-width: 280px;
  cursor: default;
  background: #fff;
}
.oc-card--focused:hover { box-shadow: none; }
.oc-card--focused .oc-card__name { font-size: 20px; }
.oc-card--focused .oc-card__title { font-size: 14px; margin-bottom: 6px; }
.oc-card--focused .oc-card__meta { font-size: 12px; }

/* Manager card (smaller, above) */
.oc-card--manager {
  min-width: 200px;
  padding: 10px 16px;
}
.oc-card--manager .oc-card__name { font-size: 13px; }
.oc-card--manager .oc-card__title { font-size: 11px; }

/* You-are-here badge */
.oc-card__me-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: #111;
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  vertical-align: middle;
}

/* Rows of peer / direct-report cards */
.oc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 100%;
}

.oc-peers-section,
.oc-reports-section {
  margin-top: 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Peer/report card sizing */
.oc-row .oc-card {
  min-width: 160px;
  max-width: 220px;
  padding: 10px 14px;
}

/* ── List view (Option B) ───────────────────────────── */
.oc-list {
  margin-top: 24px;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 16px 8px;
}

.oc-list__toolbar {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 8px;
}

.oc-list__tree {
  padding: 8px;
}

.oc-list__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 100ms ease;
}
.oc-list__row:hover { background: #fff; }

.oc-list__chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #999;
  transition: transform 150ms ease;
  cursor: pointer;
}
.oc-list__chevron--expanded { transform: rotate(90deg); }
.oc-list__chevron--leaf { visibility: hidden; }

.oc-list__name {
  font-weight: 600;
  color: #111;
}
.oc-list__title {
  color: #666;
  margin-left: 4px;
}
.oc-list__count {
  margin-left: auto;
  padding: 2px 8px;
  background: #EEE;
  border-radius: 10px;
  font-size: 11px;
  color: #666;
}

.oc-list__children {
  margin-left: 24px;
  border-left: 1px solid #E0E0E0;
  padding-left: 4px;
}

.oc-list__match {
  background: #FFF8E1;
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .oc-page { padding: 16px 12px 60px; }
  .oc-toolbar { flex-direction: column; align-items: stretch; }
  .oc-toolbar__search { max-width: none; }
  .oc-toolbar__actions { justify-content: space-between; }
  .oc-card--focused { padding: 18px 20px; min-width: 0; width: 100%; }
  .oc-row .oc-card { min-width: 140px; }
}
