/* ============================================================================
   portainer.ai theme layer.

   Loaded after portainer-site-engine's shared base theme (theme/base.css,
   linked by the engine because site.baseTheme is true), so rules here win
   the cascade. See the engine README's "Theme layering": override tokens and
   add components here; a change the whole site family needs belongs in the
   engine's base instead.
   ============================================================================ */

/* ============================================================================
   PORTAINER.AI ADDITIONS
   Components the shared base theme doesn't have. Colours always come from
   the base tokens (--accent, --text, --muted, --border, --surface, ...) so
   both themes stay correct. Before adding a rule here, check the base for an
   existing component that already does the job.
   ============================================================================ */

/* Light/dark image pairs: put both <img>s side by side, one with .img-light
   and one with .img-dark, and only the one matching the site theme shows.
   Keyed on the theme attribute (not prefers-color-scheme) so it follows the
   theme toggle. Give both loading="lazy" so the hidden one isn't fetched.
   Used for the brand wordmark and the diagram PNGs. */
[theme='dark'] .img-light,:root:not([theme='dark']) .img-dark{display:none}
.fbrand .brand-logo{height:22px;margin-bottom:16px}

/* Shown in place of a HubSpot embed while that form's ID is still unset
   (partials/briefing-form.njk) - inside .hs-form-box, so always on white. */
