/* bottom-bar.css — {% ui_bottom_bar %} (.enr-bottombar*) and the body opt-in
   data-enr-bottom-bar. frontend-contract 4.6.0; mobile-calendar-feed
   architecture §3.4 as amended by §0a A1 (light chrome) and D10; ruling A9.
   4.9.0: floating + nojs rules are in bottom-bar-floating.css.
   Tokens: --enr-bottombar-h, --enr-bottombar-bg, --shadow-up (tokens.css). */

.enr-bottombar {
  display: none;
}

.enr-bottombar__body {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
}

.enr-bottombar__item {
  display: inline-flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-width: var(--space-8);
  min-height: var(--space-8);
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--fg-1);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.enr-bottombar__item svg {
  flex: none;
}
.enr-bottombar__item:hover {
  background: var(--bg-sunken);
}
.enr-bottombar__item:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.enr-bottombar__item[aria-expanded="true"],
.enr-bottombar__item[aria-current]:not([aria-current="false"]) {
  background: var(--bg-sunken);
}

.enr-bottombar__item--pill {
  flex-direction: row;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
}

.enr-bottombar__grow {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

/* The leading control holds the start edge; the rest gather at the end.
   A no-op when a __grow slot is present (it takes the free space) — so a
   bar whose grow slot is role-gated keeps the same shape for every role. */
.enr-bottombar__body > :first-child {
  margin-inline-end: auto;
}

/* The relocated header quick-find, restyled for the light ground (A1). */
.enr-bottombar .hf-search {
  min-width: 0;
  max-width: none;
  width: 100%;
  min-height: var(--space-8);
  padding: 0 var(--space-3);
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--border-2);
}
.enr-bottombar .hf-search:focus-within {
  background: var(--bg-paper);
  box-shadow: var(--focus-ring);
}
.enr-bottombar .hf-search svg {
  color: var(--fg-3);
}
.enr-bottombar .hf-search input {
  align-self: stretch;
  min-height: var(--space-8);
  color: var(--fg-1);
  font-size: var(--text-field-touch);
}
.enr-bottombar .hf-search input::placeholder {
  color: var(--fg-3);
}

@media (max-width: 640px) {
  body[data-enr-bottom-bar] .enr-bottombar {
    display: block;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: var(--z-header);
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--enr-bottombar-bg);
    border-top: 1px solid var(--border-1);
    box-shadow: var(--shadow-up);
  }
  body[data-enr-bottom-bar] .enr-bottombar .hf-find {
    display: inline-flex;
  }
  /* 4.9.0 rendered-bar condition (ADR 0090); :where() keeps the specificity. */
  body[data-enr-bottom-bar] .enr-bottombar:not(:has(> .enr-bottombar__body > *)) {
    display: none;
  }
  body[data-enr-bottom-bar]:where(:has(.enr-bottombar:not([data-enr-bottombar-nojs="empty"]) > .enr-bottombar__body > *)) .hf-main {
    padding-bottom: calc(var(--enr-bottombar-h) + var(--space-3));
  }
  body[data-enr-bottom-bar]:where(:has(.enr-bottombar:not([data-enr-bottombar-nojs="empty"]) > .enr-bottombar__body > *)) :is(.hf-header__controls, .m-fab, .m-fab-pad),
  body[data-enr-bottom-bar]:where(:has(.enr-bottombar:not([data-enr-bottombar-nojs="empty"]) .hf-find)) .hf-side__find {
    display: none !important;
  }
}
