/* ==========================================================================
   UTESA Indico branding — 10-chrome.css
   Global chrome shared by every page: header, logo, session bar, primary
   nav (.global-menu), footer, buttons, links, form fields.

   Selectors below are grounded in reference/prod-*.html (all five snapshots
   share the same header/footer markup). This Indico build has no
   `.header-core` element — the equivalent wrapper is `.header` >
   `.page-header`, confirmed present in every snapshot.

   IMPORTANT: `.header` is a bare, generic class name that Semantic UI also
   uses internally (`<div class="ui info message"><div class="header">...`
   — Indico's message boxes, cards, modals, accordions, popups all use it).
   Semantic UI components only exist at runtime (React-mounted), so they
   never appear in the pre-React reference/*.html snapshots — styling bare
   `.header` looked safe against the snapshots but leaked the site-header
   treatment onto every Semantic UI `.header` in the live app (e.g. the
   registration form's "Lista de participantes" section header rendering
   as illegible green-on-green). The real site header div is confirmed (in
   every reference/prod-*.html snapshot AND on the live instance) to be a
   DIRECT CHILD of <body> — `<body><ind-bypass-block-links></ind-bypass-
   block-links><div class="header">` — which no nested Semantic UI `.header`
   ever is, so `body > .header` scopes correctly without needing an
   exclusion selector. */

/* --- Header shell --------------------------------------------------- */

body > .header {
  background: var(--utesa-green);
  border-bottom: 3px solid var(--utesa-gold);
  /* Indico sets `.header{color:var(--accent-highlight-color) !important}`
     (a dark blue in the default theme) as the inherited text color for
     anything in the header without its own color rule. That's unreadable
     on our green background. `body > .header` (0,1,1) is already more
     specific than Indico's bare `.header` (0,1,0), so among the two
     !important declarations ours wins on specificity — no need to also
     broaden what we override. */
  color: #ffffff !important; /* overrides Indico's .header{color:var(--accent-highlight-color) !important} */
}

/* Indico's own stylesheet sets `div.page-header{background-color:#007cac}`
   (element+class, specificity 0,1,1) — more specific than a plain
   `.page-header` class rule, so it wins regardless of load order. We match
   `div.page-header` (confirmed markup: <div class="page-header clearfix">)
   to reach equal specificity and win on source order instead. */
.page-header,
div.page-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--utesa-space-md) var(--utesa-space-lg);
  background: transparent;
}

/* --- Logo ------------------------------------------------------------ */
/* <a id="header-logo"> wraps <img class="header-logo">, confirmed in
   reference/prod-home.html lines 92-98 (and equivalent in all snapshots).
   Brand mark is a 40x40 circular seal (utesa-logo.png / @2x), not a wide
   wordmark — no text lockup exists to pair it with in this markup, so the
   header shows the seal alone. */

#header-logo {
  display: inline-flex;
  align-items: center;
}

/* Indico's own stylesheet sets `div.page-header img.header-logo{margin:17px
   0 10px 40px;height:60px}` (element+class element+class, specificity
   0,2,2) — more specific than a plain `.header-logo` rule. We match that
   exact selector shape to reach equal specificity and win on source order. */
.header-logo,
div.page-header img.header-logo {
  height: 40px;
  width: 40px;
  max-width: none;
  margin: 0;
  object-fit: contain;
  border-radius: 50%;
}

/* --- Session bar (timezone / language / login) ------------------------ */

.session-bar {
  color: #ffffff;
}

.session-bar .i-button {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
}

.session-bar .i-button:hover,
.session-bar .i-button:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
  color: #ffffff;
}

.session-bar .i-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Language dropdown menu (#language-list) pops over white, so it must not
   inherit the header's white-on-green text color. */
#language-list {
  background: var(--utesa-surface);
  border: 1px solid var(--utesa-border);
  border-radius: var(--utesa-radius-sm);
  box-shadow: var(--utesa-shadow-md);
}

#language-list button {
  color: var(--utesa-ink);
}

