/* MyBlue routing canvas — shared by admin + tenant portals */

.rc-shell {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .rc-shell {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    align-items: start;
  }
  .rc-shell.rc-shell-admin {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  }
}

.rc-canvas {
  position: relative;
  border-radius: 1.25rem;
  padding: 1.5rem 1.25rem 2rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 137, 232, 0.14), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f9 100%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.rc-inbound {
  border-radius: 999px;
  padding: 0.65rem 1.35rem;
  background: linear-gradient(135deg, #4f74d4, #6389e8);
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 28px -12px rgba(79, 116, 212, 0.65);
}

.rc-inbound .rc-inbound-kicker {
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.rc-inbound .rc-inbound-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.rc-chain {
  width: 100%;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rc-node {
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.35);
  padding: 0.9rem 1rem;
  transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.15s ease;
}

.rc-node:hover {
  border-color: rgba(99, 137, 232, 0.45);
}

.rc-node-advanced {
  border-color: rgba(124, 58, 237, 0.35);
  background: linear-gradient(180deg, #faf5ff 0%, #fff 70%);
}

.rc-node-ring {
  border-color: rgba(99, 137, 232, 0.4);
}

.rc-ghost {
  opacity: 0.45;
}

.rc-dragging {
  transform: scale(1.02);
  box-shadow: 0 16px 40px -12px rgba(99, 137, 232, 0.35);
  z-index: 5;
}

.rc-drag-handle {
  cursor: grab;
  touch-action: none;
  color: #c5cde8;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0 0.2rem;
  user-select: none;
}

.rc-drag-handle:active {
  cursor: grabbing;
}

.rc-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #94a3b8;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  padding: 0.15rem 0;
}

.rc-connector-arrow {
  font-size: 0.85rem;
  line-height: 1;
  color: #6389e8;
  opacity: 0.75;
}

.rc-end {
  border-radius: 0.75rem;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  padding: 0.55rem 1rem;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  max-width: 34rem;
  width: 100%;
}

.rc-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #64748b;
  max-width: 22rem;
}

.rc-empty strong {
  display: block;
  color: #0f172a;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.rc-palette {
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1rem;
  position: sticky;
  top: 0.75rem;
}

.rc-palette-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.65rem;
}

.rc-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #f8fafc;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.45rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.rc-chip:hover:not(:disabled) {
  background: #edf2fc;
  border-color: rgba(99, 137, 232, 0.45);
  transform: translateY(-1px);
}

.rc-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rc-chip-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.rc-chip-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
}

.rc-chip-hint {
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.rc-var-pill {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.65rem;
  line-height: 1.2;
  padding: 0.2rem 0.45rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.rc-var-pill:hover {
  background: #e2e8f0;
  border-color: rgba(99, 137, 232, 0.55);
  color: #1e293b;
}

.rc-chip-adv {
  background: #faf5ff;
  border-color: rgba(124, 58, 237, 0.25);
}

.rc-badge-adv {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6d28d9;
  background: #ede9fe;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.rc-did-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.rc-did-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #edf2fc;
  color: #4f74d4;
  border: 1px solid rgba(99, 137, 232, 0.25);
}

.rc-did-chip button {
  margin-left: 0.25rem;
  opacity: 0.7;
}

.rc-readonly-banner {
  border-radius: 0.85rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.8rem;
  padding: 0.75rem 1rem;
}

.rc-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.rc-field-row input,
.rc-field-row select,
.rc-field-row textarea {
  font-size: 0.75rem;
}

.rc-ring-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: #4f74d4;
  background: #edf2fc;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  margin-top: 0.35rem;
}

.rc-branch-list {
  margin-top: 0.5rem;
  padding-left: 0.5rem;
  border-left: 2px solid #ddd6fe;
}

.rc-branch-item {
  font-size: 0.7rem;
  color: #5b21b6;
  padding: 0.25rem 0;
}

.rc-json-panel textarea {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  padding: 0.75rem;
  background: #f8fafc;
}
