@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-yellow: #ffeb00;
  --color-purple: #f000ff;
  --color-green: #08ff00;
  --color-red: #ff0e00;
  --color-corridor: #c9c9c9;
  --cable-cat6: #06b6d4;
  --cable-cat6a: #ec4899;
  --cable-glow: rgba(6, 182, 212, 0.4);
}

body {
  font-family: 'Inter', sans-serif;
}

code, .font-mono {
  font-family: 'Fira Code', monospace;
}

/* Blueprint Grid Background */
.bg-blueprint {
  background-color: #0b1120;
  background-image: 
    linear-gradient(rgba(30, 41, 59, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.5) 1px, transparent 1px),
    linear-gradient(rgba(30, 41, 59, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.2) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.7);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.9);
}

/* Cable Pulse Animation */
@keyframes cableDash {
  to {
    stroke-dashoffset: -40;
  }
}

.cable-flow {
  stroke-dasharray: 8 6;
  animation: cableDash 1.2s linear infinite;
}

.cable-glow {
  filter: drop-shadow(0 0 6px var(--cable-glow));
}

/* Device LED pulse */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
    filter: drop-shadow(0 0 8px currentColor);
  }
  50% {
    opacity: 0.4;
    filter: drop-shadow(0 0 2px currentColor);
  }
}

.led-blink {
  animation: pulseGlow 1.5s ease-in-out infinite;
}

/* Glassmorphism */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.6);
}

.glass-panel-subtle {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(71, 85, 105, 0.3);
}

/* Room styles */
.room-polygon {
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.room-polygon:hover {
  filter: brightness(1.15) saturate(1.2);
  stroke: #ffffff;
  stroke-width: 3px;
}

.room-polygon.selected {
  stroke: #38bdf8;
  stroke-width: 3.5px;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
}

/* Node/Rack Styling */
.node-card {
  transition: all 0.2s ease;
}
.node-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

/* T568B Wire color bars */
.wire-white-orange { background: repeating-linear-gradient(45deg, #ffffff, #ffffff 4px, #ea580c 4px, #ea580c 8px); }
.wire-orange { background-color: #ea580c; }
.wire-white-green { background: repeating-linear-gradient(45deg, #ffffff, #ffffff 4px, #16a34a 4px, #16a34a 8px); }
.wire-blue { background-color: #2563eb; }
.wire-white-blue { background: repeating-linear-gradient(45deg, #ffffff, #ffffff 4px, #2563eb 4px, #2563eb 8px); }
.wire-green { background-color: #16a34a; }
.wire-white-brown { background: repeating-linear-gradient(45deg, #ffffff, #ffffff 4px, #854d0e 4px, #854d0e 8px); }
.wire-brown { background-color: #854d0e; }

/* Print Stylesheet */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  header, nav, .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  #floorplanContainer {
    border: 1px solid #ccc !important;
    background: #fff !important;
  }
  .room-polygon {
    stroke: #000 !important;
    stroke-width: 2px !important;
  }
}
