/*
File: Web/docs/medulus-cves.css
Purpose: Page-level styling for the Medulus CVE list view (cves.html).
Created: 2025-11-13
Updated: 2025-11-13
Change notes:
  - Added layout, table, and filter styling for CVE list.
  - Intentionally does not alter the existing header/menu layout or base typography.
*/

/* Layout containers */

.medulus-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.cves-page-header {
  margin-bottom: 1.5rem;
}

.cves-page-title {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.cves-page-lead {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* Filters */

.cves-filters {
  margin: 1.5rem 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cves-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.cves-filter-group {
  display: flex;
  flex-direction: column;
  min-width: 140px;
}

.cves-filter-group label {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

.cves-filter-group select,
.cves-filter-group input {
  font-size: 0.9rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #f5f5f5;
}

.cves-filter-group select:focus,
.cves-filter-group input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
}

.cves-filter-search {
  flex: 1 1 260px;
}

.cves-search-hint {
  font-size: 0.75rem;
  margin-top: 0.2rem;
  opacity: 0.6;
}

/* Status area */

.cves-status {
  min-height: 1.8rem;
  margin-bottom: 0.5rem;
}

.cves-loading,
.cves-error {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.cves-error {
  color: #ffcccc;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.9);
  animation: cves-spin 0.7s linear infinite;
}

@keyframes cves-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Table */

.cves-table-wrap {
  margin-top: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

.cves-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.cves-table thead {
  background: rgba(255, 255, 255, 0.05);
}

.cves-table th,
.cves-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.cves-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cves-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.cves-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cves-col-id {
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

.cves-col-date {
  white-space: nowrap;
}

.cves-col-score {
  white-space: nowrap;
  font-weight: 600;
}

.cves-col-title {
  max-width: 620px;
}

/* Empty state */

.cves-empty {
  padding: 1rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Pagination */

.cves-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.btn {
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  color: #f5f5f5;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

/* Footer (does not alter existing header/menu) */

.medulus-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
  font-size: 0.8rem;
  opacity: 0.75;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-separator {
  opacity: 0.5;
}

/* Responsive tweaks */

@media (max-width: 720px) {
  .medulus-main {
    padding: 1rem 0.75rem 2rem;
  }

  .cves-filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cves-filter-group {
    width: 100%;
  }

  .cves-pagination {
    justify-content: center;
  }
}

