/* Womarkt OS — Blazor circuit reconnect HUD overlay */
#components-reconnect-modal,
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
  display: none !important;
  visibility: hidden !important;
}

#blazor-loading,
.blazor-loading {
  display: none !important;
}

.circuit-reconnect-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.circuit-reconnect-overlay.circuit-reconnect--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.circuit-reconnect-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 172, 172, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 172, 172, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  animation: circuit-grid-pulse 3s ease-in-out infinite;
}

@keyframes circuit-grid-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.circuit-reconnect-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: min(720px, 94vw);
  padding: 0 16px;
}

.circuit-reconnect-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.circuit-reconnect-logo {
  max-height: 44px;
  filter: drop-shadow(0 0 12px rgba(0, 212, 170, 0.45));
  animation: circuit-logo-pulse 2s ease-in-out infinite;
}

@keyframes circuit-logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.3)); }
  50% { filter: drop-shadow(0 0 18px rgba(0, 212, 170, 0.55)); }
}

.circuit-reconnect-brand {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8eaed;
}

.circuit-reconnect-frame {
  position: relative;
  width: 100%;
  padding: 32px 24px 24px;
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid rgba(0, 172, 172, 0.22);
  backdrop-filter: blur(10px);
}

.circuit-reconnect-bracket {
  position: absolute;
  width: 16px;
  height: 16px;
}

.circuit-reconnect-bracket--tl { top: -1px; left: -1px; border-top: 2px solid #00d4aa; border-left: 2px solid #00d4aa; }
.circuit-reconnect-bracket--tr { top: -1px; right: -1px; border-top: 2px solid #00d4aa; border-right: 2px solid #00d4aa; }
.circuit-reconnect-bracket--bl { bottom: -1px; left: -1px; border-bottom: 2px solid #00d4aa; border-left: 2px solid #00d4aa; }
.circuit-reconnect-bracket--br { bottom: -1px; right: -1px; border-bottom: 2px solid #00d4aa; border-right: 2px solid #00d4aa; }

.circuit-reconnect-module {
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #00d4aa;
  margin-bottom: 24px;
}

.circuit-reconnect-graph {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  padding: 8px 4px;
}

.circuit-reconnect-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100px;
  flex-shrink: 0;
}

.circuit-reconnect-node-circle {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 172, 172, 0.08);
  border: 2px solid rgba(0, 172, 172, 0.35);
  color: #00d4aa;
  font-size: 18px;
}

.circuit-reconnect-node--active .circuit-reconnect-node-circle {
  background: rgba(0, 172, 172, 0.15);
  border-color: #00d4aa;
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.45);
  animation: circuit-node-pulse 1.2s ease-in-out infinite;
}

.circuit-reconnect-node--done .circuit-reconnect-node-circle {
  background: rgba(0, 212, 170, 0.12);
  border-color: #00d4aa;
}

@keyframes circuit-node-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 212, 170, 0.35); }
  50% { box-shadow: 0 0 24px rgba(0, 212, 170, 0.65); }
}

.circuit-reconnect-node-label {
  font-size: 11px;
  color: rgba(232, 234, 237, 0.65);
  text-align: center;
  letter-spacing: 0.02em;
}

.circuit-reconnect-connector {
  width: 52px;
  height: 24px;
  flex-shrink: 0;
}

.circuit-reconnect-connector-line {
  stroke: rgba(0, 172, 172, 0.25);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}

.circuit-reconnect-connector--active .circuit-reconnect-connector-line {
  stroke: #00d4aa;
  stroke-dasharray: none;
  animation: circuit-flow 1s linear infinite;
}

@keyframes circuit-flow {
  0% { stroke-dashoffset: 0; stroke-dasharray: 8 8; }
  100% { stroke-dashoffset: -16; stroke-dasharray: 8 8; }
}

.circuit-reconnect-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 13px;
  color: rgba(232, 234, 237, 0.75);
}

.circuit-reconnect-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d4aa;
  animation: circuit-dot-pulse 1.2s ease-in-out infinite;
}

@keyframes circuit-dot-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.circuit-reconnect-countdown {
  margin-top: 14px;
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: rgba(232, 234, 237, 0.45);
}

.circuit-reconnect-countdown strong {
  color: #00d4aa;
}

.circuit-reconnect-overlay.circuit-reconnect--failed .circuit-reconnect-module {
  color: #fbbf24;
}

.circuit-reconnect-overlay.circuit-reconnect--failed .circuit-reconnect-status-dot {
  background: #fbbf24;
}

.circuit-reconnect-overlay.circuit-reconnect--rejected .circuit-reconnect-module {
  color: #fca5a5;
}

@media (max-width: 480px) {
  .circuit-reconnect-frame { padding: 24px 16px 18px; }
  .circuit-reconnect-header { flex-direction: column; gap: 10px; }
  .circuit-reconnect-node { width: 80px; }
  .circuit-reconnect-node-circle { width: 40px; height: 40px; font-size: 15px; }
  .circuit-reconnect-connector { width: 36px; }
}
