/* The control plane and both request paths share the existing demo state. */
.failover-visual.failover-topology {
  min-width: 0;
  width: 100%;
  padding: 22px;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 50%, #234b7350, transparent 70%), #152b46;
  box-shadow: inset 0 1px 0 #b9dcff08;
}
.fabric-probes {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.fabric-probes > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #42658a65;
  border-radius: 5px;
  color: #b3cce8;
  background: #26415c60;
  font-size: 10px;
  white-space: nowrap;
}
.fabric-probes i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9aceff;
  box-shadow: 0 0 6px #79bfff;
  animation: fabric-probe 3s ease-in-out infinite;
}
.fabric-probes > span:nth-child(2) i {
  animation-delay: -1s;
}
.fabric-probes > span:nth-child(3) i {
  animation-delay: -2s;
}
.fabric-controller {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 10px 14px;
  margin-top: 18px;
  border: 1px solid #4c7dad88;
  border-radius: 7px;
  background: linear-gradient(100deg, #264b70, #203a59);
}
.fabric-controller::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -19px;
  height: 18px;
  border-left: 1px dashed #608bb9;
}
.fabric-controller > .icon {
  width: 19px;
  height: 19px;
  color: #a1d4ff;
}
.fabric-controller > div {
  min-width: 0;
}
.fabric-controller strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #d9eaff;
}
.fabric-controller div > span {
  display: block;
  margin-top: 3px;
  font: 8px var(--mono);
  color: #8eadce;
}
.fabric-controller-light {
  width: 6px;
  height: 6px;
  margin-left: auto;
  flex-shrink: 0;
  background: #87c5ff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #86bbff12;
}
.fabric-map {
  position: relative;
  display: grid;
  grid-template-columns: 22% 40% 22%;
  grid-template-rows: 82px 34px 82px;
  justify-content: space-between;
  align-items: center;
  padding-block: 6px;
}
.fabric-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.fabric-wire,
.fabric-control-wire,
.fabric-packet {
  fill: none;
  vector-effect: non-scaling-stroke;
}
.fabric-wire {
  stroke: #55738f;
  stroke-width: 1.2;
  opacity: 0.45;
  transition:
    stroke 0.35s,
    opacity 0.35s;
}
.fabric-wire-backup {
  stroke-dasharray: 4 5;
}
.fabric-control-wire {
  stroke: #688eb6;
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.5;
}
.fabric-packet {
  stroke: #a8d9ff;
  stroke-width: 2.5;
  stroke-dasharray: 5 45;
  stroke-linecap: round;
  opacity: 0;
  filter: drop-shadow(0 0 3px #62afff);
  animation: fabric-packet 3.6s linear infinite;
}
.fabric-packet-backup {
  stroke: #9ae9e8;
  filter: drop-shadow(0 0 3px #68dce2);
}
.fabric-endpoint {
  position: relative;
  z-index: 1;
  text-align: center;
  align-self: center;
}
.fabric-client {
  grid-column: 1;
  grid-row: 1 / 4;
}
.fabric-edge {
  grid-column: 3;
  grid-row: 1 / 4;
  transform: translateY(14px);
}
.fabric-endpoint > span {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin: auto auto 7px;
  border: 1px solid #648cb8;
  background: #233e60;
  border-radius: 10px;
  box-shadow: 0 5px 14px #08182c80;
}
.fabric-endpoint .icon {
  color: #acd4ff;
  width: 22px;
  height: 22px;
}
.fabric-endpoint > strong {
  display: block;
  color: #bed8f3;
  font: 10px var(--mono);
}
.fabric-endpoint > small {
  display: block;
  margin-top: 4px;
  color: #7996b5;
  font-size: 9px;
}
.fabric-origin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
  color: #8eaccd;
  font-size: 9px;
}
.fabric-origin .icon {
  width: 12px;
  height: 12px;
}
.fabric-domain {
  position: relative;
  grid-column: 2;
  border: 1px solid #5e82a775;
  padding: 9px 5px;
  border-radius: 8px;
  text-align: center;
  background: #1d3552;
  transition:
    background 0.35s,
    border-color 0.35s,
    box-shadow 0.35s;
}
.fabric-domain-primary {
  grid-row: 1;
}
.fabric-domain-backup {
  grid-row: 3;
}
.fabric-domain > span {
  display: block;
  color: #81a3c6;
  font: 7px var(--mono);
  letter-spacing: 0.5px;
}
.fabric-domain > strong {
  display: block;
  color: #dcecff;
  font: 12px var(--mono);
  margin-block: 6px;
}
.fabric-domain > small {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #8cabc9;
  font-size: 9px;
}
.fabric-domain i {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}
.fabric-policy-label {
  grid-column: 2;
  grid-row: 2;
  z-index: 1;
  justify-self: center;
  color: #759bc2;
  background: #1a324e;
  padding: 0 6px;
  font-size: 9px;
}
.fabric-policy-label span {
  color: #93bfee;
  margin-left: 3px;
}
.fabric-current-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 39px;
  padding: 9px 12px;
  border: 1px solid #50749a4d;
  background: #26476840;
  border-radius: 6px;
}
.fabric-current-route > span {
  font-size: 10px;
  color: #8dabc9;
}
.fabric-current-route > strong {
  color: #bddeff;
  font: 11px var(--mono);
}
.fabric-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
}
.fabric-stages li {
  border-top: 2px solid #42607e65;
  padding-top: 8px;
  text-align: center;
  font-size: 9px;
  color: #7994b3;
  transition:
    border-color 0.35s,
    color 0.35s;
}
.fabric-stages li > span {
  font: 8px var(--mono);
  margin-right: 5px;
  opacity: 0.7;
}
.failover-topology .workflow-footnote {
  margin-top: 14px;
  padding-top: 10px;
}

