/* PAGE SPACING FOR THIS SECTION */
.integration {
  margin-top: 0px;
  padding: 40px 20px;
}

/* TITLES */
.int-title {
  text-align: center;
  font-size: 2rem;
  color: var(--neon-cyan);
}

.int-subtitle {
  text-align: center;
  opacity: 0.8;
  margin-bottom: 40px;
}

/* MAIN LAYOUT: MAP + SANDBOX */
.int-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 32px;
}

/* CARDS */
.int-map-card,
.int-sandbox-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,255,255,0.2);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 0 25px rgba(0,0,0,0.5);
}

.panel-title {
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: var(--neon-cyan);
}

/* MAP WRAPPER */
.int-map-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 auto 10px;
}

/* MAP */
.int-map {
  position: relative;
  width: 420px;
  height: 420px;   /* must match width */
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,255,0.15) 0%, rgba(0,0,0,0.9) 60%);
}

/* NODES */
.node {
  position: absolute;
  padding: 10px 14px;
  background: rgba(0,255,255,0.12);
  border: 1px solid rgba(0,255,255,0.6);
  border-radius: 8px;
  cursor: default;
  text-align: center;
  color: white;
  font-size: 0.85rem;
  box-shadow: 0 0 10px rgba(0,255,255,0.3);
}

/* CENTER NODE */
.node.core {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,255,255,0.25);
  font-weight: bold;
}

.small {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* CIRCULAR POSITIONS */
/* Perfect circular positions */
.n1 { top: 0%; left: 50%; transform: translate(-50%, -50%); }
.n2 { top: 18%; left: 82%; transform: translate(-50%, -50%); }
.n3 { top: 50%; left: 100%; transform: translate(-50%, -50%); }
.n4 { top: 82%; left: 82%; transform: translate(-50%, -50%); }
.n5 { top: 100%; left: 50%; transform: translate(-50%, -50%); }
.n6 { top: 82%; left: 18%; transform: translate(-50%, -50%); }
.n7 { top: 50%; left: 0%; transform: translate(-50%, -50%); }
.n8 { top: 18%; left: 18%; transform: translate(-50%, -50%); }

.map-hint {
  margin-top: 30px;
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
}


/* SANDBOX CONTROLS */
.sandbox-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.sandbox-controls .field:nth-child(3) {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 4px;
  opacity: 0.8;
}

.field select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0,255,255,0.5);
  background: #05070a;
  color: white;
  font-size: 0.85rem;
}

.sandbox-btn {
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* SANDBOX OUTPUT */
.sandbox-output {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-top: 10px;
}

.sandbox-steps,
.sandbox-payload {
  background: rgba(0,0,0,0.6);
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(0,255,255,0.2);
}

.sandbox-steps h4,
.sandbox-payload h4 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--neon-cyan);
}

#flowSteps {
  font-size: 0.85rem;
  padding-left: 18px;
}

#payloadBox {
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}

/* EXPLAINER */
.sandbox-explainer {
  margin-top: 14px;
  background: rgba(0,0,0,0.6);
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(0,255,255,0.2);
}

.sandbox-explainer h4 {
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--neon-cyan);
}

.sandbox-explainer p {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* STEP ANIMATION */
.step-animate {
  opacity: 0;
  transform: translateX(-4px);
  animation: stepFadeIn 0.35s forwards;
}

@keyframes stepFadeIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .int-layout {
    grid-template-columns: 1fr;
  }

  .int-map {
    width: 320px;
    height: 300px;
  }

  .sandbox-output {
    grid-template-columns: 1fr;
  }
}



.node {
  transition: 0.25s ease;
  opacity: 1;
}

.node.dim {
  opacity: 0.25;
}

.node.active {
  opacity: 1;
  border-color: #6ee7ff;
  box-shadow: 0 0 18px rgba(110, 231, 255, 0.9);
}

.line {
  stroke: rgba(255,255,255,0.25);
  transition: 0.25s ease;
}

.line.dim {
  opacity: 0.1;
}

.line.active {
  stroke: #6ee7ff;
  stroke-width: 3;
  filter: drop-shadow(0 0 6px #6ee7ff);
}

.flow-dot {
  fill: #6ee7ff;
  r: 4;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.flow-dot.active {
  opacity: 1;
}