#language-list button:hover,
#language-list button:focus {
  background: var(--utesa-green-light);
  color: var(--utesa-green-dark);
}

/* "Inicio de sesión" call-to-action button in the session bar
   (reference/prod-home.html: <a class="i-button icon-enter">) reads as the
   primary header action, so it gets the gold accent as a border/underline
   rather than a gold fill (gold-on-white/green fails contrast as text). */
.session-bar .i-button.icon-enter {
  border-color: var(--utesa-gold);
}

.session-bar .i-button.icon-enter:hover,
.session-bar .i-button.icon-enter:focus {
  background: var(--utesa-gold);
  border-color: var(--utesa-gold);
  color: var(--utesa-ink); /* dark text on gold fill keeps contrast on hover state */
}

/* Pre-existing accessibility issue, independent of any color we've set:
   the "Público" event-visibility badge (logged-in event managers only) is
   Indico's own `.i-button.accept` positive/success style --
   `div.session-bar .i-button.protection-public:not(.label):not(.borderless)
   :not(.text-color){background:#00c851;color:#f9f9f9}` -- white-ish text
   on that saturated green computes to ~2.1:1, well under the 4.5:1 text
   minimum (confirmed via computed style: rgb(249,249,249) on
   rgb(0,200,81)). Recoloring to our brand dark green fixes contrast
   (>8:1) and stops it clashing with the rest of the palette. Same
   selector shape (3 classes + 3 :not() pseudo-classes on the button,
   scoped under div.session-bar) to match Indico's specificity and win on
   source order. */
div.session-bar .i-button.protection-public:not(.label):not(.borderless):not(.text-color) {
  background: var(--utesa-green-dark);
  border-color: var(--utesa-green-dark);
  color: #ffffff;
}

div.session-bar .i-button.protection-public:not(.label):not(.borderless):not(.text-color):hover,
div.session-bar .i-button.protection-public:not(.label):not(.borderless):not(.text-color):focus,
div.session-bar .i-button.protection-public:not(.label):not(.borderless):not(.text-color):active {
  background: var(--utesa-green);
  border-color: var(--utesa-green-dark);
  color: #ffffff;
}

/* --- Event page icon toolbar (.event-page-header, inside body > .header) -
   Confirmed markup: event pages nest <div class="page-header page-header-
   dark event-page-header"> INSIDE body > .header (unlike the category/home
   page's .page-header, which sits below it on a light background) -- so
   this toolbar's icons render on our green gradient. Indico's own rule for
   them, `.i-button.text-color:not(.color-on-hover){color:#777}` (3 classes'
   worth of specificity), beats our earlier plain `.i-button.subtle` rule,
   so they stayed dark gray -- close to invisible on green. Match the same
   specificity, scoped to the header, to win on source order instead. */
.header .i-button.text-color,
.header .i-button.subtle {
  color: rgba(255, 255, 255, 0.92);
}

.header .i-button.text-color:hover,
.header .i-button.text-color:focus,
.header .i-button.subtle:hover,
.header .i-button.subtle:focus {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--utesa-radius-sm);
}

.header .i-button.text-color:focus-visible,
.header .i-button.subtle:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.header .i-button.open {
  background: rgba(255, 255, 255, 0.2);
}

/* The above loses to a MORE specific Indico rule for this exact toolbar --
   `.event-page-header .button-bar .i-button:not(.label):hover/:active/
   .open{background-image:linear-gradient(...#555,#484848)}` (5 class-level
   selectors vs. our 3) -- confirmed by inspecting computed style: the
   gradient survived even after the rule above. Match the same selector
   shape to tie its specificity and win on source order, and kill the
   gradient explicitly since `background:` shorthand alone doesn't clear a
   separately-set `background-image`. */
.event-page-header .button-bar .i-button:not(.label):hover,
.event-page-header .button-bar .i-button:not(.label):focus,
.event-page-header .button-bar .i-button:not(.label):active,
.event-page-header .button-bar .i-button:not(.label).open {
  background: rgba(255, 255, 255, 0.2);
  background-image: none;
  border-color: transparent;
  color: #ffffff;
}

