/* Product Documents library (/customer-support/product_documents/).
 * Spec: Dev Docs/Design/product_documents/product-documents-spec.md.
 * Loaded only on pages with the .pg-docs Avada container (inc/product-documents.php); tokens from brand-refresh.css.
 * Content is plain, editor-safe HTML (tables, lists); this sheet turns each table row into a card on phones.
 * Selectors key on table structure (first column = product, second = downloads, last = date), not on classes, so
 * rows, links and lists the web team adds with the editor's table/list tools get the same design.
 */
/* The child theme's 50px #content margin plus the container padding left ~100px under the title banner. */
body.pg-docs-page #content.site-content { margin-top: 0; }
body.pg-docs-page #primary { margin-top: 0; margin-bottom: 0; }
body.pg-brand-refresh .pg-docs.fusion-fullwidth { max-width: 1200px; margin: 0 auto; padding: 48px 24px 64px !important; color: var(--pg-ink); }
body.pg-brand-refresh .pg-docs .fusion-layout-column { width: 100% !important; margin: 0 !important; }
body.pg-brand-refresh .pg-docs .fusion-column-wrapper { min-height: 0 !important; padding: 0 !important; }
body.pg-brand-refresh .pg-docs .fusion-text { margin: 0; }
body.pg-brand-refresh .pg-docs .fusion-text > :last-child { margin-bottom: 0; }
body.pg-brand-refresh .pg-docs a { color: var(--pg-purple); }
body.pg-brand-refresh .pg-docs a:hover { color: var(--pg-orange-deep); }
body.pg-brand-refresh .pg-docs a:focus-visible,
body.pg-brand-refresh .pg-docs button:focus-visible,
body.pg-brand-refresh .pg-docs input:focus-visible { outline: 3px solid var(--pg-purple); outline-offset: 2px; }

/* Intro: what's new callout and jump links */
body.pg-brand-refresh .pg-docs .pg-docs__intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--pg-space-3); margin-bottom: var(--pg-space-3); }
body.pg-brand-refresh .pg-docs .pg-docs__news,
body.pg-brand-refresh .pg-docs .pg-docs__toc { background: var(--pg-surface); border-radius: var(--pg-radius-md); padding: var(--pg-space-3); }
body.pg-brand-refresh .pg-docs .pg-docs__news { border-left: 4px solid var(--pg-orange); }
body.pg-brand-refresh .pg-docs h2.pg-docs__news-title { font-size: 18px; line-height: 1.35; margin: 0 0 4px; color: var(--pg-ink); }
body.pg-brand-refresh .pg-docs .pg-docs__news-date { margin: 0 0 var(--pg-space-2); font-size: 14px; color: var(--pg-ink-muted); }
body.pg-brand-refresh .pg-docs .pg-docs__news-list { list-style: none; margin: 0; padding: 0; }
body.pg-brand-refresh .pg-docs .pg-docs__news-list li { margin: 0 0 var(--pg-space-1); line-height: 1.5; }
body.pg-brand-refresh .pg-docs .pg-docs__news-list li:last-child { margin-bottom: 0; }
body.pg-brand-refresh .pg-docs .pg-docs__news-list a { font-weight: 700; }
body.pg-brand-refresh .pg-docs .pg-docs__tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--pg-white); border: 1px solid var(--pg-border); font-size: 12px; line-height: 1.6; color: var(--pg-ink-muted); vertical-align: 1px; white-space: nowrap; }
body.pg-brand-refresh .pg-docs .pg-docs__toc-title { margin: 0 0 var(--pg-space-1); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pg-purple); }
body.pg-brand-refresh .pg-docs .pg-docs__toc-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--pg-space-3); }
body.pg-brand-refresh .pg-docs .pg-docs__toc-list li { margin: 0; break-inside: avoid; }
body.pg-brand-refresh .pg-docs .pg-docs__toc-list a { display: block; padding: 5px 0; font-size: 14px; line-height: 1.4; text-decoration: none; }
body.pg-brand-refresh .pg-docs .pg-docs__toc-list a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Filter (added by product-documents.js) */
body.pg-brand-refresh .pg-docs .pg-docs-filter { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--pg-space-1) var(--pg-space-2); padding: var(--pg-space-2) 0 0; }
body.pg-brand-refresh .pg-docs .pg-docs-filter label { font-weight: 700; font-size: 14px; }
body.pg-brand-refresh .pg-docs .pg-docs-filter input[type="search"] { flex: 1 1 280px; max-width: 420px; min-height: 44px; margin: 0; padding: 8px 14px; border: 1px solid var(--pg-border-strong); border-radius: var(--pg-radius-sm); background: var(--pg-white); font-size: 16px; color: var(--pg-ink); }
body.pg-brand-refresh .pg-docs .pg-docs-filter__status { font-size: 14px; color: var(--pg-ink-muted); }
body.pg-brand-refresh .pg-docs .pg-docs-filter__empty { grid-column: 1 / -1; margin: 0; padding: var(--pg-space-3); border: 1px dashed var(--pg-border-strong); border-radius: var(--pg-radius-md); text-align: center; }
body.pg-brand-refresh .pg-docs .pg-docs-filter__empty[hidden] { display: none; }
body.pg-brand-refresh .pg-docs button.pg-docs-filter__clear { min-height: 44px; margin: 0 0 0 var(--pg-space-1); padding: 8px 16px; border: 1px solid var(--pg-purple); border-radius: var(--pg-radius-sm); background: var(--pg-white); color: var(--pg-purple); font-size: 14px; font-weight: 700; cursor: pointer; }
body.pg-brand-refresh .pg-docs button.pg-docs-filter__clear:hover { background: var(--pg-purple); color: var(--pg-white); }
body.pg-brand-refresh .pg-docs .fusion-text[hidden] { display: none; }

