/* Thermex Ventilation Simulator - Custom Styles */

/* Thermex Brand Colors */
:root {
  --thermex-dark: #1a1a1a;
  --thermex-gold: #D4AF37;
  --thermex-green-gray: #B8C5C1;
  --thermex-light-gray: #f5f5f5;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--thermex-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #B8941F;
}

/* Component styling */
.component-item {
  transition: all 0.3s ease;
}

.component-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Canvas styling */
#canvas {
  background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), 
              linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), 
              linear-gradient(45deg, transparent 75%, #f8f9fa 75%), 
              linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Connection points */
.connection-point {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--thermex-gold);
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 10;
}

/* Airflow particles */
.airflow-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--thermex-gold);
  border-radius: 50%;
  opacity: 0.7;
  animation: flowAnimation 2s linear infinite;
}

@keyframes flowAnimation {
  0% {
    transform: translateX(-10px);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateX(100px);
    opacity: 0;
  }
}

/* Pressure visualization */
.pressure-indicator {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pressurePulse 1.5s ease-in-out infinite;
}

@keyframes pressurePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.4;
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .grid-cols-1.lg\\:grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  #canvas {
    height: 400px;
  }
  
  .component-item {
    padding: 2px;
  }
}

@media (max-width: 768px) {
  .max-w-7xl {
    padding: 1rem;
  }
  
  .text-lg {
    font-size: 1rem;
  }
  
  #canvas {
    height: 300px;
  }
}

/* Touch-friendly controls */
@media (hover: none) and (pointer: coarse) {
  .component-item {
    min-height: 44px;
    padding: 8px;
  }
  
  button {
    min-height: 44px;
    padding: 12px 16px;
  }
  
  input[type="range"] {
    min-height: 44px;
  }
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Tooltip styling */
.tooltip {
  position: absolute;
  background: var(--thermex-dark);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--thermex-dark);
}

.tooltip.show {
  opacity: 1;
}

/* Custom range slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
  background: #e2e8f0;
  height: 6px;
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: var(--thermex-gold);
  height: 20px;
  width: 20px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-track {
  background: #e2e8f0;
  height: 6px;
  border-radius: 3px;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  background: var(--thermex-gold);
  height: 20px;
  width: 20px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Chart container */
.chart-container {
  position: relative;
  height: 200px;
  margin-top: 1rem;
}

/* Status indicators */
.status-good {
  color: #10b981;
}

.status-warning {
  color: #f59e0b;
}

.status-error {
  color: #ef4444;
}

/* Drag and drop feedback */
.drag-over {
  border-color: var(--thermex-gold) !important;
  background-color: rgba(212, 175, 55, 0.1) !important;
}

/* Component selection */
.component-selected {
  border-color: var(--thermex-gold) !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3) !important;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  body {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}