/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/*
 * The guest chat pins the page; every other guest page scrolls normally.
 *
 * This is a stylesheet rule rather than a class on <html> because Turbo Drive
 * replaces <body> and merges <head> on a visit but never touches the <html>
 * element's attributes — so a class put there on the chat's own render is
 * simply not present when a guest arrives from the entry form, which is how
 * every real guest arrives. Measured: <body> pinned correctly at 701px while
 * <html> stayed 1275px and the page still dragged 574px behind a composer
 * that was exactly where it should be.
 *
 * :has() rather than JavaScript because the selector is the whole logic, and
 * this app already requires a browser modern enough for it (allow_browser
 * versions: :modern in ApplicationController).
 */
html:has(> body.app-shell) {
  height: 100dvh;
  overflow: hidden;
}

/*
 * Printing a guide. Guests do this — a paper copy in a kitchen drawer is a
 * real artifact of a rental stay — and without these rules the fixed ask bar
 * stamps itself over the middle of every printed page.
 *
 * Hidden: the interactive chrome only — the ask bar, the chapter grid (its
 * anchors are dead on paper), the search form, the help card, and the
 * get-started button. Everything id-scoped to this guest page on purpose:
 * the host QR print sheet (host/qr_codes/print) shares this compiled build
 * and owns its own print design, so nothing here may name its ids.
 *
 * Deliberately NOT hidden: #report-guide (the Terms abuse route) and
 * #powered-by-askello (branding truth) — compliance surfaces survive on
 * paper. test/design_system/print_stylesheet_test.rb reads this file off
 * disk and holds both lists.
 */
@media print {
  #guide-action-bar,
  #guide-chapters,
  #guide-help-card,
  #get-started,
  #guide-content form[role="search"] {
    display: none !important;
  }
}