/* Sections */
body.pg-brand-refresh .pg-docs .fusion-text:not(.pg-docs__intro) { padding-top: var(--pg-space-5); }
body.pg-brand-refresh .pg-docs .fusion-text:not(.pg-docs__intro) h2 { margin: 0 0 var(--pg-space-1); font-size: 22px; line-height: 1.3; font-weight: 700; color: var(--pg-ink); scroll-margin-top: 120px; }
body.pg-brand-refresh .pg-docs .fusion-text:not(.pg-docs__intro) h2 sup,
body.pg-brand-refresh .pg-docs table sup { font-size: .6em; top: -.6em; }
body.pg-brand-refresh .pg-docs .pg-docs__note { margin: 0 0 var(--pg-space-2); font-size: 14px; color: var(--pg-ink-muted); }

/* Tables */
body.pg-brand-refresh .pg-docs table { width: 100%; margin: var(--pg-space-2) 0 0; border: 1px solid var(--pg-border); border-radius: var(--pg-radius-md); border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--pg-white); table-layout: auto; }
body.pg-brand-refresh .pg-docs .pg-docs__note + table { margin-top: 0; }
body.pg-brand-refresh .pg-docs table th,
body.pg-brand-refresh .pg-docs table td { padding: 14px 20px; border: 0; border-top: 1px solid var(--pg-border); text-align: left; vertical-align: top; background: transparent; font-size: 15px; line-height: 1.5; }
body.pg-brand-refresh .pg-docs table thead th { border-top: 0; background: var(--pg-surface); color: var(--pg-ink); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
body.pg-brand-refresh .pg-docs table tbody tr > :first-child { width: 32%; font-weight: 700; color: var(--pg-ink); }
body.pg-brand-refresh .pg-docs table tbody tr > :first-child a { text-decoration: none; }
body.pg-brand-refresh .pg-docs table tbody tr > :first-child a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.pg-brand-refresh .pg-docs table tbody td:last-child:not(:nth-child(2)) { width: 150px; white-space: nowrap; color: var(--pg-ink-muted); font-size: 14px; }
body.pg-brand-refresh .pg-docs table tbody td:last-child:nth-child(2) { color: var(--pg-ink-muted); }
body.pg-brand-refresh .pg-docs table tbody tr:hover > * { background: #fafafc; }

/* Download links as compact pills; file type from the URL */
body.pg-brand-refresh .pg-docs table td:nth-child(2):not(:last-child) ul { display: flex; flex-wrap: wrap; gap: var(--pg-space-1); margin: 0; padding: 0; list-style: none; }
body.pg-brand-refresh .pg-docs table td:nth-child(2):not(:last-child) ul li { margin: 0; }
body.pg-brand-refresh .pg-docs table td:nth-child(2):not(:last-child) a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--pg-border); border-radius: 999px; background: var(--pg-white); font-size: 14px; line-height: 1.3; font-weight: 700; text-decoration: none; transition: border-color .15s, background-color .15s; }
body.pg-brand-refresh .pg-docs table td:nth-child(2):not(:last-child) a:hover { border-color: var(--pg-purple); background: var(--pg-surface); color: var(--pg-purple); }
body.pg-brand-refresh .pg-docs table td:nth-child(2):not(:last-child) li { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 0; font-size: 14px; color: var(--pg-ink-muted); }
body.pg-brand-refresh .pg-docs table a[href$=".pdf" i]::after,
body.pg-brand-refresh .pg-docs table a[href$=".xlsx" i]::after { font-size: 10px; font-weight: 700; letter-spacing: .06em; line-height: 1; padding: 3px 5px; border-radius: 3px; background: var(--pg-surface); color: var(--pg-ink-muted); }
body.pg-brand-refresh .pg-docs table a[href$=".pdf" i]::after { content: "PDF"; }
body.pg-brand-refresh .pg-docs table a[href$=".xlsx" i]::after { content: "XLSX"; }
body.pg-brand-refresh .pg-docs table tbody tr > :first-child a[href$=".pdf" i]::after,
body.pg-brand-refresh .pg-docs table tbody tr > :first-child a[href$=".xlsx" i]::after { margin-left: 8px; vertical-align: 2px; }

