/* Affiliate Hub — extras only.
   90% of styling lives in theme.json. This file covers the few things blocks
   can't express cleanly: tables, FAQ animation, breadcrumb spacing, CTA hover.
   Kept tiny on purpose (CWV first). */

:root {
  --affhub-radius: 18px;
  --affhub-shadow-card: 0 1px 2px rgba(28, 26, 20, 0.04), 0 8px 22px rgba(28, 26, 20, 0.05);
}

img { max-width: 100%; height: auto; }
img[loading="lazy"] { content-visibility: auto; }

/* --- Affiliate disclosure --- */
.affhub-disclosure {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--affhub-color-muted, #6b6655);
  margin: 0;
}
.affhub-disclosure--full {
  font-size: 0.9rem;
  line-height: 1.55;
}

/* --- CTA button --- */
.affhub-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--affhub-color-cta, #e2622e);
  color: #fff !important;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 120ms ease, transform 120ms ease;
}
.affhub-cta:hover,
.affhub-cta:focus-visible {
  background: var(--affhub-color-primary-dark, #123325);
  transform: translateY(-1px);
}
.affhub-cta:focus-visible {
  outline: 2px solid var(--affhub-color-primary, #1d4d39);
  outline-offset: 2px;
}

/* --- Breadcrumbs --- */
.affhub-breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--affhub-color-muted, #6b6655);
}
.affhub-breadcrumbs li + li::before {
  content: "›";
  margin-right: 0.4rem;
  color: var(--affhub-color-line, #e7debd);
}
.affhub-breadcrumbs a { color: inherit; text-decoration: none; }
.affhub-breadcrumbs a:hover { text-decoration: underline; }

/* --- Cards (used in queries) --- */
.affhub-card {
  box-shadow: var(--affhub-shadow-card);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.affhub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(28, 26, 20, 0.05), 0 14px 32px rgba(28, 26, 20, 0.07);
}
.affhub-card a { text-decoration: none; }

/* --- Comparison table --- */
.affhub-comparison-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}
.affhub-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--affhub-color-card, #fffdf8);
  border: 1px solid var(--affhub-color-line, #e7debd);
  border-radius: 14px;
  overflow: hidden;
}
.affhub-comparison-table th,
.affhub-comparison-table td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--affhub-color-line, #e7debd);
  vertical-align: top;
}
.affhub-comparison-table thead th {
  background: var(--affhub-color-background, #f7f2e7);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.affhub-comparison-table tbody tr:last-child th,
.affhub-comparison-table tbody tr:last-child td {
  border-bottom: 0;
}
.affhub-comparison-table__name {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--affhub-color-muted, #6b6655);
}
.affhub-comparison-table__count {
  color: var(--affhub-color-muted, #6b6655);
  font-size: 0.85em;
}

/* --- FAQ details --- */
.affhub-faq__item,
.affhub-faq .wp-block-details {
  background: var(--affhub-color-card, #fffdf8);
  border: 1px solid var(--affhub-color-line, #e7debd);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}
.affhub-faq__item + .affhub-faq__item {
  margin-top: 0.5rem;
}
.affhub-faq__item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 1.75rem;
}
.affhub-faq__item summary::-webkit-details-marker { display: none; }
.affhub-faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--affhub-color-primary, #1d4d39);
  transition: transform 150ms ease;
}
.affhub-faq__item[open] summary::after { content: "−"; }

/* --- Methodology box --- */
.affhub-methodology {
  background: var(--affhub-color-card, #fffdf8);
  border: 1px solid var(--affhub-color-line, #e7debd);
  border-radius: 14px;
  padding: 1.1rem;
}
.affhub-methodology__title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.4rem;
  color: var(--affhub-color-primary, #1d4d39);
}

/* --- Updated badge --- */
.affhub-updated {
  margin: 0;
  font-size: 0.85rem;
  color: var(--affhub-color-muted, #6b6655);
}

/* --- Header navigation polish --- */
.affhub-header__row { align-items: center; }
.affhub-header__brand .wp-block-site-title { line-height: 1.1; margin: 0; }

/* --- Forced-colors mode (Windows high contrast) --- */
@media (forced-colors: active) {
  .affhub-cta { border: 1px solid CanvasText; }
  .affhub-card { border: 1px solid CanvasText; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .affhub-card, .affhub-cta { transition: none; }
  .affhub-card:hover, .affhub-cta:hover { transform: none; }
}
