/* ============================================================================
   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}

/* 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 with a left rule,
   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;padding-left:18px;border-left:3px solid var(--accent-2)}

/* 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)}