@media (max-width: 1024px) {
	body.pg-brand-refresh .pg-docs .pg-docs__intro { grid-template-columns: minmax(0, 1fr); }
	body.pg-brand-refresh .pg-docs table th,
	body.pg-brand-refresh .pg-docs table td { padding: 12px 14px; }
	body.pg-brand-refresh .pg-docs table tbody tr > :first-child { width: 28%; }
	body.pg-brand-refresh .pg-docs table tbody td:last-child:not(:nth-child(2)) { width: 110px; white-space: normal; }
	body.pg-brand-refresh .pg-docs table td:nth-child(2):not(:last-child) ul { gap: 6px; }
}

/* Phones: each row becomes a card; header row kept for screen readers only. */
@media (max-width: 760px) {
	/* Astra's container already gives 20px side gutters on phones. */
	body.pg-brand-refresh .pg-docs.fusion-fullwidth { padding: 32px 0 48px !important; }
	body.pg-brand-refresh .pg-docs table td:nth-child(2):not(:last-child) ul { gap: 8px 6px; }
	body.pg-brand-refresh .pg-docs table td:nth-child(2):not(:last-child) a { padding: 6px 10px; font-size: 13px; }
	body.pg-brand-refresh .pg-docs .pg-docs__toc-list { columns: 1; }
	body.pg-brand-refresh .pg-docs .fusion-text:not(.pg-docs__intro) { padding-top: var(--pg-space-4); }
	body.pg-brand-refresh .pg-docs .fusion-text:not(.pg-docs__intro) h2 { font-size: 20px; }
	body.pg-brand-refresh .pg-docs table,
	body.pg-brand-refresh .pg-docs table tbody,
	body.pg-brand-refresh .pg-docs table tr,
	body.pg-brand-refresh .pg-docs table th,
	body.pg-brand-refresh .pg-docs table td { display: block; width: auto !important; }
	body.pg-brand-refresh .pg-docs table { border: 0; border-radius: 0; overflow: visible; background: transparent; }
	body.pg-brand-refresh .pg-docs table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
	body.pg-brand-refresh .pg-docs table tbody tr { margin: 0 0 12px; padding: 16px; border: 1px solid var(--pg-border); border-radius: var(--pg-radius-md); background: var(--pg-white); }
	body.pg-brand-refresh .pg-docs table tbody tr:hover > * { background: transparent; }
	body.pg-brand-refresh .pg-docs table th,
	body.pg-brand-refresh .pg-docs table td { padding: 0; border: 0; }
	body.pg-brand-refresh .pg-docs table tbody tr > :first-child { margin-bottom: 10px; font-size: 16px; }
	body.pg-brand-refresh .pg-docs table tbody td:last-child:not(:nth-child(2)) { margin-top: 10px; white-space: normal; }
	body.pg-brand-refresh .pg-docs table tbody td:last-child:not(:nth-child(2))::before { content: "Last Updated: "; font-weight: 700; }
	body.pg-brand-refresh .pg-docs .pg-docs-filter input[type="search"] { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
	body.pg-brand-refresh .pg-docs table td:nth-child(2):not(:last-child) a { transition: none; }
}
body.pg-brand-refresh .pg-docs table tr[hidden] { display: none !important; }
