/* ==========================================================================
   موديول قوانين الغازات التفاعلية | ZARRA Gas Laws CSS
   ========================================================================== */

.gas-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-2xl);
}

@media (max-width: 992px) {
  .gas-grid {
    grid-template-columns: 1fr;
  }
}

.gas-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.gas-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}

.gas-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-border-soft);
}

.gas-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-main);
  margin: 0;
}

/* مسرح محاكاة الغاز الحركي بـ Canvas */
.gas-chamber-wrap {
  width: 100%;
  height: 320px;
  background: #090d16;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border-strong);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

#gas-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* شريط قراءات العدادات الفورية */
.gas-gauges-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: var(--spacing-md);
}

@media (max-width: 600px) {
  .gas-gauges-row {
    grid-template-columns: 1fr 1fr;
  }
}

.gas-gauge-box {
  background: var(--color-bg-surface-soft);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-soft);
  text-align: center;
}

.gas-gauge-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.gas-gauge-val {
  font-family: var(--font-chem-code);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-top: 2px;
}

/* أدوات التحكم والمنزلقات */
.gas-slider-group {
  margin-bottom: var(--spacing-md);
}

.gas-slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.gas-slider-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.gas-slider-readout {
  font-family: var(--font-chem-code);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* شريط اختيار القانون النشط */
.gas-modes-nav {
  display: flex;
  gap: 6px;
  background: var(--color-bg-surface-soft);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-soft);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.gas-mode-btn {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gas-mode-btn.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* مسرح الرسم البياني */
.gas-graph-wrap {
  width: 100%;
  height: 200px;
  background: #0f172a;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-soft);
  margin-top: var(--spacing-md);
  position: relative;
}

#gas-graph-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