.header .button-bar .separator {
  border-right-color: rgba(255, 255, 255, 0.35);
}

/* The theme/layout switcher dropdown (.i-dropdown) opened from that
   toolbar is Indico's own hardcoded dark variant --
   `.event-page-header .button-bar .i-dropdown{background:#333;
   border-color:#555}` with `li a{color:#999}` -- built to sit on Indico's
   default dark toolbar. Since we recolor that toolbar green instead of
   leaving it dark, its dark dropdown now clashes with every other
   dropdown on the site (all light surfaces: #language-list, the nav
   menu). Match Indico's exact selectors (same specificity) to win on
   source order and bring it in line with the rest. */
.event-page-header .button-bar .i-dropdown {
  background: var(--utesa-surface);
  border: 1px solid var(--utesa-border);
  border-radius: var(--utesa-radius-sm);
  box-shadow: var(--utesa-shadow-md);
}

.event-page-header .button-bar .i-dropdown li a {
  color: var(--utesa-ink);
}

.event-page-header .button-bar .i-dropdown li:hover a:not(.disabled) {
  color: var(--utesa-green-dark);
  background: var(--utesa-green-light);
}

/* Give the icon toolbar + session bar strip on event pages its own solid
   color, distinct from the lighter green title band below it, and less
   vertical padding than the generic `.page-header,div.page-header{padding:
   var(--utesa-space-md)...}` rule above -- a flatter, shorter bar instead
   of one continuous green block running from logo to hero. `div.event-
   page-header` (element+class) matches that generic rule's specificity,
   so loading after wins.

   `.page-header`'s own `max-width:1400px;margin:0 auto` (see the generic
   rule above) centers its CONTENT, but a `background` painted directly on
   that box only fills those 1400px too -- confirmed via getBoundingClientRect
   (1400px box in a 1920px viewport): past 1400px the surrounding body>.header
   green showed through on both sides instead of gold. The box-shadow +
   clip-path pair below is the standard full-bleed-background-inside-a-
   max-width-container trick: a huge same-color shadow paints past the box's
   edges, and clip-path stops it from creating horizontal scroll. */
div.event-page-header {
  background: var(--utesa-gold);
  box-shadow: 0 0 0 100vmax var(--utesa-gold);
  clip-path: inset(0 -100vmax);
  padding-top: var(--utesa-space-xs);
  padding-bottom: var(--utesa-space-xs);
}

/* Gold is an ACCENT color, not a text/icon background per docs/DESIGN.md
   §1 -- white on --utesa-gold measures ~2.4:1 (fails), while --utesa-ink
   on --utesa-gold measures ~8:1 (safe). Everything inside this toolbar
   (icons, separators, session bar, its dropdown-open state) was tuned
   white-on-green a moment ago; flip it all to dark ink now that the
   background is gold. Placed after every rule it re-overrides, at equal
   (never lower) specificity, so it wins purely on source order. */
.event-page-header .i-button.text-color,
.event-page-header .i-button.subtle {
  color: var(--utesa-ink);
}

/* The above still loses to TWO more specific Indico rules found via CDP's
   matched-styles cascade (`CSS.getMatchedStylesForNode`):
   `.event-page-header .button-bar .i-button:not(.label){background:#555;
   color:#bbb}` (4 classes) sets color, and the even more specific
   `.i-button.text-color.subtle:not(:hover):not(:active){background:rgba(
   0,0,0,0)}` (3 classes + 2 :not() pseudo-classes = 5) sets background --
   together producing a light-gray icon on a dark-gray-then-transparent
   background, confirmed by computed style (color rgb(187,187,187), bg
   transparent) despite every rule above. Match the second rule's exact
   shape, scoped to this toolbar, to exceed both. */
.event-page-header .button-bar .i-button.text-color.subtle:not(:hover):not(:active) {
  background: transparent;
  color: var(--utesa-ink);
}

