/* BOM Configurator — isolated styles */

.bom-configurator-form {
  margin-top: 6px;
  background: #ffffff;
  border: groove #4f46e5 1px;
  border-left: 3px solid #4f46e5;
  border-radius: 8px;
  padding: 14px 16px;
  max-width: 100%;
}

.bom-configurator-header h3 {
  margin: 0 0 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.bom-configurator-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.bom-configurator-progress-track {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.bom-configurator-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.bom-configurator-progress-label {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  font-weight: 500;
}

.bom-configurator-intro,
.bom-configurator-hint {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.bom-configurator-question h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.bom-configurator-body {
  margin-bottom: 4px;
}

.bom-configurator-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.bom-configurator-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  font-family: inherit;
  font-size: 13px;
  color: #1e293b;
}

.bom-configurator-card:hover {
  border-color: #a5b4fc;
  background: #eef2ff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.bom-configurator-card--selected {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.12);
}

.bom-configurator-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: #4f46e5;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.bom-configurator-card-label {
  font-weight: 500;
  line-height: 1.35;
}

.bom-configurator-card-check {
  position: absolute;
  top: 8px;
  right: 10px;
  color: #4f46e5;
  font-weight: 700;
  font-size: 14px;
}

.bom-configurator-chip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.bom-configurator-chip {
  padding: 8px 6px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.bom-configurator-chip:hover {
  border-color: #a5b4fc;
  background: #eef2ff;
}

.bom-configurator-chip--selected {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
}

.bom-configurator-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bom-configurator-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  color: #1e293b;
  transition: border-color 0.15s, background 0.15s;
}

.bom-configurator-check-row:hover {
  border-color: #a5b4fc;
  background: #eef2ff;
}

.bom-configurator-check-row--none {
  font-style: italic;
  color: #64748b;
}

.bom-configurator-check-row input {
  width: 16px;
  height: 16px;
  accent-color: #4f46e5;
  flex-shrink: 0;
}

.bom-configurator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.bom-configurator-actions--summary {
  border-top: none;
  padding-top: 4px;
}

.bom-configurator-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
}

.bom-configurator-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bom-configurator-btn--primary {
  background: #4f46e5;
  color: #fff;
}

.bom-configurator-btn--primary:hover:not(:disabled) {
  background: #4338ca;
}

.bom-configurator-btn--secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.bom-configurator-btn--secondary:hover:not(:disabled) {
  background: #e2e8f0;
}

.bom-configurator-btn--ghost {
  background: transparent;
  color: #64748b;
  margin-left: auto;
}

.bom-configurator-btn--ghost:hover {
  color: #334155;
  background: #f1f5f9;
}

.bom-configurator-summary {
  overflow-x: auto;
  margin-bottom: 8px;
}

.bom-configurator-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.bom-configurator-summary-table th,
.bom-configurator-summary-table td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid #e2e8f0;
}

.bom-configurator-summary-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.bom-configurator-summary-table td:first-child {
  font-weight: 500;
  color: #475569;
  width: 38%;
  background: #fafbfc;
}

.bom-configurator-summary-table td:last-child {
  color: #0f172a;
}

@media (max-width: 620px) {
  .bom-configurator-card-grid {
    grid-template-columns: 1fr;
  }

  .bom-configurator-chip-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bom-configurator-btn--ghost {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}
