/* ═══════════════════════════════════════════════════════════════
   BILETELOTO.RO — Article Table Styles v4
   Target: Mercury .space-taxonomy-description tables
   Fixes: Mercury .space-page-content specificity overrides
   Fix v4: Force white caption text vs Mercury color inheritance
   Last updated: 23 Feb 2026
   ═══════════════════════════════════════════════════════════════ */

/* ── BASE TABLE — high specificity to beat Mercury reset ── */
.space-page-content .space-taxonomy-description table,
.space-taxonomy-description table,
.space-page-content table.bl-green,
.space-page-content table.bl-orange,
.space-page-content table.bl-red,
.space-page-content table.bl-purple,
.space-page-content table.bl-teal,
.space-page-content table.bl-gray {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1a2e;
  margin: 24px 0 !important;
  background: #fff;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8e8ef !important;
}

/* ── CAPTION — ultra specificity to beat Mercury .space-page-content color ── */
.space-page-content .space-taxonomy-description table caption,
.space-page-content table.bl-green caption,
.space-page-content table.bl-orange caption,
.space-page-content table.bl-red caption,
.space-page-content table.bl-purple caption,
.space-page-content table.bl-teal caption,
.space-page-content table.bl-gray caption,
.space-page-content table caption,
.space-taxonomy-description table caption,
table.bl-green caption,
table.bl-orange caption,
table.bl-red caption,
table.bl-purple caption,
table.bl-teal caption,
table.bl-gray caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #ffffff !important;
  padding: 10px 14px;
  background: linear-gradient(135deg, #0d1b4c, #1a3a8a) !important;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  -webkit-text-fill-color: #ffffff !important;
}

/* ── HEADER — override Mercury's .space-page-content table tr th ── */
.space-page-content table thead tr th,
.space-taxonomy-description table thead th {
  text-align: left !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #888 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 14px !important;
  border-bottom: 2px solid #e8e8ef !important;
  background: #fafafe !important;
}

.space-page-content table thead tr th:last-child,
.space-taxonomy-description table thead th:last-child {
  text-align: right !important;
}

/* ── BODY ROWS — kill Mercury's .space-page-content table tr border ── */
.space-page-content table tbody tr,
.space-taxonomy-description table tbody tr {
  border-bottom: none !important;
}

/* ── BODY CELLS ── */
.space-page-content table tbody tr td,
.space-taxonomy-description table tbody td {
  padding: 8px 14px !important;
  border-bottom: 1px solid #f0f0f5 !important;
  font-size: 13px !important;
  vertical-align: middle;
}

.space-page-content table tbody tr td:first-child,
.space-taxonomy-description table tbody td:first-child {
  font-weight: 600;
  color: #1a1a2e;
}

.space-page-content table tbody tr td:last-child,
.space-taxonomy-description table tbody td:last-child {
  text-align: right;
  font-weight: 700;
  color: #1a3a8a;
}

.space-page-content table tbody tr:last-child td,
.space-taxonomy-description table tbody tr:last-child td {
  border-bottom: none !important;
}

/* ── ZEBRA STRIPING ── */
.space-page-content table tbody tr:nth-child(even),
.space-taxonomy-description table tbody tr:nth-child(even) {
  background: #fafafe !important;
}

/* ── HOVER ── */
.space-page-content table tbody tr:hover,
.space-taxonomy-description table tbody tr:hover {
  background: #f0f5ff !important;
  transition: background 0.15s ease;
}

/* ══════════════════════════════════════════
   COLOR VARIANTS (caption gradient)
   ══════════════════════════════════════════ */
.space-page-content table.bl-green caption,
table.bl-green caption { background: linear-gradient(135deg, #135200, #237804) !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }

.space-page-content table.bl-purple caption,
table.bl-purple caption { background: linear-gradient(135deg, #531dab, #722ed1) !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.space-page-content table.bl-purple tbody tr td:last-child,
table.bl-purple tbody td:last-child { color: #531dab !important; }

.space-page-content table.bl-orange caption,
table.bl-orange caption { background: linear-gradient(135deg, #874d00, #ad6800) !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }

.space-page-content table.bl-red caption,
table.bl-red caption { background: linear-gradient(135deg, #a8071a, #cf1322) !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.space-page-content table.bl-red tbody tr td:last-child,
table.bl-red tbody td:last-child { color: #d4380d !important; }

.space-page-content table.bl-teal caption,
table.bl-teal caption { background: linear-gradient(135deg, #006d75, #08979c) !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.space-page-content table.bl-teal tbody tr td:last-child,
table.bl-teal tbody td:last-child { color: #006d75 !important; }

.space-page-content table.bl-gray caption,
table.bl-gray caption { background: linear-gradient(135deg, #333, #555) !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }

/* ══════════════════════════════════════════
   TYPOGRAPHY for category description
   ══════════════════════════════════════════ */
.space-taxonomy-description {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2c3e50;
}

.space-taxonomy-description h2 {
  font-size: 1.5em !important;
  font-weight: 700;
  color: #1a1a2e !important;
  margin: 2em 0 0.8em !important;
  padding-bottom: 0.3em;
  border-bottom: 2px solid #e8e8ef;
}

.space-taxonomy-description h3 {
  font-size: 1.2em !important;
  font-weight: 600;
  color: #1a1a2e !important;
  margin: 1.5em 0 0.6em !important;
}

.space-taxonomy-description p {
  margin-bottom: 1em;
}

.space-taxonomy-description a {
  color: #1a3a8a !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(26, 58, 138, 0.2);
}
.space-taxonomy-description a:hover {
  color: #0d1b4c !important;
  border-bottom-color: #0d1b4c;
}

.space-taxonomy-description ul,
.space-taxonomy-description ol {
  margin: 0.8em 0 1.2em 1.5em;
}
.space-taxonomy-description li {
  margin-bottom: 0.5em;
}

.space-taxonomy-description em {
  color: #666;
  font-size: 0.9em;
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 600px) {
  .space-page-content table,
  .space-taxonomy-description table {
    font-size: 13px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .space-page-content table thead tr th,
  .space-taxonomy-description table thead th {
    padding: 6px 10px !important;
    font-size: 10px !important;
    white-space: nowrap;
  }

  .space-page-content table tbody tr td,
  .space-taxonomy-description table tbody td {
    padding: 6px 10px !important;
    font-size: 12px !important;
    white-space: nowrap;
  }

  .space-page-content table caption,
  .space-taxonomy-description table caption {
    font-size: 12px;
    padding: 8px 12px;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  .space-taxonomy-description h2 { font-size: 1.3em !important; }
  .space-taxonomy-description h3 { font-size: 1.1em !important; }
}