.event-page-header .i-button.text-color:hover,
.event-page-header .i-button.text-color:focus,
.event-page-header .i-button.subtle:hover,
.event-page-header .i-button.subtle:focus {
  color: var(--utesa-ink);
  background: rgba(28, 43, 34, 0.1);
}

.event-page-header .i-button.text-color:focus-visible,
.event-page-header .i-button.subtle:focus-visible {
  outline: 2px solid var(--utesa-ink);
  outline-offset: 2px;
}

.event-page-header .i-button.open,
.event-page-header .button-bar .i-button:not(.label):hover,
.event-page-header .button-bar .i-button:not(.label):focus,
.event-page-header .button-bar .i-button:not(.label):active,
.event-page-header .button-bar .i-button:not(.label).open {
  background: rgba(28, 43, 34, 0.12);
  background-image: none;
  border-color: transparent;
  color: var(--utesa-ink);
}

.event-page-header .button-bar .separator {
  border-right-color: rgba(28, 43, 34, 0.3);
}

.event-page-header .session-bar,
.event-page-header .session-bar .i-button {
  color: var(--utesa-ink);
}

.event-page-header .session-bar .i-button {
  border-color: rgba(28, 43, 34, 0.4);
  background: transparent;
}

.event-page-header .session-bar .i-button:hover,
.event-page-header .session-bar .i-button:focus {
  background: rgba(28, 43, 34, 0.1);
  border-color: var(--utesa-ink);
  color: var(--utesa-ink);
}

.event-page-header .session-bar .i-button:focus-visible {
  outline: 2px solid var(--utesa-ink);
  outline-offset: 2px;
}

/* The "Inicio de sesión" CTA (general session-bar rule above) uses a gold
   border/fill to stand out against a green background -- invisible here
   since the background is now gold too. Dark green reads as the primary
   action against gold instead. */
.event-page-header .session-bar .i-button.icon-enter {
  border-color: var(--utesa-green-dark);
}

.event-page-header .session-bar .i-button.icon-enter:hover,
.event-page-header .session-bar .i-button.icon-enter:focus {
  background: var(--utesa-green-dark);
  border-color: var(--utesa-green-dark);
  color: #ffffff;
}

/* --- Primary nav (.global-menu) ---------------------------------------- */
/* Confirmed in every snapshot: <div id="global-menu" class="global-menu
   toolbar"><menu><li><a>...</a></li></menu></div> */

.global-menu {
  background: transparent; /* merges into body > .header's flat green instead of stacking a second, darker band */
  padding: 0 var(--utesa-space-lg);
}

/* Indico's own #global-menu{} rule sets --menu-background-color etc. via
   ID selector, which beats our .global-menu class rule above regardless of
   load order. #global-menu is the same ID confirmed in every snapshot, so
   we redeclare the same custom properties at equal (ID) specificity,
   which — loading after Indico's stylesheet — wins on source order.

   IMPORTANT: --menu-background-color/--menu-text-color are consumed by
   TWO different things: this bar's own (already-white-text-via-explicit-
   rule) top-level items, AND the "Crear evento" pop-out dropdown's items
   (Indico's own #global-menu>menu>li :is(a,button){background:var(
   --menu-background-color)} rule). Earlier this set both to the same
   dark green, so the dropdown rendered as flat, edge-to-edge green slabs
   with no visual separation from the bar. Using a light surface here only
   repaints the dropdown popup (the bar's own background is the literal
   `background:` below, a separate declaration) — matches every other
   dropdown/menu surface on the site (#language-list, .i-dropdown). */
#global-menu {
  --menu-background-color: var(--utesa-surface);
  --menu-text-color: var(--utesa-ink);
  --menu-text-hover-color: var(--utesa-green-dark);
  --menu-background-hover-color: var(--utesa-green-light);
  background: transparent; /* ID-specificity twin of .global-menu above -- see that rule's comment */
}

/* Round + clip the dropdown container so the (per-item-colored) li
   backgrounds above don't square off past the container's shadow. */
