/* ==========================================================================
   Integration Adapters — page-specific styles
   Loaded after styles.css. Covers the two interactive flow explorers.
   ========================================================================== */

/* Cards on this page stack vertically rather than sitting in a grid. */
.adapters .card {
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Flow strips (the "A → B → C" rows above each explorer)
   -------------------------------------------------------------------------- */
.inbound-flow,
.flow-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.flow-row {
  gap: 6px;
  margin-bottom: 10px;
}

.flow-arrow {
  display: flex;
  align-items: center;
  color: #8ca2c5;
}

.flow-hint {
  margin-left: 4px;
  color: var(--dim);
  font-size: 12px;
  font-style: italic;
}

.inbound-node,
.flow-node {
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--surface-deep);
  color: #d9e7ff;
}

.flow-node {
  padding: 9px 16px;
  border-color: transparent;
}

.inbound-node.operator {
  background: rgba(51, 80, 137, 0.28);
  color: #d3e7ff;
}

.inbound-node.adapter,
.node-engine {
  background: rgba(15, 110, 86, 0.25);
  border-color: rgba(93, 202, 165, 0.6);
  color: #c9ffef;
}

.inbound-node.canonical,
.node-play {
  background: rgba(96, 87, 255, 0.2);
  border-color: rgba(175, 169, 236, 0.7);
  color: #ddd7ff;
}

.node-reward {
  background: rgba(250, 238, 218, 0.18);
  border-color: rgba(239, 159, 39, 0.55);
  color: #ffe0ab;
}

.stage-list {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.93rem;
}

.stage-list li {
  margin-bottom: 5px;
}

/* --------------------------------------------------------------------------
   Selectable route / format cards
   -------------------------------------------------------------------------- */
.inbound-branches,
.branches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.inbound-card,
.branch {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(7, 18, 34, 0.62);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.inbound-card:hover,
.branch:hover {
  border-color: #4e9fe3;
  box-shadow: 0 0 0 2px rgba(78, 159, 227, 0.2);
}

.inbound-card.active,
.branch.active {
  border-color: #72ccff;
  box-shadow: 0 0 0 2px rgba(114, 204, 255, 0.35);
}

.inbound-header,
.branch-header {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
}

.inbound-header {
  background: rgba(62, 137, 214, 0.22);
  color: #cbe9ff;
}

.b-giftcard .branch-header {
  background: rgba(62, 137, 214, 0.22);
  color: #cbe9ff;
}

.b-wallet .branch-header {
  background: rgba(15, 110, 86, 0.25);
  color: #c9ffef;
}

.b-spins .branch-header {
  background: rgba(133, 79, 11, 0.27);
  color: #ffe0ab;
}

.b-retail .branch-header {
  background: rgba(153, 60, 29, 0.26);
  color: #ffd1c3;
}

.inbound-meta {
  padding: 8px 12px 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.branch-steps {
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bstep {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.bstep-dot {
  width: 5px;
  height: 5px;
  margin-top: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Expanded detail panels
   -------------------------------------------------------------------------- */
.inbound-detail,
.detail {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-deep);
  overflow: hidden;
  display: none;
}

.inbound-detail.open,
.detail.open {
  display: block;
}

.inbound-detail-grid,
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.inbound-main,
.detail-main {
  padding: 20px 22px;
  border-right: 1px solid var(--border);
}

.inbound-side,
.detail-side {
  padding: 20px 22px;
  background: rgba(9, 22, 42, 0.72);
}

.inbound-label,
.detail-eyebrow {
  margin-bottom: 6px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.inbound-title,
.detail-title {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.inbound-copy,
.detail-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.detail-desc {
  margin-bottom: 16px;
}

.inbound-code {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(6, 16, 30, 0.85);
  overflow-x: auto;
  color: #c6e7ff;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
}

.dstep {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.dstep-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.outcome-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.outcome-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.outcome-check {
  margin-top: -1px;
  color: #8be4c8;
  font-size: 13px;
  flex-shrink: 0;
}

.inbound-hint,
.hint {
  padding: 10px 0 2px;
  color: var(--dim);
  font-size: 12px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1020px) {
  .inbound-branches,
  .branches {
    grid-template-columns: repeat(2, 1fr);
  }

  .inbound-detail-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .inbound-main,
  .detail-main {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 520px) {
  .inbound-branches,
  .branches {
    grid-template-columns: 1fr;
  }
}