.form-placeholder{border:1px dashed #d1d5db;border-radius:10px;padding:28px;text-align:center;font-size:14px;line-height:1.55;color:#667085}
.form-placeholder code{background:#f3f4f6;color:#1f2937;padding:1px 5px;border-radius:4px;font-size:.92em}

/* Video modal, opened by __ai_video() in theme.js */
.vmodal{position:fixed;inset:0;z-index:2000;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(9,9,11,.82);backdrop-filter:blur(4px)}
.vmodal.open{display:flex}
.vmodal-body{position:relative;width:min(960px,100%)}
.vmodal-close{position:absolute;top:-44px;right:0;background:none;border:0;color:#fff;font-size:30px;line-height:1;cursor:pointer;padding:4px 10px}
.vmodal-frame{position:relative;width:100%;aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:#000;box-shadow:var(--pop-shadow)}
.vmodal-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* Click-to-load video, driven by __ai_video_inline() in theme.js: a poster
   image with a "Watch" pill bottom-left (kept off-centre so it never covers
   text in the poster), replaced by the player (a <video>, or a YouTube iframe) on click. */
.vfacade{position:relative;display:block;width:100%;aspect-ratio:16/9;padding:0;border:1px solid var(--border);border-radius:14px;overflow:hidden;background:#000;cursor:pointer;box-shadow:var(--card-shadow);transition:transform .2s,box-shadow .2s}
.vfacade:not(.playing):hover{transform:translateY(-2px);box-shadow:var(--pop-shadow)}
.vfacade.playing{cursor:default}
.vfacade img,.vfacade iframe,.vfacade video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border:0}
.vfacade-play{position:absolute;left:16px;bottom:16px;display:flex;align-items:center;gap:10px;padding:10px 18px 10px 14px;border-radius:999px;background:var(--accent);color:#fff;font-size:14px;font-weight:600;box-shadow:0 8px 28px rgba(0,0,0,.45);transition:filter .2s}
.vfacade:hover .vfacade-play{filter:brightness(1.1)}
.vfacade-play em{font-style:normal;font-weight:500;opacity:.85;padding-left:10px;border-left:1px solid rgba(255,255,255,.4)}
.vfacade:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

/* Diagram frame: a bordered panel around a diagram (an <img> pair or an
   inline SVG), the portainer.ai counterpart of portainer.io's .soln-diagram. */
.diagram-frame{margin:0;padding:24px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:var(--card-shadow)}
.diagram-frame svg,.diagram-frame img{display:block;width:100%;height:auto}
.diagram-frame figcaption{margin-top:14px;font-size:12.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);text-align:center}
/* .diagram-bare: for diagram images that carry their own background and
   panel (the light/dark PNG pairs) - no box around them, just the image. */
.diagram-frame.diagram-bare{padding:0;border:0;border-radius:0;background:none;box-shadow:none}

/* Feature checklist inside a .uc-card (home page product cards), sized to
   match the card's own body text rather than ul.checklist's default. */
.uc-card ul.checklist{gap:8px;margin:0 0 18px}
.uc-card ul.checklist li{font-size:14px;color:var(--text-semi);line-height:1.4}

/* ---- Page-specific components (merged from the page conversions) ---- */

/* portainer-aigrid */
/* Keep a wide <img> diagram legible on phones: scroll it sideways instead of shrinking it. */
@media(max-width:700px){.diagram-frame.diagram-scroll{overflow-x:auto}.diagram-frame.diagram-scroll img{min-width:640px}}

/* portainer-command */
/* Five-across variant of .steps for the Portainer-Command core loop (2-up on tablets, 1-up on phones) */
.steps.steps-5{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.steps.steps-5 .step{padding:22px 20px}
@media(max-width:1100px){.steps.steps-5{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.steps.steps-5{grid-template-columns:1fr}}

/* portainer-run */
/* Positioning-spectrum SVG (products/portainer-run #landscape): themes the SVG's class-based fills; scoped under .diagram-frame to outrank its dark-mode text remap. */
.diagram-frame .spectrum .zone{fill:var(--surface-2);stroke:var(--border-strong)}
.diagram-frame .spectrum text{fill:var(--text)}
.diagram-frame .spectrum .sub{fill:var(--muted)}
.diagram-frame .spectrum .dot{fill:var(--muted)}
.diagram-frame .spectrum .accent{fill:var(--accent)}
.diagram-frame .spectrum .run,.diagram-frame .spectrum .runbox{fill:var(--accent);stroke:var(--accent)}
.diagram-frame .spectrum .run{stroke:none}
/* "Click to enlarge / download" badge overlaid on a screenshot; deliberately fixed dark-on-image colours. */
.img-hint-wrap{position:relative;display:block}
.img-hint{position:absolute;right:14px;bottom:14px;pointer-events:none;background:rgba(9,9,11,.78);color:#fff;border-radius:6px;padding:5px 10px;font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase}

/* pricing */
/* Plan title inside a quote-based .price-tier card (pricing page), sitting between .tname and .tdesc */
.price-tier .ptier-h{font-size:22px;font-weight:800;letter-spacing:-.02em;line-height:1.2;color:var(--text);margin:10px 0 8px}

/* use-cases */
/* Use-case scenario: .split modifier weighting the copy column over the product callout card */
.split.uc-split{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);align-items:center}@media(max-width:900px){.split.uc-split{grid-template-columns:1fr}}

/* Product-page hero tagline: one accent-coloured line between the h1 and
   the lead (the base's .pullquote is italic and uses the body text colour,
   so it isn't a fit). */
.hero-tagline{color:var(--accent-2);font-size:clamp(19px,1.9vw,23px);font-weight:600;line-height:1.35;letter-spacing:-.01em;max-width:36ch;margin:0 0 22px}

/* Footer: the base grid has room for four link columns; portainer.ai has
   three, so spread them across the full width on desktop (the base's
   two-column mobile layout below 900px is unchanged). */
@media (min-width:901px){.fcols{grid-template-columns:1.6fr 1fr 1fr 1fr}}

/* .stack highlight: the base highlights the third child (the middle layer)
   by position. Marking a layer with .key highlights that one instead, with
   an accent-blue border. */
.stack .layer.key{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.stack:has(.layer.key) .layer:not(.key){border-color:var(--border);box-shadow:none}

/* Social-proof band: a full-width strip directly under a hero, with an
   eyebrow-pill badge and a line of supporting text. */
.proof-bar{background:var(--eyebrow-bg);border-top:1px solid var(--eyebrow-border);border-bottom:1px solid var(--eyebrow-border)}
.proof-bar .wrap{display:flex;align-items:center;justify-content:center;gap:10px 16px;flex-wrap:wrap;min-height:64px;padding-top:14px;padding-bottom:14px;text-align:center;font-size:15.5px;font-weight:500;color:var(--text-semi)}
.proof-bar .eyebrow{margin:0;background:var(--surface)}
.proof-bar .dot{color:var(--muted)}
@media (max-width:700px){.proof-bar .dot{display:none}}

/* Hero h1 at the size portainer.io's home page hero uses (its .poc-hero-copy
   h1: 46px, 34px on phones) rather than the base's 40-76px --fs-hero scale,
   which is too large for portainer.ai's sentence-length headlines. */
.hero h1{font-size:46px;line-height:1.05}
@media(max-width:600px){.hero h1{font-size:34px}}

/* Beta status pill: the base's amber badge colours (as .rc-badge.event-upcoming)
   under a name that says what it's for. */
.rc-badge.beta{background:rgba(251,191,36,.14);color:var(--warning)}
/* install page: keep .prose from overriding .ctable / .ind-list */
.prose .ctwrap .ctable{margin:0;border:0;border-radius:0}
.prose ul.ind-list{padding-left:0;margin:0 0 22px}
.prose .ind-list li{margin:0}
.callout ul.ind-list{margin:14px 0 0}
.twoways .ind-list li{padding-top:8px;padding-bottom:8px}
.ind-list.toc{counter-reset:toc}
.ind-list.toc li{counter-increment:toc}
.ind-list.toc li:before{content:counter(toc) ".";min-width:1.6em;color:var(--accent);font-weight:700}
.twoways .toc-label{margin:22px 0 8px;padding-bottom:0;border-bottom:0}
.twoways .ind-list{margin:0}
.prose .article-callout{max-width:none;margin:28px 0}
.article-callout ul.ind-list{margin:14px 0 0}
.prose .article-callout>p:not(.article-callout-title){font-size:15px;line-height:1.6}
.article-callout .ind-list li:last-child{border-bottom:0;padding-bottom:0}
/* install page */
.prose.prose-flush{margin:0;padding:0;max-width:820px}
.prose-flush .ctwrap{margin:16px 0}
.twoways.toc-box{max-width:820px}
.shot-pending{display:none}

/* Product names inside a lead paragraph: bold accent links to the product
   pages. nowrap keeps a hyphenated name (Portainer-Command) from breaking
   at the hyphen. */
.lead a.product-link{color:var(--accent);font-weight:700;white-space:nowrap}

/* Inline text link inside a card or FAQ answer: accent-coloured and bold, so
   it reads as a link without an underline. */
a.inline-link{color:var(--accent);font-weight:600}

/* Product card on the pricing page's node table: status badge on its own
   line with space beneath it, and the button row pinned to the card's foot so
   buttons line up across cards of different text length. */
.node-card{display:flex;flex-direction:column}
.node-card .node-badge{margin:2px 0 14px}
.node-card .cta-row{margin-top:auto;padding-top:20px;flex-wrap:nowrap}