#panel-failover[data-state="normal"] .fabric-domain-primary {
  background: #264b70;
  border-color: #7ab8ee;
  box-shadow: 0 0 22px #499dff14;
}
#panel-failover[data-state="normal"] .fabric-wire-primary {
  stroke: #8ebce9;
  opacity: 0.8;
}
#panel-failover[data-state="normal"] .fabric-packet-primary {
  opacity: 1;
}
#panel-failover[data-state="normal"] .fabric-domain-primary small {
  color: #b8dcff;
}
#panel-failover[data-state="detected"] .fabric-domain-primary {
  border-color: #d4a56a;
  background: #584535;
  box-shadow: 0 0 20px #e0ad6418;
}
#panel-failover[data-state="detected"] .fabric-domain-primary small {
  color: #efc690;
}
#panel-failover[data-state="detected"] .fabric-wire-primary {
  stroke: #daab72;
  stroke-dasharray: 3 5;
  opacity: 0.7;
}
#panel-failover[data-state="detected"] .fabric-controller-light {
  background: #e4b475;
  box-shadow: 0 0 0 4px #e4b47516;
}
#panel-failover[data-state="detected"] .fabric-stages li:first-child {
  border-color: #dfb071;
  color: #eac391;
}
#panel-failover[data-state="switching"] .fabric-domain-primary,
#panel-failover[data-state="recovered"] .fabric-domain-primary {
  opacity: 0.5;
}
#panel-failover[data-state="switching"] .fabric-domain-backup {
  background: #285478;
  border-color: #98cfff;
  box-shadow: 0 0 20px #77bfff20;
}
#panel-failover[data-state="switching"] .fabric-control-wire {
  opacity: 1;
  stroke: #a6d7ff;
  animation: fabric-config 1.4s linear infinite;
}
#panel-failover[data-state="switching"] .fabric-stages li:nth-child(-n + 3) {
  border-color: #8ac7ff;
  color: #b7d9fa;
}
#panel-failover[data-state="switching"] .fabric-controller-light {
  animation: fabric-probe 0.8s ease-in-out infinite;
}
#panel-failover[data-state="recovered"] .fabric-domain-backup {
  border-color: #8bd3de;
  background: #214957;
  box-shadow: 0 0 25px #75d9e21a;
}
#panel-failover[data-state="recovered"] .fabric-domain-backup small {
  color: #abe8ed;
}
#panel-failover[data-state="recovered"] .fabric-wire-backup {
  stroke: #87cdd8;
  stroke-dasharray: none;
  opacity: 0.8;
}
#panel-failover[data-state="recovered"] .fabric-packet-backup {
  opacity: 1;
}
#panel-failover[data-state="recovered"] .fabric-stages li {
  border-color: #73b3c2;
  color: #a1d5df;
}
#panel-failover[data-state="recovered"] .fabric-current-route > strong {
  color: #9fe5e8;
}
@keyframes fabric-packet {
  to {
    stroke-dashoffset: -100;
  }
}
@keyframes fabric-config {
  to {
    stroke-dashoffset: -18;
  }
}
@keyframes fabric-probe {
  50% {
    opacity: 0.35;
    box-shadow: 0 0 0 3px #8bc6ff10;
  }
}
@media (min-width: 700px) {
  #panel-failover {
    grid-template-columns: 0.85fr 1.15fr;
  }
}
@media (max-width: 1199px) {
  .failover-visual.failover-topology {
    padding: 16px;
  }
  .fabric-probes {
    gap: 5px;
  }
  .fabric-probes > span {
    padding-inline: 6px;
    font-size: 9px;
  }
  .fabric-domain > strong {
    font-size: 10px;
  }
  .fabric-current-route {
    padding-inline: 8px;
  }
  .fabric-current-route > strong {
    font-size: 9px;
  }
  .fabric-stages {
    gap: 5px;
  }
  .fabric-stages li {
    font-size: 8px;
  }
  .fabric-stages li > span {
    display: block;
    margin: 0 0 3px;
  }
}
@media (max-width: 699px) {
  .fabric-controller {
    padding-inline: 9px;
    gap: 7px;
  }
  .fabric-controller div > span {
    font-size: 7px;
  }
  .fabric-endpoint > span {
    width: 35px;
    height: 35px;
    border-radius: 8px;
  }
  .fabric-endpoint .icon {
    width: 18px;
    height: 18px;
  }
  .fabric-endpoint > strong {
    font-size: 8px;
  }
  .fabric-domain > span {
    font-size: 6px;
    letter-spacing: 0;
  }
  .fabric-domain > strong {
    font-size: 9px;
  }
  .fabric-current-route > span {
    font-size: 9px;
  }
  .failover-topology .visual-topline {
    letter-spacing: 0.2px;
    font-size: 7px;
  }
  .fabric-probes {
    gap: 4px;
  }
  .fabric-probes > span {
    padding: 5px;
    gap: 4px;
    font-size: 8px;
  }
}
