/* «المنافسون» (assets/competitors-view.js). البطاقات والأزرار والجداول من assets/ui.css، وهنا ترتيب الصفحة فقط. */
.comp-root {
  display: grid;
  gap: 16px;
}
.comp-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.comp-muted {
  color: var(--muted);
  margin: 4px 0 0;
}
.comp-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.comp-status p {
  margin: 0;
}
.comp-status--warn {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.comp-spinner {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--brand);
  animation: comp-spin 0.9s linear infinite;
}
@keyframes comp-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .comp-spinner {
    animation: none;
  }
}
.comp-notes {
  margin: 0;
  padding-inline-start: 20px;
  display: grid;
  gap: 8px;
  line-height: 1.7;
}
.comp-table {
  white-space: nowrap;
}
.comp-you {
  background: var(--brand-soft);
}
.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.comp-rival {
  display: grid;
  gap: 10px;
  align-content: start;
}
.comp-rival-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.comp-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 1.2rem;
}
.comp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.comp-rival-titles {
  min-width: 0;
}
.comp-rival-name {
  margin: 0 0 4px;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}
.comp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.comp-tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 600;
}
.comp-tag--plain {
  background: var(--bg);
  color: var(--muted);
}
.comp-reason {
  margin: 0;
  line-height: 1.7;
}
.comp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.comp-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.comp-link:hover,
.comp-link:focus-visible {
  text-decoration: underline;
}
.comp-facts {
  margin: 0;
  font-weight: 600;
}
.comp-section {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.comp-subtitle {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: var(--muted);
}
.comp-posts,
.comp-prices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.comp-posts li {
  display: grid;
  gap: 2px;
}
.comp-post {
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.comp-post:hover,
.comp-post:focus-visible {
  color: var(--brand);
  text-decoration: underline;
}
.comp-prices li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.comp-prices a {
  color: var(--text);
  overflow-wrap: anywhere;
}
.comp-price {
  flex-shrink: 0;
  font-weight: 700;
}
.comp-price--down {
  color: var(--success);
}
.comp-price--up {
  color: var(--danger);
}
.comp-error {
  margin: 0;
  color: var(--danger);
}
.comp-foot {
  font-size: 0.9rem;
}
@media (max-width: 600px) {
  .comp-grid {
    grid-template-columns: 1fr;
  }
}