#global-menu > menu,
.create-event-button menu {
  border-radius: var(--utesa-radius-sm);
  overflow: hidden;
}

/* Indico's `#global-menu>menu>li :is(a,button){background:var(
   --menu-background-color);color:var(--menu-text-color)}` reaches, via the
   descendant combinator before :is(), BOTH this bar's own top-level items
   (confirmed markup: #global-menu>menu>li>a for "Inicio"/"Reserva de
   salas", >li>ind-menu>button for the "Crear evento" toggle) AND every
   nested link inside its open submenu (>li>ind-menu>menu>li>a) -- so both
   consumed the one pair of --menu-* vars above. Those are now light,
   correctly recoloring the submenu popup, but the bar's own top-level
   items must stay transparent-on-green with white text. Reaching only the
   top level (child combinators down to >li>a / >li>ind-menu>button, never
   >li>ind-menu>menu>...) keeps the submenu items untouched. Same ID + 3
   type-selectors specificity as Indico's rule, so loading after wins. */
#global-menu > menu > li > a,
#global-menu > menu > li > ind-menu > button {
  background: transparent;
  color: #ffffff;
}

#global-menu > menu > li > a:hover,
#global-menu > menu > li > a:focus,
#global-menu > menu > li > ind-menu > button:hover,
#global-menu > menu > li > ind-menu > button:focus {
  background: transparent;
  color: #ffffff;
}

.global-menu menu {
  display: flex;
  align-items: center;
  gap: var(--utesa-space-sm);
}

.global-menu menu li > a,
.global-menu menu li ind-menu > button {
  color: #ffffff;
  font-family: var(--utesa-font-heading);
  font-weight: 600;
  padding: var(--utesa-space-sm) var(--utesa-space-md);
  display: inline-block;
  border-bottom: 3px solid transparent;
  background: transparent;
}

.global-menu menu li > a:hover,
.global-menu menu li > a:focus,
.global-menu menu li ind-menu > button:hover,
.global-menu menu li ind-menu > button:focus {
  color: #ffffff;
  border-bottom-color: var(--utesa-gold);
}

.global-menu menu li > a:focus-visible,
.global-menu menu li ind-menu > button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
}

/* "Crear evento" split button + its dropdown menu, confirmed at
   reference/prod-home.html lines 1816-1836 and 1841 f. onward
   (.create-event-button ind-menu, and the standalone .i-button.highlight
   variant in the category toolbar). */
.global-menu ind-menu menu,
.create-event-button menu {
  background: var(--utesa-surface);
  border: 1px solid var(--utesa-border);
  border-radius: var(--utesa-radius-sm);
  box-shadow: var(--utesa-shadow-md);
}

.global-menu ind-menu menu li > a,
.create-event-button menu li > a {
  color: var(--utesa-ink);
  font-family: var(--utesa-font-body);
  font-weight: 400;
  border-bottom: none;
}

.global-menu ind-menu menu li > a:hover,
.global-menu ind-menu menu li > a:focus,
.create-event-button menu li > a:hover,
.create-event-button menu li > a:focus {
  background: var(--utesa-green-light);
  color: var(--utesa-green-dark);
  border-bottom: none;
}

/* --- Announcements bar (present, currently empty, in every snapshot) --- */

.announcements:not(:empty) {
  background: var(--utesa-gold-tint);
  color: var(--utesa-ink);
  border-bottom: 1px solid var(--utesa-border);
}

/* --- Buttons: .i-button (confirmed across all 5 snapshots) ------------- */

