/* NDS V-Belt Selector v1.1.0 - scoped stylesheet
 * v1.1.0 changes:
 *   - Rebalanced guidance panel for guidance-only first paint (no preview list).
 *   - Removed obsolete nds-preview-hint / INITIAL_PREVIEW_LIMIT rules.
 *   - Kept restrained badge colors (no bright red backgrounds).
 *
 * All selectors prefixed with .nds-vbelt-selector (no global bleed).
 */

.nds-vbelt-selector {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2933;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e4e7eb;
  border-radius: 6px;
  box-sizing: border-box;
}

.nds-vbelt-selector *,
.nds-vbelt-selector *::before,
.nds-vbelt-selector *::after {
  box-sizing: border-box;
}

.nds-vbelt-selector .nds-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  align-items: flex-end;
}

.nds-vbelt-selector .nds-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #3e4c59;
  min-width: 140px;
  flex: 1 1 140px;
}

.nds-vbelt-selector .nds-row label.nds-grow {
  flex: 2 1 200px;
}

.nds-vbelt-selector .nds-row label > span {
  font-size: 12px;
  color: #52606d;
}

.nds-vbelt-selector select,
.nds-vbelt-selector input[type="number"],
.nds-vbelt-selector input[type="text"] {
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #cbd2d9;
  border-radius: 4px;
  background: #ffffff;
  color: #1f2933;
  font-family: inherit;
  width: 100%;
  min-height: 36px;
}

.nds-vbelt-selector select:focus,
.nds-vbelt-selector input:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
  border-color: #3b82f6;
}

.nds-vbelt-selector .nds-row-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.nds-vbelt-selector .nds-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: #52606d;
  flex: 1 1 auto;
  min-width: 220px;
  cursor: pointer;
}

.nds-vbelt-selector .nds-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

.nds-vbelt-selector .nds-btn {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #cbd2d9;
  border-radius: 4px;
  background: #ffffff;
  color: #1f2933;
  cursor: pointer;
  font-family: inherit;
  min-height: 36px;
}

.nds-vbelt-selector .nds-btn:hover {
  background: #f5f7fa;
}

.nds-vbelt-selector .nds-btn-primary {
  background: #1f2933;
  color: #ffffff;
  border-color: #1f2933;
}

.nds-vbelt-selector .nds-btn-primary:hover {
  background: #323f4b;
}

.nds-vbelt-selector .nds-results {
  margin-top: 16px;
}

.nds-vbelt-selector .nds-results-header {
  font-size: 13px;
  color: #52606d;
  padding: 8px 0;
  border-bottom: 1px solid #e4e7eb;
  margin-bottom: 12px;
}

.nds-vbelt-selector .nds-guidance {
  background: #f5f7fa;
  border: 1px solid #e4e7eb;
  border-radius: 6px;
  padding: 32px 28px;
  margin-bottom: 16px;
  text-align: center;
}

.nds-vbelt-selector .nds-guidance-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2933;
  margin: 0 0 12px 0;
}

.nds-vbelt-selector .nds-guidance p {
  margin: 0 0 10px 0;
  color: #3e4c59;
  font-size: 14px;
}

.nds-vbelt-selector .nds-guidance p:last-child {
  margin-bottom: 0;
}

.nds-vbelt-selector .nds-guidance-sub {
  font-size: 13px;
  color: #52606d;
}

.nds-vbelt-selector .nds-result-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.nds-vbelt-selector .nds-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid #e4e7eb;
  border-radius: 6px;
  padding: 14px 16px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.nds-vbelt-selector .nds-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.08);
}

.nds-vbelt-selector .nds-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.nds-vbelt-selector .nds-card-title {
  font-weight: 600;
  font-size: 15px;
  color: #1f2933;
  word-break: break-all;
}

.nds-vbelt-selector .nds-bore {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  line-height: 1.3;
  white-space: normal;
  flex-shrink: 0;
}

.nds-vbelt-selector .nds-bore-comp {
  background: #e6f4ea;
  color: #1e6e3a;
  border-color: #b6dec2;
}

.nds-vbelt-selector .nds-bore-unknown {
  background: #f1f3f5;
  color: #52606d;
  border-color: #cbd2d9;
}

.nds-vbelt-selector .nds-bore-incomp {
  background: #fdf3f0;
  color: #a03a26;
  border-color: #f1c4b8;
}

.nds-vbelt-selector .nds-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #52606d;
}

.nds-vbelt-selector .nds-card-meta span {
  background: #f5f7fa;
  padding: 2px 8px;
  border-radius: 3px;
}

.nds-vbelt-selector .nds-empty {
  padding: 32px 16px;
  text-align: center;
  background: #f5f7fa;
  border: 1px dashed #cbd2d9;
  border-radius: 6px;
}

.nds-vbelt-selector .nds-empty p {
  margin: 0 0 8px 0;
  color: #3e4c59;
}

.nds-vbelt-selector .nds-empty-sub {
  font-size: 13px;
  color: #52606d;
}

.nds-vbelt-selector .nds-loading,
.nds-vbelt-selector .nds-error {
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: #52606d;
}

.nds-vbelt-selector .nds-error {
  color: #a03a26;
  background: #fdf3f0;
  border: 1px solid #f1c4b8;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .nds-vbelt-selector .nds-row {
    flex-direction: column;
    gap: 10px;
  }
  .nds-vbelt-selector .nds-row label,
  .nds-vbelt-selector .nds-row label.nds-grow {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }
  .nds-vbelt-selector .nds-row-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }
  .nds-vbelt-selector .nds-row-actions .nds-btn {
    flex: 1 1 100px;
  }
  .nds-vbelt-selector .nds-result-list {
    grid-template-columns: 1fr;
  }
  .nds-vbelt-selector .nds-card-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
