/* Documentation uses the theme palette and buttons without rebuilding legacy Sass. */
.main--documentation { overflow: visible; }
body.single-doc:has(.doc-product-dock) { padding-bottom: var(--doc-product-dock-height, 84px); }
html:has(.doc-product-dock) { --doc-product-dock-height: 84px; scroll-padding-bottom: var(--doc-product-dock-height); }
.doc-section {
  --doc-sticky-top: 25px;
  --doc-column-gap: 32px;
  padding: 40px 0 64px;
  color: var(--v8pro-color-text);
}
.admin-bar .doc-section { --doc-sticky-top: 56px; }
.doc-container.container { width: 100%; max-width: 1500px; padding-right: 24px; padding-left: 24px; }
.doc-product-dock {
  position: fixed; inset: auto 0 0; z-index: 18;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--v8pro-color-border);
  background: var(--v8pro-color-background-card);
  box-shadow: 0 -2px 10px #0000000a;
}
.doc-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 1.35fr) auto;
  align-items: center;
  gap: 24px;
}
.doc-product__name { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.doc-product__name strong { min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.doc-product__name .doc-product__catalog, .doc-product__name > span { font-size: 14px; font-weight: 400; line-height: 1.5; }
.doc-product__configuration { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.doc-product__configuration label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.doc-product__configuration select {
  appearance: none;
  width: 100%; min-width: 0; height: 44px; padding: 10px 40px 10px 14px;
  border: 1px solid var(--v8pro-color-border-strong); border-radius: 6px;
  background-color: #fff; color: inherit; font: inherit; font-size: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23666666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  text-overflow: ellipsis;
}
.doc-product__actions { display: flex; align-items: center; gap: 10px; }
.doc-product .button { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 44px; min-height: 44px; padding: 0 18px; border-radius: 6px; font-size: 14px; font-weight: 600; line-height: 1.3; text-align: center; white-space: nowrap; }
.doc-product .button-primary { min-width: 100px; }
.doc-product [aria-disabled="true"] { opacity: .5; cursor: default; pointer-events: none; }
.doc-product noscript, .doc-product__noscript { grid-column: 1 / -1; }
.doc-product__noscript { max-height: 25vh; overflow-y: auto; font-size: 14px; }
.doc-product--legacy { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.doc-mobile-controls { display: none; }
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); column-gap: var(--doc-column-gap); align-items: start; }
.doc-heading { grid-column: 2 / -1; grid-row: 1; min-width: 0; width: 100%; }
.doc-reading { grid-column: 2 / -1; grid-row: 2; min-width: 0; }
.doc-after-article { grid-column: 2 / -1; grid-row: 3; width: 100%; min-width: 0; }
.doc-after-article > :is(.read-more, .thankyou) > .container { width: 100%; max-width: none; padding-right: 0; padding-left: 0; }
.doc-sidebar { position: sticky; top: var(--doc-sticky-top); max-height: var(--doc-sidebar-height, calc(100dvh - var(--doc-sticky-top) - var(--doc-product-dock-height, 0px) - 24px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; font-size: 16px; line-height: 1.5; grid-column: 1; grid-row: 1 / span 3; padding-right: 0; }
.doc-tree, .doc-tree ul, .doc-toc { margin: 0; padding: 0; list-style: none; }
.doc-tree ul { margin-top: 4px; margin-left: 0; padding-left: 16px; }
.doc-tree .doc-toc { margin: 4px 0 12px; padding-left: 16px; border-left: 1px solid var(--v8pro-color-border); }
.doc-tree .doc-toc a { font-size: 14px; font-weight: 400; }
.doc-tree li, .doc-toc li { margin: 0; }
.doc-tree a, .doc-tree__current, .doc-toc a { display: block; padding: 9px 0; color: var(--v8pro-color-text-muted); text-decoration: none; overflow-wrap: break-word; }
.doc-tree a:hover { color: var(--v8pro-color-accent-text); }
.doc-tree [aria-current="page"] { color: var(--v8pro-color-text); font-weight: 600; }
.doc-toc a { padding: 6px 0; line-height: 1.6; }
.doc-toc a:hover, .doc-toc [aria-current="location"] { color: var(--v8pro-color-accent-text); background: transparent; }
.doc-tree .doc-toc [aria-current="location"] { font-weight: 600; box-shadow: -2px 0 var(--v8pro-color-accent); }
.doc-toc a { padding-left: 12px; margin-left: -12px; }
.doc-toc__level-3 { padding-left: 16px; }
.doc-article { min-width: 0; }
.doc-breadcrumbs { margin-bottom: 16px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.doc-breadcrumbs :is(ol, ul) { flex-wrap: wrap; }
.doc-breadcrumbs__list { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.doc-breadcrumbs__list li + li::before { content: '/'; padding-right: 12px; color: var(--v8pro-color-text-muted); }
.doc-article__header { margin-bottom: 28px; }
.doc-article__title.page__title { margin: 0 0 12px; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.1; overflow-wrap: break-word; }
.doc-article__content { font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.doc-article__content h2 { margin: 40px 0 20px; font-size: 28px; line-height: 1.3; }
.doc-article__content > h2:first-child, .doc-article__content > h3:first-child { margin-top: 0; }
.doc-article__content h3 { margin: 30px 0 16px; font-size: 22px; line-height: 1.4; }
.doc-article__content :is(h1, h2, h3, h4, h5, h6, [id], [name]) { scroll-margin-top: calc(var(--doc-sticky-top) + 20px); }
.doc-anchor { display: block; height: 0; }
.doc-article__content img, .doc-legacy-products img { max-width: 100%; height: auto; }
.doc-article__content .wp-caption { max-width: 100%; margin-right: 0; margin-left: 0; }
.doc-article__content .v8_image:hover { transform: none; }
.doc-article__content iframe, .doc-article__content video { max-width: 100%; }
.doc-article__content table, .doc-legacy-products table { display: block; max-width: 100%; overflow-x: auto; }
.doc-article__content pre { max-width: 100%; overflow-x: auto; }
/* Classic editor wrappers and automatic line breaks must not change the help cards. */
.doc-article__content .help-format-chooser > :is(div, p),
.doc-article__content .help-format-chooser > div > p { display: contents; }
.doc-article__content .help-format-chooser br { display: none; }
/* Use the original help icons even when the editor only preserves a text symbol. */
.doc-article__content :is(.help-format-card--video, .help-format-card--detail) .help-format-card__icon:not(:has(svg)) { font-size: 0; }
.doc-article__content :is(.help-format-card--video, .help-format-card--detail) .help-format-card__icon:not(:has(svg))::before {
  content: '';
  width: 22px; height: 22px;
  background-color: currentColor;
  mask: var(--help-format-icon) center / contain no-repeat;
}
.doc-article__content .help-format-card--detail {
  --help-format-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l4 4v14H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z'/%3E%3Cpath d='M14 3v5h4M9 12h6M9 16h6'/%3E%3C/svg%3E");
}
.doc-article__content .help-format-card--video {
  --help-format-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Cpath d='m10 9 5 3-5 3V9Z'/%3E%3C/svg%3E");
}
.doc-legacy-products { margin-top: 36px; overflow-x: auto; }
.doc-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 48px 0; padding-top: 24px; border-top: 1px solid var(--v8pro-color-border); }
.doc-pagination__link { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--v8pro-color-border); border-radius: 8px; text-decoration: none; color: inherit; }
.doc-pagination__link:hover { border-color: var(--v8pro-color-accent); }
.doc-pagination__link span { color: var(--v8pro-color-text-muted); font-size: 14px; }
.doc-pagination__link--next { grid-column: 2; text-align: right; }
.doc-section :is(a, button, select):focus-visible { outline: 2px solid var(--v8pro-color-accent); outline-offset: 3px; }
@media (max-width: 1199px) {
  .doc-section { --doc-column-gap: 24px; }
  .doc-product { gap: 16px; }
  .doc-product .button { padding-right: 14px; padding-left: 14px; }
}
@media (max-width: 991px) {
  .doc-section { padding-top: 20px; }
  .admin-bar .doc-section { --doc-sticky-top: 48px; }
  .doc-container.container { padding-right: 16px; padding-left: 16px; }
  html:has(.doc-product-dock) { --doc-product-dock-height: 108px; }
  .doc-product { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .doc-product__name { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 12px; }
  .doc-product__name strong { font-size: 14px; }
  .doc-product__name .doc-product__catalog { flex-shrink: 0; }
  .doc-product__actions { justify-content: flex-end; }
  .doc-product--legacy .doc-product__name { grid-column: auto; flex-direction: column; }
  .doc-layout { display: flex; flex-direction: column; gap: 24px; }
  .doc-reading { display: contents; }
  .doc-article__header { margin-bottom: 0; }
  .doc-article { width: 100%; }
  .doc-sidebar { position: static; width: 100%; max-height: 50vh; padding: 16px; border: 1px solid var(--v8pro-color-border); border-radius: 8px; background: #fff; }
  .doc--enhanced .doc-mobile-controls {
    display: flex; position: sticky; top: var(--doc-sticky-top); z-index: 20;
    gap: 8px; padding: 10px 0; margin-bottom: 20px; background: #fff;
  }
  .doc-mobile-controls .button { flex: 1; min-height: 44px; padding: 10px 8px; font-size: 14px; }
  .doc-mobile-controls [aria-expanded="true"] { color: var(--v8pro-color-accent-text); border-color: var(--v8pro-color-accent); }
  .doc--enhanced .doc-sidebar { display: none; position: fixed; z-index: 21; top: var(--doc-panel-top, 100px); right: 16px; left: 16px; width: auto; max-height: min(65dvh, calc(100dvh - var(--doc-panel-top, 100px) - var(--doc-product-dock-height, 0px) - 16px)); box-shadow: 0 8px 28px #0002; }
  .doc--enhanced .doc-sidebar.is-open { display: block; }
  .doc--enhanced .doc-article__content :is(h1, h2, h3, h4, h5, h6, [id], [name]) { scroll-margin-top: calc(var(--doc-sticky-top) + 84px); }
}
@media (max-width: 575px) {
  html:has(.doc-product-dock) { --doc-product-dock-height: 154px; }
  .doc-product-dock { padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .doc-product { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .doc-product__name { display: flex; gap: 8px; }
  .doc-product__name strong { display: block; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .doc-product__name .doc-product__catalog { font-size: 13px; white-space: nowrap; }
  .doc-product--legacy .doc-product__name { align-items: flex-start; }
  .doc-product__actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .doc-product .button { padding-right: 12px; padding-left: 12px; }
  .doc-product .button-primary { min-width: 84px; }
  .doc-article__content h2 { font-size: 25px; }
  .doc-pagination { grid-template-columns: 1fr; }
  .doc-pagination__link--next { grid-column: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  html:has(.main--documentation) { scroll-behavior: smooth; }
}
