/* ==========================================================================
   Vexel Focus Innovations - IoT Hardware Experience Lab Simulator Styles
   ========================================================================== */

.simulator-section {
  background: radial-gradient(circle at 50% 20%, rgba(14, 21, 36, 0.95) 0%, #080C14 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.simulator-container-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Simulator Navigation Switcher */
.sim-nav-bar {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-medium);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sim-nav-bar::-webkit-scrollbar {
  display: none;
}

.sim-nav-btn {
  flex: 1 0 auto;
  min-width: 150px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  padding: clamp(0.85rem, 2vw, 1.25rem) 1rem;
  font-size: clamp(0.78rem, 2vw, 0.9rem);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.sim-nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.sim-nav-btn.active {
  color: var(--accent-emerald);
  background: var(--bg-tertiary);
  border-bottom-color: var(--accent-emerald);
  box-shadow: inset 0 -4px 12px rgba(16, 185, 129, 0.15);
}

/* Simulation Panels */
.sim-panel {
  display: none;
  padding: clamp(1rem, 3vw, 2.5rem);
}

.sim-panel.active {
  display: block;
}

.sim-stage-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}

@media (max-width: 1024px) {
  .sim-stage-grid {
    grid-template-columns: 1fr;
  }
}

/* Controls Panel */
.sim-controls-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: clamp(1.15rem, 3vw, 1.75rem);
  width: 100%;
}

.sim-device-header {
  margin-bottom: 1.25rem;
}

.sim-device-header h3 {
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.sim-device-header p {
  font-size: clamp(0.78rem, 2vw, 0.85rem);
  color: var(--text-muted);
}

.sim-telemetry-readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
  gap: clamp(0.5rem, 1.5vw, 0.85rem);
  margin-bottom: 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.readout-item span {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.readout-item strong {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: var(--accent-emerald);
  word-break: break-word;
}

.sim-interactive-triggers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.btn-action.primary {
  background: var(--accent-emerald);
  color: #080C14;
}

.btn-action.secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

.btn-action.danger {
  background: var(--accent-danger);
  color: #FFFFFF;
}

.btn-action.success {
  background: var(--accent-emerald);
  color: #080C14;
}

.btn-action:hover {
  transform: translateY(-2px);
}

/* ==========================================
   1. TRASH BIN SIMULATOR STYLES
   ========================================== */
.bin-viewport {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.bin-container {
  width: 170px;
  height: 230px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bin-lid {
  width: 190px;
  height: 24px;
  background: linear-gradient(180deg, #334155, #1E293B);
  border: 2px solid #475569;
  border-radius: 8px 8px 3px 3px;
  position: relative;
  z-index: 5;
  transform-origin: 10px 10px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.bin-lid.open {
  transform: rotate(-72deg);
}

.bin-ir-sensor {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 8px;
  border-radius: 4px;
  background: #0F172A;
  border: 1px solid #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bin-ir-sensor.active::after {
  content: '';
  width: 14px;
  height: 4px;
  background: #10B981;
  border-radius: 2px;
  box-shadow: 0 0 10px #10B981;
}

.bin-sonar-beam {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 120px;
  background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.3) 0%, transparent 80%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.bin-sonar-beam.active {
  opacity: 1;
}

.bin-body {
  width: 170px;
  height: 200px;
  background: linear-gradient(180deg, #1E293B, #0F172A);
  border: 2px solid #334155;
  border-radius: 4px 4px 16px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.bin-fill-gauge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(16, 185, 129, 0.2);
  border-top: 2px solid var(--accent-emerald);
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bin-fill-gauge.warning {
  background: rgba(245, 158, 11, 0.25);
  border-top-color: var(--accent-amber);
}

.bin-fill-gauge.danger {
  background: rgba(239, 68, 68, 0.25);
  border-top-color: var(--accent-danger);
}

/* ==========================================
   2. SMART CLASSROOM / HOME STYLES
   ========================================== */
.room-viewport {
  background: #060910;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  min-height: 380px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.room-ambient-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 25%, rgba(255, 235, 160, 0.4) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.3s;
}

.room-board-glow {
  position: absolute;
  top: 15%;
  left: 10%;
  width: 180px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.3) 0%, transparent 75%);
  pointer-events: none;
  transition: opacity 0.3s;
}

.room-projector-beam {
  position: absolute;
  top: 5%;
  right: 15%;
  width: 180px;
  height: 160px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, transparent 80%);
  clip-path: polygon(0 0, 100% 40%, 80% 100%, 0 20%);
  pointer-events: none;
  transition: opacity 0.3s;
}

.ceiling-fixtures {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.smart-bulb-fixture {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bulb-wire {
  width: 2px;
  height: 35px;
  background: #475569;
}

.bulb-glow-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFFBEB;
  box-shadow: 0 0 24px #FDE68A;
}

/* Ceiling Fan Blades Animation */
.smart-fan-fixture {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fan-rod {
  width: 3px;
  height: 30px;
  background: #475569;
}

.fan-hub {
  width: 68px;
  height: 68px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fan-center-cap {
  width: 16px;
  height: 16px;
  background: #1E293B;
  border: 2px solid #06B6D4;
  border-radius: 50%;
  position: absolute;
  z-index: 3;
}

.fan-blades {
  width: 100%;
  height: 100%;
  position: relative;
}

.fan-blade {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 8px;
  background: linear-gradient(90deg, #334155, #64748B);
  border-radius: 4px;
  transform-origin: 0 50%;
}

.blade-1 { transform: translateY(-50%) rotate(0deg); }
.blade-2 { transform: translateY(-50%) rotate(120deg); }
.blade-3 { transform: translateY(-50%) rotate(240deg); }

.fan-blades.speed-1 { animation: spinFan 1.8s linear infinite; }
.fan-blades.speed-2 { animation: spinFan 1.2s linear infinite; }
.fan-blades.speed-3 { animation: spinFan 0.75s linear infinite; }
.fan-blades.speed-4 { animation: spinFan 0.45s linear infinite; }
.fan-blades.speed-5 { animation: spinFan 0.25s linear infinite; }
.fan-blades.stopped { animation: none; }

@keyframes spinFan {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.room-floor-stage {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 2;
}

.board-mockup {
  width: 120px;
  height: 70px;
  background: #0F172A;
  border: 2px solid #334155;
  border-radius: 4px;
  padding: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-cyan);
}

.switch-panel-channel-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ch-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.65rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ch-btn.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}

/* ==========================================
   3. SMART WATER TAP STYLES
   ========================================== */
.tap-viewport {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.faucet-assembly {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.faucet-neck {
  width: 14px;
  height: 120px;
  background: linear-gradient(90deg, #94A3B8, #475569, #1E293B);
  border-radius: 8px 8px 0 0;
  position: relative;
}

.faucet-spout {
  position: absolute;
  top: 10px;
  right: -55px;
  width: 65px;
  height: 14px;
  background: linear-gradient(180deg, #94A3B8, #475569);
  border-radius: 0 8px 8px 0;
}

.faucet-head {
  position: absolute;
  bottom: -18px;
  right: 0;
  width: 22px;
  height: 20px;
  background: #1E293B;
  border: 1px solid #64748B;
  border-radius: 3px;
}

.faucet-sensor-bottom {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 4px;
  background: #0F172A;
  border-radius: 2px;
}

.faucet-sensor-bottom.active {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.water-stream {
  position: absolute;
  top: 32px;
  right: 5px;
  width: 8px;
  height: 0;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.8), rgba(59, 130, 246, 0.5));
  border-radius: 4px;
  opacity: 0;
  transition: height 0.2s, opacity 0.2s;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

.water-stream.flowing {
  height: 130px;
  opacity: 1;
}

.sink-basin {
  width: 220px;
  height: 35px;
  background: #1E293B;
  border: 2px solid #475569;
  border-radius: 4px 4px 18px 18px;
  margin-top: 125px;
  position: relative;
}

.sink-splash-ripples {
  position: absolute;
  top: 50%;
  left: 70%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 12px;
  border: 1px solid var(--accent-cyan);
  border-radius: 50%;
  opacity: 0;
}

.sink-splash-ripples.active {
  opacity: 1;
  animation: waterRipple 0.8s infinite linear;
}

@keyframes waterRipple {
  0% { width: 10px; height: 4px; opacity: 1; }
  100% { width: 50px; height: 16px; opacity: 0; }
}

/* ==========================================
   4. SMART WATER TANK SENSOR STYLES
   ========================================== */
.tank-viewport {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 3vw, 2rem);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .tank-viewport {
    flex-direction: column;
    justify-content: center;
  }
}

.tank-reservoir-cutaway {
  width: 180px;
  height: 240px;
  background: rgba(15, 23, 42, 0.8);
  border: 3px solid #475569;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.tank-ultrasonic-head {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 16px;
  background: #334155;
  border: 1px solid var(--accent-amber);
  border-radius: 4px;
  z-index: 5;
}

.sonar-wave-rays {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 100px;
  background: radial-gradient(ellipse at top, rgba(245, 158, 11, 0.25) 0%, transparent 80%);
  pointer-events: none;
  z-index: 4;
}

.tank-water-fill-layer {
  width: 100%;
  background: linear-gradient(180deg, #06B6D4 0%, #0369A1 100%);
  border-top: 3px solid #67E8F9;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 6px 14px rgba(255, 255, 255, 0.2);
}

.tank-level-markers {
  position: absolute;
  right: 6px;
  top: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  z-index: 6;
}

/* Industrial Motor Pump Unit Graphic */
.pump-controller-unit {
  width: 140px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.relay-led {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #334155;
  margin-bottom: 0.5rem;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.relay-led.active {
  background: var(--accent-emerald);
  box-shadow: 0 0 16px var(--accent-emerald);
}

.relay-led.idle {
  background: #475569;
}

.pump-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.slider-control-group {
  margin: 1.25rem 0;
}

.slider-control-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.sim-slider {
  width: 100%;
  -webkit-appearance: none;
  background: var(--bg-tertiary);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-emerald);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-emerald);
}