.i-button {
  font-family: var(--utesa-font-body);
  font-weight: 500;
  border-radius: var(--utesa-radius-sm);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

/* Secondary/default variant, e.g. reference/prod-home.html
   #navigate-button.i-button.icon-compass2, .i-button.icon-time.arrow.
   Indico's own default is `.i-button:not(.label){background:#ececec;...}`
   — the :not(.label) clause makes it more specific than a plain
   `.i-button` rule, so we match the same shape to win on load order
   (none of our real buttons carry .label). */
.i-button,
.i-button:not(.label) {
  background: var(--utesa-surface);
  border: 1px solid var(--utesa-border);
  color: var(--utesa-ink);
}

.i-button:hover,
.i-button:focus,
.i-button:not(.label):hover,
.i-button:not(.label):active {
  background: var(--utesa-green-light);
  border-color: var(--utesa-green);
  color: var(--utesa-green-dark);
}

.i-button:focus-visible {
  outline: 2px solid var(--utesa-green);
  outline-offset: 2px;
}

/* Primary/highlight variant, e.g. reference/prod-home.html
   <button class="highlight i-button">Crear evento</button> and
   reference/prod-event-1.html <a class="i-button highlight"> /
   <a class="i-button next highlight">
   Indico's own rule is
   `.i-button.highlight:not(.label):not(.borderless):not(.text-color)`
   (5 chained classes' worth of specificity) with a hardcoded background,
   which beats a plain `.i-button.highlight` rule regardless of load order.
   We match the same selector shape (harmless — none of our real buttons
   carry .label/.borderless/.text-color) to reach equal specificity, so our
   later-loaded rule wins. */
.i-button.highlight,
.i-button.highlight:not(.label):not(.borderless):not(.text-color) {
  background: var(--utesa-green);
  border: 1px solid var(--utesa-green);
  color: #ffffff;
}

.i-button.highlight:hover,
.i-button.highlight:focus,
.i-button.highlight:not(.label):not(.borderless):not(.text-color):hover,
.i-button.highlight:not(.label):not(.borderless):not(.text-color):focus,
.i-button.highlight:not(.label):not(.borderless):not(.text-color):active {
  background: var(--utesa-green-dark);
  border-color: var(--utesa-green-dark);
  color: #ffffff;
}

.i-button.highlight:focus-visible {
  outline: 2px solid var(--utesa-green-dark);
  outline-offset: 2px;
}

/* Muted "subtle" variant, e.g. reference/prod-abstracts.html
   <button class="i-button text-color subtle icon-edit"> */
.i-button.subtle {
  background: transparent;
  border-color: transparent;
  color: var(--utesa-muted);
}

.i-button.subtle:hover,
.i-button.subtle:focus {
  background: var(--utesa-green-light);
  color: var(--utesa-green-dark);
}

/* Login page primary CTA — confirmed in reference/prod-login.html:
   <button class="i-button login-form-button" data-provider="Indico">. It
   doesn't carry Indico's own `.highlight` class, so without this it would
   render as our plain secondary/white button; as the single primary action
   on the login page it should read as the primary green CTA instead. */
.i-button.login-form-button,
.i-button.login-form-button:not(.label) {
  background: var(--utesa-green);
  border: 1px solid var(--utesa-green);
  color: #ffffff;
}

.i-button.login-form-button:hover,
.i-button.login-form-button:focus,
.i-button.login-form-button:not(.label):hover,
.i-button.login-form-button:not(.label):active {
  background: var(--utesa-green-dark);
  border-color: var(--utesa-green-dark);
  color: #ffffff;
}

/* --- Form fields ------------------------------------------------------- */
/* reference/prod-login.html confirms real rendered fields:
   <input id="identifier" type="text">, <input id="password" type="password">.
   We target plain type selectors rather than IDs/classes so the same rule
   also covers registration/search/other forms without guessing hashed or
   React-generated classes. */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
  font-family: var(--utesa-font-body);
  border: 1px solid var(--utesa-border);
  border-radius: var(--utesa-radius-sm);
  background: var(--utesa-surface);
  color: var(--utesa-ink);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: var(--utesa-green);
  outline: 2px solid var(--utesa-focus-ring);
  outline-offset: 1px;
}

/* --- Footer ------------------------------------------------------------- */
/* Confirmed at reference/prod-home.html lines 2008-2043:
   <footer class="footer"><... .footer-logo ...><ul class="footer-links">
   <li><a></a></li></ul><div class="footer-extra"></div></footer> */

