/*
 * "Rasto Business" in the header, as real text beside the mark.
 *
 * Setting a logo REPLACES the site name text (verified against the rendered
 * DOM: the header home link contains only <img alt="logo">), and the platform
 * exposes no switch to show both. So the name is rendered here.
 *
 * It attaches to the home link INSIDE `dai-logo`, not to `dai-logo` itself:
 * that class is a flex row holding the logo and whatever else the header
 * carries, so an ::after on it would land at the end of the row rather than
 * beside the mark. The anchor holds four breakpoint and theme variants of the
 * mark, three of them display:none, so a flex row lays out as mark + name.
 *
 * Deliberately additive. If this stylesheet fails to load, or the class is
 * renamed, the header still shows the logo. Nothing depends on it.
 */

.dai-logo > a[href="/"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dai-logo > a[href="/"]::after {
  content: "Rasto Business";
  /* The theme's own heading token, so the name flips with light and dark
     (#1a1a1a and #f2f2f2) exactly like every other heading on the page. */
  color: var(--heading, currentColor);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

/* The mobile header is tight, and the mark alone identifies the site there. */
@media (max-width: 640px) {
  .dai-logo > a[href="/"]::after {
    content: none;
  }
}

/* ------------------------------------------------------------------------ */

/*
 * Hide the "Last updated" line in the page footer.
 *
 * `dai-footer` is from the platform's own documented `dai-*` list. It holds
 * exactly two children on every page type (verified against the rendered DOM
 * on docs.rasto.co: Documentation, API Reference, Help Center, Changelog):
 * a <p> carrying "Last updated <when>", and the "Built with Documentation.AI"
 * link. The <p> has no class of its own, so the child selector is the stable
 * way to reach it without depending on generated class names.
 *
 * The footer is a flex row with justify-between, so hiding the <p> alone
 * would pull the remaining link across to the left. Pinning the row to
 * flex-end leaves that link exactly where it sits today. `footer.dai-footer`
 * outranks the platform's own `.justify-between`, which is one class and so
 * would otherwise win or lose on load order.
 *
 * Additive like the rest of this file: if the stylesheet fails to load, the
 * footer simply renders as the platform ships it.
 */

.dai-footer > p {
  display: none;
}

footer.dai-footer {
  justify-content: flex-end;
}

/* ------------------------------------------------------------------------ */

/*
 * The AI assistant in the brand colour instead of near-black.
 *
 * The platform's default button variant is `bg-primary
 * text-primary-foreground`, and its stylesheet maps `bg-primary` to
 * `var(--heading)`, not to `--brand`. Our heading colour is the platform
 * default (#1a1a1a light, #f2f2f2 dark), so every default-variant button
 * renders black in light mode and white in dark. The assistant uses that
 * variant for exactly three controls, verified in the served bundle on
 * 2026-09-27: the floating "Ask AI" launcher (`dai-ask-ai-button`, shown
 * below the xl breakpoint) and the Send and Cancel buttons inside the chat
 * panel (`dai-agent-chat`). Its follow-up suggestions already use `--brand`.
 *
 * Both hooks are stable `dai-*` classes. The rule is scoped to them rather
 * than remapping `--heading`, which would recolour every heading on the
 * site. `--brand-text` is the platform's own contrast pair for `--brand`
 * (white on #5163ff, black on #8b98ff). The hover shade mirrors the
 * platform's `hover:bg-primary/90`.
 *
 * Additive like the rest of this file: without it the assistant renders as
 * the platform ships it.
 */

button.dai-ask-ai-button,
.dai-agent-chat .bg-primary {
  background-color: var(--brand);
  color: var(--brand-text);
}

button.dai-ask-ai-button:hover,
.dai-agent-chat .bg-primary:hover {
  background-color: color-mix(in srgb, var(--brand) 90%, transparent);
}
