/* ═══════════════════════════════════════════════════════
   SERVICE OPS — Transition Canvas
════════════════════════════════════════════════════════ */

/* ── Inline legend in header ── */
.so-inline-legend {
  display: flex; align-items: center; gap: 14px;
}
.so-inline-key {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 500; color: var(--text-secondary);
  white-space: nowrap;
}
.so-legend-dot   { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-retain      { background: #22c55e; }
.dot-transform   { background: #6e3ff3; }
.dot-sunset      { background: #f87171; }
.dot-new         { background: #f97316; }
.so-header-divider { width: 0.5px; height: 18px; background: var(--border); }

/* ── Main canvas area — full width now ── */
.so-main {
  flex: 1; min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}
.so-page-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 0.5px solid var(--glass-border);
  flex-shrink: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  gap: 16px;
}
.so-state-pill {
  font-size: 9px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  letter-spacing: 0.04em; white-space: nowrap;
}
.current-pill { background: rgba(34,197,94,0.1); color: #15803d; border: 0.5px solid rgba(34,197,94,0.3); }
.future-pill  { background: rgba(110,63,243,0.1); color: #5b21b6; border: 0.5px solid rgba(110,63,243,0.3); }

/* ── Canvas: two cards + arrow ── */
.so-canvas {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 16px;
  overflow: hidden;
  background: transparent;
  min-height: 0;
}

/* ── State cards ── */
.so-state-card {
  flex: 1; min-width: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
}
.so-card-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: transparent;
  flex-shrink: 0;
}
.so-card-label {
  display: flex; align-items: center; gap-6px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; color: var(--text-primary);
  text-transform: uppercase; gap: 7px;
}
.so-card-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.so-card-meta { font-size: 9px; color: var(--text-tertiary); }

.so-card-body {
  padding: 10px 12px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  flex: 1; min-height: 0;
  overflow: hidden;
}

/* ── Tier sections (each is a grid quadrant) ── */
.so-tier-section {
  border: 0.5px solid var(--glass-border);
  border-top: 2px solid var(--tier-color, #e5e5e7);
  border-radius: 10px;
  overflow: hidden;
  background: var(--glass-bg-light);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.so-tier-header {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px 5px;
  background: transparent;
  border-bottom: none;
  flex-shrink: 0;
}

/* Scrollable area inside each tier quadrant */
.so-tier-categories {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
}
.so-tier-badge {
  font-size: 7.5px; font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--tier-color, #6b7280);
  white-space: nowrap; flex-shrink: 0;
}
.so-tier-label {
  font-size: 10px; font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0;
}

/* ── Category group ── */
.so-category {
  border: none;
  border-top: 0.5px solid var(--border);
}
.so-tier-categories .so-category:first-child {
  border-top: none;
}
.so-cat-header {
  font-size: 9px; font-weight: 600;
  color: var(--text-tertiary);
  padding: 6px 12px;
  background: transparent;
  letter-spacing: 0.01em;
  display: flex; align-items: center;
  text-transform: uppercase;
}
.so-bubbles {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 6px 12px 10px;
}

/* ── Service chips (name only, no code) ── */
.so-bubble {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  border: 0.5px solid rgba(255,255,255,0.65);
  cursor: pointer;
  position: relative;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 150px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.9);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.so-bubble:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  z-index: 5;
}
.so-bubble.selected {
  box-shadow: 0 0 0 1.5px var(--accent);
  z-index: 5;
}
/* Peer highlight — linked counterpart in the other state card */
.so-bubble.selected-peer {
  box-shadow: 0 0 0 1.5px var(--accent);
  opacity: 0.55;
  z-index: 4;
}
.so-bubble-sym { display: none; }
.so-bubble-name {
  font-size: 10px; font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Status-based chip borders — glass tint */
.so-bubble.status-retain   { border-color: rgba(34,197,94,0.35);  background: rgba(34,197,94,0.06); }
.so-bubble.status-transform{ border-color: rgba(110,63,243,0.30); background: rgba(110,63,243,0.05); }
.so-bubble.status-sunset   { border-color: rgba(248,113,113,0.35);background: rgba(248,113,113,0.06); }
.so-bubble.status-new      { border-color: rgba(249,115,22,0.30); background: rgba(249,115,22,0.05); }

/* 4px status dot sits left of the text as a subtle color hint */
.so-bubble::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 6px;
}
.so-bubble.status-retain::before    { background: #22c55e; }
.so-bubble.status-transform::before { background: #6e3ff3; }
.so-bubble.status-sunset::before    { background: #f87171; }
.so-bubble.status-new::before       { background: #f97316; }
/* remove old top-right dot */
.so-bubble::after { display: none; }

/* ── Arrow column ── */
.so-arrow-col {
  width: 80px; flex-shrink: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  align-self: center;
}
.so-arrow-track {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
}
.so-arrow-line {
  width: 1.5px; height: 36px;
  background: linear-gradient(to bottom, transparent, rgba(161,0,255,0.25), transparent);
}

/* Accenture logo mark */
.so-acc-logo {
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 2px 12px rgba(161,0,255,0.35));
  user-select: none;
}

.so-arrow-label {
  font-size: 7px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--text-tertiary);
  text-transform: uppercase; text-align: center;
  line-height: 1.5;
}

/* ── Inspector extras ── */
.so-insp-sym-card {
  width: 60px; height: 60px; flex-shrink: 0;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.so-insp-sym {
  font-size: 16px; font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent);
}

.so-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.so-meta-item {
  background: var(--bg-secondary);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.so-meta-val {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
  line-height: 1.3;
}

/* ── AI Agent card in inspector ── */
.so-agent-card {
  border-radius: 10px;
  border: 0.5px solid var(--border);
  overflow: hidden;
}
.so-agent-present {
  border-color: rgba(110,63,243,0.3);
  background: rgba(110,63,243,0.04);
}
.so-agent-absent {
  background: var(--bg-secondary);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 8px;
  color: var(--text-tertiary); font-size: 11px;
}
.so-agent-body {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
}
.so-agent-sym {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 8px;
  background: rgba(110,63,243,0.1);
  border: 1px solid rgba(110,63,243,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
  font-family: var(--font-mono); color: var(--accent);
}
.so-agent-info { flex: 1; min-width: 0; }
.so-agent-name {
  font-size: 12px; font-weight: 700;
  color: var(--text-primary); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.so-agent-code {
  font-size: 9px; color: var(--text-tertiary);
  font-family: var(--font-mono); margin-top: 2px;
}
.so-agent-footer {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-top: 0.5px solid rgba(110,63,243,0.15);
  background: rgba(110,63,243,0.03);
}
.so-agent-tier {
  font-size: 8px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(110,63,243,0.12);
  color: #5b21b6; border: 0.5px solid rgba(110,63,243,0.25);
  letter-spacing: 0.04em;
}
.so-agent-sync {
  display: flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 600;
  margin-left: auto;
}
.so-agent-sync.synced   { color: #15803d; }
.so-agent-sync.pilot    { color: #a35200; }
.so-sync-dot {
  width: 5px; height: 5px; border-radius: 50%;
}
.synced .so-sync-dot { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,0.2); }
.pilot  .so-sync-dot { background: #ff9f0a; box-shadow: 0 0 0 2px rgba(255,159,10,0.2); }

/* ── Inspector state cards ── */
.so-insp-state-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.so-insp-state-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.so-insp-state-card {
  border-radius: 10px;
  border: 0.5px solid var(--border);
  padding: 12px 14px;
  background: var(--bg-secondary);
}
.so-insp-state-current {
  border-left: 3px solid rgba(34,197,94,0.5);
  background: rgba(34,197,94,0.04);
}
.so-insp-state-future {
  border-left: 3px solid rgba(110,63,243,0.5);
  background: rgba(110,63,243,0.04);
}
.so-insp-state-future.state-sunset {
  border-left-color: rgba(248,113,113,0.5);
  background: rgba(248,113,113,0.04);
}
.so-insp-state-name {
  font-size: 13px; font-weight: 700;
  color: var(--text-primary); line-height: 1.3;
  margin-bottom: 5px;
}
.so-insp-state-meta {
  font-size: 10px; color: var(--text-secondary); line-height: 1.4;
}

/* Transition arrow between the two cards */
.so-insp-transition-arrow {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
  margin: 8px 0;
}
.so-insp-arrow-line {
  width: 1.5px; height: 14px;
  background: linear-gradient(to bottom, rgba(110,63,243,0.25), rgba(110,63,243,0.15));
}
.so-insp-arrow-icon {
  font-size: 13px; color: var(--accent);
  line-height: 1;
}

.so-status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-retain    { background: rgba(34,197,94,0.12);  color: #15803d; border: 0.5px solid rgba(34,197,94,0.3); }
.badge-transform { background: rgba(110,63,243,0.12); color: #5b21b6; border: 0.5px solid rgba(110,63,243,0.3); }
.badge-sunset    { background: rgba(248,113,113,0.12); color: #991b1b; border: 0.5px solid rgba(248,113,113,0.3); }
.badge-new       { background: rgba(249,115,22,0.12); color: #9a3412; border: 0.5px solid rgba(249,115,22,0.3); }

/* ── LOB section ── */
.so-lob-section {
  background: var(--bg-secondary);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px 12px;
}
.so-lob-pills {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.so-lob-pill {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 6px;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(110,63,243,0.08);
  color: #5b21b6;
  border: 0.5px solid rgba(110,63,243,0.2);
  white-space: nowrap;
}
