/* IHG's rule overrides, loaded after each IHG site's own styles.css (#1742).
   Every IHG site gets this file: the child sites have none of their own, so
   base.html links the parent's. It ships with the release; the per-site
   stylesheets under shared/custom-static/ do not. */

/* #1575 (11 Nov 2026): IHG's primary logo at the size IHG.com shows it, about
   140 x 50, and a larger menu. The header <img> carries width="100"
   height="20", so "width: auto" keeps the logo's shape. The menu still scales
   with the screen: 18px on a 1440px screen, from 16px. */
#site-nav .navbar-brand .navbar-item img {
  width: auto;
  height: 50px;
  max-height: 50px;
  max-width: none;
}
/* max-width: none above clears the clamp the site's own stylesheet puts on every
   img (max-width: 100%). That clamp resolves against this item's 128px content
   box, so the 419x150 logo was drawn 128x50 - 8.4% narrower than its own shape.
   The item is a fixed 144px at every viewport, so the logo keeps its shape
   inside the item's own padding. */

#site-nav .navbar-link a,
#site-nav a.navbar-item {
  font-size: clamp(0.7rem, 1.25vw, 1.45rem);
}

/* #1713 (12 Nov 2026): IHG asked for the small green line above each page
   heading to go: the site name on most pages, the member name on the
   dashboard (which already says "Welcome, <name>"). Hidden, not removed from
   the page, so nothing that reads it breaks. */
.page-hero .subtitle.has-text-success {
  display: none;
}

/* #1978 (1 Dec 2026): IHG asked for videos to go the full width of the page,
   on every page and for any video uploaded later. A video pasted into a page
   is a Vimeo or YouTube iframe in a wrapper whose inline padding-top: 56.25%
   keeps it 16:9; inside the content column that wrapper stops at the column's
   width (about 1000px) and the video can only grow taller. These rules take the
   wrapper out to the full window width and size its height from the window
   (56.25vw), so it stays 16:9. The page's html already hides horizontal
   overflow, so nothing scrolls sideways, and text in the column is unchanged.
   Only a wrapper whose own child is a video iframe is touched. */
#page-content .content > div:has(> iframe[src*="player.vimeo.com/video/"]),
#page-content .content > div:has(> iframe[src*="youtube.com/embed/"]),
#page-content .content > div:has(> iframe[src*="youtube-nocookie.com/embed/"]) {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  padding-top: 56.25vw !important;
}

/* #1978 (2 Dec 2026): the same video pasted into the editor's normal view
   arrives without its wrapper. CKEditor 4's paste filter drops div elements
   and every style attribute, so what is saved is the iframe alone, bare or
   inside a paragraph, 300px by 150px, and the rule above never matches it.
   These selectors catch that shape and take the iframe itself out to the
   full window width. It has no wrapper to take a height from, so it keeps
   16:9 with aspect-ratio. A wrapped video and any other iframe are untouched. */
#page-content .content > iframe[src*="player.vimeo.com/video/"],
#page-content .content > iframe[src*="youtube.com/embed/"],
#page-content .content > iframe[src*="youtube-nocookie.com/embed/"],
#page-content .content > p > iframe[src*="player.vimeo.com/video/"],
#page-content .content > p > iframe[src*="youtube.com/embed/"],
#page-content .content > p > iframe[src*="youtube-nocookie.com/embed/"] {
  display: block;
  width: 100vw;
  max-width: none;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-left: calc(50% - 50vw);
}
