/* B1Xagi Sovereign Ascendant — Composer Checkbox & 3-Way Comparison Workbench — Calm Design */

.composer-ascendant-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: var(--b1x-text, #cbd5e1);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

:root[data-theme="light"] .composer-ascendant-check {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

.composer-ascendant-check:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

:root[data-theme="light"] .composer-ascendant-check:hover {
  background: rgba(0, 0, 0, 0.045);
  border-color: rgba(0, 0, 0, 0.14);
}

.composer-ascendant-check input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #059669;
  cursor: pointer;
}

.composer-ascendant-check.is-checked {
  border-color: rgba(16, 185, 129, 0.3) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #6ee7b7 !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .composer-ascendant-check.is-checked {
  border-color: rgba(16, 185, 129, 0.25) !important;
  background: rgba(16, 185, 129, 0.07) !important;
  color: #047857 !important;
  box-shadow: none !important;
}

.composer-ascendant-check .ascendant-gate-pill {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

:root[data-theme="light"] .composer-ascendant-check .ascendant-gate-pill {
  background: rgba(0, 0, 0, 0.05);
  color: #64748b;
}

.composer-ascendant-check.is-checked .ascendant-gate-pill {
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}

:root[data-theme="light"] .composer-ascendant-check.is-checked .ascendant-gate-pill {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

/* A flat, compact route option; retain the native checkbox and keyboard focus.
   Match the composer selector so its older pill styles cannot override this. */
:root[data-theme] #shell.unified-shell #composer .composer-ascendant-check,
:root[data-theme] #shell.unified-shell #composer .composer-ascendant-check:hover,
:root[data-theme] #shell.unified-shell #composer .composer-ascendant-check.is-checked {
  min-height: 24px;
  padding: 2px 4px!important;
  gap: 4px;
  border: 0!important;
  border-radius: 3px;
  background: transparent!important;
  box-shadow: none!important;
  color: var(--b1x-text, #cbd5e1)!important;
  font-size: 10px!important;
  font-weight: 400;
}
:root[data-theme] #shell.unified-shell #composer .composer-ascendant-check span:not(.ascendant-gate-pill) {
  display: inline!important;
}
:root[data-theme] #shell.unified-shell #composer .composer-ascendant-check .ascendant-gate-pill {
  display: none!important;
}
:root[data-theme] #shell.unified-shell #composer .composer-ascendant-check:has(input:focus-visible) {
  outline: 2px solid var(--b1x-text, #cbd5e1);
  outline-offset: 2px;
}
:root[data-theme] #shell.unified-shell #composer .composer-ascendant-check input[type="checkbox"] {
  width: 12px;
  height: 12px;
}

/* 3-Way Comparison Workbench (Sidebar Tab Surface) */
.ascendant-workbench {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 22px 42px;
  max-width: 1440px;
  margin: 0 auto;
  color: var(--b1x-text, #edf1ee);
}

.ascendant-wb-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(14, 116, 144, 0.08));
}

.ascendant-wb-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.ascendant-wb-header p {
  margin: 0;
  font-size: 13px;
  opacity: 0.85;
}

.ascendant-gate-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ascendant-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(6, 78, 59, 0.45);
  color: #6ee7b7;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

:root[data-theme="light"] .ascendant-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
  border-color: rgba(5, 150, 105, 0.3);
}

.ascendant-wb-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 22, 0.45);
}

:root[data-theme="light"] .ascendant-wb-controls {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(100, 116, 139, 0.25);
}

.ascendant-wb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.ascendant-wb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 220px;
}

.ascendant-wb-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.ascendant-wb-field select,
.ascendant-wb-field input,
.ascendant-wb-prompt {
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(10, 16, 15, 0.65);
  color: inherit;
  font-size: 13px;
  font-family: inherit;
}

:root[data-theme="light"] .ascendant-wb-field select,
:root[data-theme="light"] .ascendant-wb-field input,
:root[data-theme="light"] .ascendant-wb-prompt {
  background: #ffffff;
  color: #1e293b;
}

.ascendant-wb-prompt {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  box-sizing: border-box;
}

.ascendant-wb-run-btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid #10b981;
  background: linear-gradient(135deg, #059669, #0284c7);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.ascendant-wb-run-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ascendant-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ascendant-preset-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.ascendant-preset-btn:hover {
  border-color: #38bdf8;
}

/* Winner Banner */
.ascendant-winner-banner {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: rgba(6, 78, 59, 0.32);
  font-size: 13px;
  line-height: 1.45;
}

:root[data-theme="light"] .ascendant-winner-banner {
  background: rgba(16, 185, 129, 0.12);
}

/* Assessment Parameter Matrix Table */
.ascendant-matrix-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
}
:root[data-theme="light"] .ascendant-matrix-wrap {
  border-color: #c9d8d1;
}

.ascendant-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.ascendant-matrix-table th,
.ascendant-matrix-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.ascendant-matrix-table th {
  background: rgba(15, 23, 22, 0.75);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

:root[data-theme="light"] .ascendant-matrix-table th {
  background: #eef4f1;
  color: #0c1813;
  border-bottom-color: #c9d8d1;
}

:root[data-theme="light"] .ascendant-matrix-table td {
  color: #122019;
  border-bottom-color: #e1ebe6;
}

.ascendant-matrix-table td.is-winner-cell {
  font-weight: 700;
  color: #34d399;
}

:root[data-theme="light"] .ascendant-matrix-table td.is-winner-cell {
  color: #047857;
}

/* 3-Column Live Output Grid */
.ascendant-three-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1100px) {
  .ascendant-three-grid {
    grid-template-columns: 1fr;
  }
}

.ascendant-lane-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 22, 0.5);
  overflow: hidden;
}

:root[data-theme="light"] .ascendant-lane-card {
  background: #ffffff;
}

.ascendant-lane-card[data-lane="sovereign_ascendant"] {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.ascendant-lane-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(10, 16, 15, 0.45);
}

:root[data-theme="light"] .ascendant-lane-head {
  background: #f8fafc;
}

.ascendant-lane-head h3 {
  margin: 0 0 2px;
  font-size: 14px;
}

.ascendant-lane-head small {
  font-size: 11px;
  opacity: 0.78;
}

.ascendant-lane-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 11px;
}

.ascendant-kpi {
  display: flex;
  flex-direction: column;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.08);
}

.ascendant-kpi span {
  font-size: 9.5px;
  text-transform: uppercase;
  opacity: 0.72;
}

.ascendant-kpi strong {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.ascendant-lane-body {
  padding: 14px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: 460px;
}
