/* Full page views (Events, About): the bar keeps its full width background, but the Back button and the action
   button line up with the edges of the page content, like the site header does, instead of the screen edges. */
:root { --site-max: 1300px; }
@media (min-width: 1700px) { :root { --site-max: 1440px; } }
#eventsPage .evp-bar, #aboutPage .abp-bar, #jobsPage .evp-bar {
  --lp: calc((var(--docw, 100vw) - min(var(--site-max), var(--docw, 100vw) - 48px)) / 2);
  padding-left: max(16px, var(--lp)) !important;
  padding-right: max(16px, calc(100% - var(--lp) - min(var(--site-max), var(--docw, 100vw) - 48px))) !important;
}
/* the page content starts where the home page content starts */
#eventsPage .evp-body, #aboutPage .abp-clone, #jobsPage .jbp-in-pad { padding-left: var(--ovsb, 0px); box-sizing: border-box; }
/* tablets and phones: the page content keeps 14px at the sides, so the bar does too */
@media (max-width: 860px) { #eventsPage .evp-bar, #aboutPage .abp-bar, #jobsPage .evp-bar { padding-left: 14px !important; padding-right: 14px !important; } }

/* ── the EventMe logo: one place on every page that shows it, the same as the home header (33px high, at the left edge of the content, 18px from the top) ── */
.pg-logo { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; flex: none; height: 33px; margin-right: 14px; cursor: pointer; }
.pg-logo img { height: 33px; width: auto; display: block; }
.pg-logo:focus-visible { outline: 2px solid #ff6680; outline-offset: 3px; border-radius: 6px; }
#eventsPage .evp-bar, #aboutPage .abp-bar, #jobsPage .evp-bar { min-height: 70px; box-sizing: border-box; align-items: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 13px) !important; padding-bottom: 13px !important; }
/* the Community page: the logo first, then the back button, at the same size and place */
@media (min-width: 861px) {
  .comm-page .comm-nav-inner { max-width: none !important; margin: 0 !important; height: 70px !important;
    --lp: calc((var(--docw, 100vw) - min(var(--site-max), var(--docw, 100vw) - 48px)) / 2);
    padding-left: max(16px, var(--lp)) !important; padding-right: max(16px, calc(100% - var(--lp) - min(var(--site-max), var(--docw, 100vw) - 48px))) !important; }
  .comm-page .comm-nav-back { flex-direction: row-reverse; gap: 14px; }
  .comm-page .comm-logo-text img { height: 33px !important; width: auto; }
}

#eventsPage .evp-bar, #aboutPage .abp-bar, #jobsPage .evp-bar { height: 70px !important; min-height: 0 !important; }
.comm-page .comm-nav-inner { padding-top: 0 !important; }
@media (min-width: 861px) { .comm-page .comm-logo-text { margin-top: -1px; } }
@media (max-width: 860px) { #eventsPage .evp-bar, #aboutPage .abp-bar, #jobsPage .evp-bar { height: 57px !important; padding-top: 6px !important; padding-bottom: 6px !important; } }

/* the logo shows once: the dark one on dark pages, the light one on light pages (the rule above must not show both) */
.pg-logo .brand-logo-light { display: none !important; }
html[data-theme="light"] .pg-logo .brand-logo-light { display: block !important; }
html[data-theme="light"] .pg-logo .brand-logo-dark { display: none !important; }

/* the bar holds the logo and the back icon only: no page name beside them (it stays for screen readers) */
#eventsPage .evp-bar h1, #aboutPage .abp-bar h1, #jobsPage .evp-bar h1 { position: absolute !important; width: 1px; height: 1px; margin: -1px !important; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; flex: none !important; }

/* phones: the back icon comes first, in the top left corner where people reach for it, then the logo. A 44 by 44 tap area. Desktop keeps the logo where the home header has it. */
#eventsPage .evp-bar .em-back-link, #aboutPage .abp-bar .em-back-link, #jobsPage .evp-bar .em-back-link { min-width: 44px; min-height: 44px; justify-content: center; }
@media (max-width: 860px) {
  #eventsPage .evp-bar .em-back-link, #aboutPage .abp-bar .em-back-link, #jobsPage .evp-bar .em-back-link { order: -1; margin: 0 4px 0 -6px; }
  #eventsPage .evp-bar .pg-logo, #aboutPage .abp-bar .pg-logo, #jobsPage .evp-bar .pg-logo { margin-right: 0; }
}
/* the Community logo has the same size on phones as on the other pages */
@media (max-width: 860px) { .comm-page .comm-logo-text img { height: 33px !important; width: auto; } .comm-page .comm-nav-inner { height: 57px !important; } }

/* desktop too: the back icon is the first thing in the top left corner. It sits in the margin to the left of the content, so the logo still lines up with the home header
   (on narrower desktops the margin is small, and the logo moves right just enough to make room). */
@media (min-width: 861px) {
  #eventsPage .evp-bar, #aboutPage .abp-bar, #jobsPage .evp-bar { padding-left: max(16px, calc(var(--lp) - 54px)) !important; }
  #eventsPage .evp-bar .em-back-link, #aboutPage .abp-bar .em-back-link, #jobsPage .evp-bar .em-back-link { order: -1; margin: 0; }
  #eventsPage .evp-bar .pg-logo, #aboutPage .abp-bar .pg-logo, #jobsPage .evp-bar .pg-logo { margin-right: 0; }
  .comm-page .comm-nav-inner { padding-left: max(16px, calc(var(--lp) - 54px)) !important; }
  .comm-page .comm-nav-back { flex-direction: row; gap: 16px; }
}
