/* Scoped styling for cve-vulnerability-lookup */
.cvl-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text, #1e293b);
}

.cvl-header {
  margin-bottom: 1.5rem;
}

.cvl-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  background-color: #fee2e2;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.cvl-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: var(--color-heading, #0f172a);
}

.cvl-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text-muted, #64748b);
  line-height: 1.5;
}

/* Nav Tabs */
.cvl-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

.cvl-tab-btn {
  background: transparent;
  border: none;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}

.cvl-tab-btn:hover {
  color: #0f172a;
}

.cvl-tab-btn.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

/* Ad slots */
.cvl-ad-slot {
  margin: 1.5rem 0;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-subtle, #f8fafc);
  border: 1px dashed var(--color-border, #e2e8f0);
  border-radius: 0.5rem;
}

/* Search bar */
.cvl-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  background: #ffffff;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cvl-search-input-wrap {
  flex: 1;
  min-width: 260px;
}

.cvl-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  outline: none;
}

.cvl-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.cvl-filter-group {
  display: flex;
  gap: 0.5rem;
}

.cvl-select {
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #1e293b;
}

.cvl-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #1d4ed8;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 0.375rem;
  cursor: pointer;
  white-space: nowrap;
}

.cvl-btn-primary:hover {
  background: #1d4ed8;
}

.cvl-btn-sm {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 0.375rem;
  cursor: pointer;
}

.cvl-btn-sm:hover {
  background: #e2e8f0;
}

/* Results header */
.cvl-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #64748b;
}

.cvl-badge-source {
  padding: 0.2rem 0.5rem;
  background: #f1f5f9;
  border-radius: 0.25rem;
  font-weight: 600;
}

/* Cards Grid */
.cvl-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 800px) {
  .cvl-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  }
}

.cvl-card {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 0.65rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.cvl-border-critical { border-left: 5px solid #dc2626; }
.cvl-border-high { border-left: 5px solid #ea580c; }
.cvl-border-medium { border-left: 5px solid #ca8a04; }
.cvl-border-low { border-left: 5px solid #16a34a; }
.cvl-border-none { border-left: 5px solid #64748b; }

.cvl-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cvl-cve-id {
  font-weight: 800;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.05rem;
  color: #0f172a;
}

.cvl-severity-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  color: #ffffff;
  text-transform: uppercase;
}

.cvl-bg-critical { background-color: #dc2626; }
.cvl-bg-high { background-color: #ea580c; }
.cvl-bg-medium { background-color: #ca8a04; }
.cvl-bg-low { background-color: #16a34a; }
.cvl-bg-none { background-color: #64748b; }

.cvl-vuln-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #0f172a;
  line-height: 1.35;
}

.cvl-vuln-desc {
  margin: 0 0 0.75rem 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.45;
  flex: 1;
}

.cvl-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.cvl-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  background: #f1f5f9;
  color: #475569;
  border-radius: 0.25rem;
  font-weight: 600;
}

.cvl-vector-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.4rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.725rem;
  color: #0f172a;
  margin-bottom: 0.75rem;
  overflow-x: auto;
}

.cvl-card-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 0.6rem;
  font-size: 0.8rem;
  color: #334155;
}

/* Calculator Grid */
.cvl-calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .cvl-calc-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.cvl-calc-controls {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.cvl-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.cvl-metric-row {
  margin-bottom: 1rem;
}

.cvl-metric-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}

.cvl-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cvl-choice-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 0.45rem 0.75rem;
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cvl-choice-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.cvl-choice-btn.active {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* Score Panel */
.cvl-score-summary-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cvl-score-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.cvl-score-rating {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: #0f172a;
}

.cvl-score-hint {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 1.5rem 0;
}

.cvl-vector-display {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cvl-vector-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.cvl-vector-display code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  color: #0f172a;
  word-break: break-all;
  display: block;
}

.cvl-copy-status {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.cvl-copy-success { color: #16a34a; }
.cvl-copy-err { color: #dc2626; }

.cvl-calc-display-wrap {
  display: flex;
  flex-direction: column;
}

.cvl-patch-note {
  font-size: 0.8rem;
  color: #334155;
}

.cvl-results-count {
  font-weight: 600;
  color: #475569;
}

.cvl-section {
  display: block;
}