/* Dark green + gold top border bookends body > .header's flat green + gold
   bottom border, instead of the plain white default. */
.footer {
  background: var(--utesa-green-dark);
  border-top: 3px solid var(--utesa-gold);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--utesa-space-lg);
  box-sizing: border-box;
}

.footer a {
  color: #ffffff;
}

.footer a:hover,
.footer a:focus {
  color: var(--utesa-gold);
}

.footer .version {
  color: rgba(255, 255, 255, 0.6);
}

.footer-links li {
  color: rgba(255, 255, 255, 0.6);
}

/* Swap the rendered image of Indico's own footer logo (indico_small.svg)
   for the UTESA seal via `content: url(...)` -- the only way to replace an
   <img>'s actual pixels from CSS alone, since no template override changes
   the `src=` attribute itself. The "Hecho con Indico vX.X.X" text next to
   it is left as-is (attribution text, not a logo) unless asked to change
   it too.

   Indico's own `.footer .footer-logo{height:40px}` (2 classes) beat our
   plain `.footer-logo{height:24px}` (1 class) on specificity -- it won
   just the height, leaving our width:24px in place, squashing the (square,
   confirmed 40x40) seal into a 24x40 box. Match `.footer .footer-logo` to
   tie specificity and win outright on source order instead. */
.footer .footer-logo {
  content: url('/static/custom/files/utesa-logo.png');
  height: 24px;
  width: 24px;
  border-radius: 50%;
}

/* --- Small screens: prevent forced horizontal scroll at 390px ---------- */
/* .session-bar and .footer's flexrow both use Indico's own `display:flex`
   (no wrap by default at narrow widths for the session-bar's toolbar
   groups), which pushes content past the viewport. Both classes are
   confirmed in every snapshot. */
@media (max-width: 480px) {
  /* Pre-existing in unmodified Indico (confirmed by testing
     reference/prod-login.html with zero custom stylesheets applied):
     `.login-page{display:table;width:100%;position:absolute}` — table
     display doesn't hard-cap at 100% when its content needs more
     min-content width, producing a steady ~10px horizontal overflow at
     narrow widths independent of anything in this stylesheet. Clamping it
     here is a safety net, not a fix to content that's actually cut off. */
  .login-page {
    display: block; /* overrides Indico's .login-page{display:table}, whose auto table-layout ignores width:100% when content needs more min-content width */
    max-width: 100vw;
    overflow-x: hidden;
  }

  .page-header,
  div.page-header {
    padding: var(--utesa-space-sm) var(--utesa-space-md);
  }

  /* The outer row that holds the logo + session-bar/nav column
     (<div class="flexrow f-j-space-between f-a-start"> confirmed in
     reference/prod-home.html line 91) doesn't wrap by default, so its
     nowrap session-bar content pushes the whole page wider than the
     viewport. Wrapping it first lets the session bar drop to its own row. */
  .page-header .flexrow {
    flex-wrap: wrap;
    row-gap: var(--utesa-space-sm);
  }

  /* The session bar's own toolbar/group is `justify-content:flex-end`
     (Indico's .f-j-end) — combined with flex-wrap that right-anchors each
     wrapped line, which pushes the first (leftmost) pill off the left edge
     of the viewport instead of onto its own line. Stacking them in a
     single column instead avoids that clipping altogether. */
  .session-bar,
  .session-bar .toolbar,
  .session-bar .group {
    flex-direction: column;
    align-items: stretch;
    row-gap: var(--utesa-space-sm);
  }

  .session-bar .i-button {
    width: 100%;
    justify-content: center;
  }

  .global-menu {
    padding: 0 var(--utesa-space-md);
  }

  .global-menu menu {
    flex-wrap: wrap;
  }

  .footer {
    padding: var(--utesa-space-md);
  }

  .footer .flexrow {
    flex-wrap: wrap;
    row-gap: var(--utesa-space-sm);
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--utesa-space-sm) var(--utesa-space-md);
    padding: 0;
    margin: 0;
  }
}
