/* ============================================================
   YOY TOP & BOTTOM 10 MOST METRICS IMPROVED
   ============================================================ */

.yoy-top-bottom-section {
  margin-bottom: 30px;
  width: 100%;
  max-width: 90%;
}

.yoy-container {
  display: flex;
  gap: 24px;
}

.yoy-tables-area {
  flex: 1;
  min-width: 0;
}

.yoy-tables-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.yoy-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
}

/* ============================================================
   TABLE TITLE — matches the section header style for
   "Trend" and "Prime Top and Bottom 10"
   ============================================================ */

.yoy-table-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.yoy-table-title.top {
  color: var(--accent-green);
}

.yoy-table-title.bottom {
  color: var(--accent-red);
}

/* Description lines below the title */
.yoy-table-desc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}

.yoy-desc-line {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================================
   TABLE STYLING
   ============================================================ */

.yoy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.yoy-table thead th {
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--bg-card-border);
  white-space: nowrap;
}

.yoy-table thead th.numeric {
  text-align: right;
}

.yoy-table tbody tr {
  transition: background 0.15s;
}

.yoy-table tbody tr:hover {
  background: rgba(33, 150, 243, 0.06);
}

.yoy-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(42, 63, 77, 0.4);
  color: var(--text-primary);
  white-space: nowrap;
}

.yoy-table tbody td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.yoy-table tbody td.site-name {
  font-weight: 600;
}

/* ============================================================
   CONDITIONAL FORMATTING — YOY % Change colors
   ============================================================ */

.yoy-table tbody td.yoy-good {
  color: var(--accent-green);
  font-weight: 600;
}

.yoy-table tbody td.yoy-bad {
  color: var(--accent-red);
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
  .yoy-tables-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .yoy-table-title {
    font-size: 18px;
  }
}
