/* Site chrome: header, brand-icon, profile-link, filter bar, red-line stripe.
   Extracted from arenas/templates/arenas/base.html on 2026-05-03.
   Brand-icon body folded in from
   arenas/templates/arenas/partials/brand_icon_styles.html (still
   used by the auth template's inline <style> block). */

/* --- Header --- */
/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg) var(--spacing-xl);
  border-bottom: 1px solid var(--color-border);
}
.site-header h1 {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-boards);
}
.site-header .brand-link,
.site-header .brand-link:hover {
  color: inherit;
  text-decoration: none;
}
.site-header .brand-link {
  border-radius: var(--radius-md);
}
.site-header .brand-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.site-header .brand-icon {
  margin-right: var(--spacing-sm);
  vertical-align: middle;
}

/* Brand-icon body lives in arenas/static/arenas/css/brand-icon.css
   (single source of truth, also linked from base_auth.html). The
   .site-header .brand-icon margin tweak above is the only chrome-
   specific positioning override and stays here. */

/* Profile link in the header (authed users only). Icon-only in v1;
   future iterations may expand into a dropdown. The 36x36 tap target
   meets the 44px-soft / 36px-hard mobile target floor; SVG inherits
   currentColor so it tracks the rest of the header text. */
.site-header .profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
  -webkit-tap-highlight-color: transparent;
}
.site-header .profile-link:hover,
.site-header .profile-link:focus-visible {
  background: var(--color-border-light);
  color: var(--color-text);
  outline: none;
}
.site-header .profile-link:focus-visible {
  box-shadow: 0 0 0 2px var(--color-accent);
}

/* Interactive controls inside the filter sheet and filter bar suppress the
   mobile-browser tap-highlight overlay and text-selection flash. Without
   these, tapping an accordion header on iOS Safari or Chrome Android shows
   a transient text-selection highlight before the toggle fires. */
.filters-trigger,
.filter-field-toggle,
.filter-chip,
.filter-checkbox-item,
.filters-sheet-close,
.btn-clear,
.btn-apply,
.saved-filters-trigger,
.saved-filter-item,
.saved-filter-name,
.saved-filters-actions-toggle,
.saved-filters-actions button {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Filter bar — Filters button lives here at every viewport width */
.filter-bar {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  padding: var(--spacing-md) var(--spacing-xl);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
}
.filters-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-secondary);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s;
}
.filters-trigger:hover {
  background: var(--color-bg);
}
.filters-trigger-icon {
  flex-shrink: 0;
}
.filters-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: var(--color-accent);
  color: #fff;
  font-size: var(--font-size-xs);
  font-weight: 700;
  line-height: 1;
}

/* Site-wide brand stripe — the rink-line metaphor as inescapable signature.
   z-index 1000 sits above filter sheets (101) and modals (200/201) so the
   stripe stays visible regardless of overlay state. */
.red-line-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-red-line);
  z-index: 1000;
}

/* DEBUG-only impersonation banner. Visually loud so a developer
   cannot forget the session was bypassed auth. Rendered only when
   settings.DEBUG=True and request.user.is_authenticated (see
   accounts/templates/accounts/_dev_login_banner.html). Production
   never sees this rule fire because the partial emits no markup. */
.dev-login-banner {
  position: sticky;
  top: 2px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 1rem;
  background: var(--color-red-line);
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dev-login-banner strong { font-weight: 800; }
.dev-login-banner-logout { margin-left: auto; }
.dev-login-banner-logout button {
  background: rgba(0,0,0,0.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.15rem 0.6rem;
  font: inherit;
  cursor: pointer;
  border-radius: 2px;
}

/* DEBUG-only navbar dropdown (sibling of .profile-link). Suppressed
   under DEBUG=False (the {% if emails %} block in
   _dev_login_dropdown.html never renders). */
.dev-login-dropdown {
  position: relative;
  margin-left: 0.5rem;
}
.dev-login-dropdown > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-red-line);
  border: 1px solid var(--color-red-line);
  border-radius: 2px;
}
.dev-login-dropdown > summary::-webkit-details-marker { display: none; }
.dev-login-dropdown[open] > summary { background: var(--color-red-line); color: #fff; }
.dev-login-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-red-line);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  z-index: 998;
}
.dev-login-menu-label {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-red-line);
  padding: 0.25rem 0.5rem 0.4rem;
}
.dev-login-menu a {
  display: block;
  padding: 0.35rem 0.5rem;
  color: var(--color-text-primary);
  text-decoration: none;
}
.dev-login-menu a:hover { background: var(--color-bg-secondary); }
