/* ═══════════════════════════════════════════════════════
   NeoCalculator.net — Resistor Calculator CSS
   ═══════════════════════════════════════════════════════ */

.res-container {
  padding-top: 20px;
  padding-bottom: 50px;
}

/* Tabs UI Styling & Active Tab Text Visibility Fix */
.mode-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border, #e2e8f0);
}

.mode-tab {
  padding: 10px 20px;
  background: var(--bg-card, #ffffff);
  border: 1px solid transparent;
  border-bottom: 3px solid transparent;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s ease;
}

.mode-tab:hover {
  color: #2563eb;
  background: #f1f5f9;
}

.mode-tab.active {
  color: #ffffff !important;
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  border-bottom-color: #1d4ed8 !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.res-tab-content {
  display: none;
}

.res-tab-content.active {
  display: block;
}

.res-band-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  background: var(--bg-input, #f8fafc);
  padding: 12px 16px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border, #e2e8f0);
}

.res-radio-group {
  display: flex;
  gap: 15px;
}

.res-radio-group label {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light, #1e293b);
}

/* ── Interactive Resistor Graphic ── */
.resistor-graphic-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background: var(--bg-input, #f1f5f9);
  border-radius: var(--radius, 12px);
  border: 1px solid var(--border, #cbd5e1);
  margin-bottom: 24px;
}

.resistor-wire {
  height: 8px;
  width: 60px;
  background: #94a3b8;
  border-top: 1px solid #64748b;
  border-bottom: 1px solid #64748b;
}

.resistor-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  height: 64px;
  width: 240px;
  background: #e2e8f0;
  border: 2px solid #94a3b8;
  border-radius: 20px;
  padding: 0 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.resistor-band {
  width: 14px;
  height: 100%;
  border-radius: 2px;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.4);
  transition: background-color 0.2s ease-in-out;
}

/* ── Control Grid ── */
.res-controls-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.res-select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border, #cbd5e1);
  background-color: var(--bg-card, #ffffff);
  color: var(--text-light, #0f172a);
  font-size: 0.95rem;
}

.adv-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* ── FAQ Smooth Expand Transition ── */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

@media (max-width: 768px) {
  .res-controls-grid, .adv-fields-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .resistor-body {
    width: 200px;
  }
  .resistor-wire {
    width: 30px;
  }
}