/* Scoped CSS for NPM Package Info Lookup */
.npil-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

.npil-main {
  padding: 1.5rem 1rem 3rem;
}

.npil-container {
  max-width: 1100px;
  margin: 0 auto;
}

.npil-app-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.npil-search-section {
  margin-bottom: 1.5rem;
}

.npil-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.npil-input-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.npil-input {
  flex: 1;
  min-width: 240px;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease;
}

.npil-input:focus {
  border-color: #2563eb;
}

.npil-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  text-decoration: none;
}

.npil-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.npil-btn-primary:hover {
  background: #1d4ed8;
}

.npil-btn-outline {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.npil-btn-outline:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.npil-btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.npil-presets {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.npil-preset-label {
  font-size: 0.825rem;
  color: #64748b;
  font-weight: 500;
}

.npil-preset-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.npil-preset-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Package View */
.npil-package-view {
  border-top: 1px solid #e2e8f0;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.npil-hero-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.npil-hero-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.npil-pkg-name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  word-break: break-all;
}

.npil-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.npil-badge-version {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.npil-badge-license {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.npil-pkg-desc {
  font-size: 1rem;
  color: #475569;
  margin: 0;
}

/* Install Command Selector */
.npil-install-card {
  background: #0f172a;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.npil-pm-tabs {
  display: flex;
  gap: 0.4rem;
}

.npil-tab-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.npil-tab-btn:hover {
  color: #f8fafc;
}

.npil-tab-btn.active {
  background: #334155;
  color: #ffffff;
}

.npil-install-cmd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #1e293b;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
}

.npil-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #38bdf8;
  font-size: 0.95rem;
}

/* Metrics Grid */
.npil-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.npil-metric-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.npil-metric-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.npil-metric-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.npil-text-emerald {
  color: #16a34a;
}

.npil-text-amber {
  color: #d97706;
}

.npil-metric-sub {
  font-size: 0.75rem;
  color: #64748b;
}

/* Links Grid */
.npil-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.npil-action-link {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  transition: all 0.15s ease;
  background: #f8fafc;
}

.npil-action-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border-color: #2563eb;
  background: #eff6ff;
}

.npil-action-link strong {
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.npil-action-link span {
  font-size: 0.75rem;
  color: #64748b;
}

/* Guide Section */
.npil-guide-section {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.npil-section-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.npil-lead-text {
  color: #475569;
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

.npil-table-wrap {
  overflow-x: auto;
}

.npil-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.npil-table th {
  background: #f8fafc;
  color: #334155;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
}

.npil-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.npil-table tr:hover {
  background: #f8fafc;
}

.npil-badge-save {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
