/* The Edu sub-bar (templates/edu/_subbar.html, web/subbar.py; Brainmify ideas/SUBDOMAIN-NAV-SPEC.md).
   A light glass band on the face's brand gradient tint, directly under the main site's top bar, sticky, a little shorter
   than the top bar. Centred items; the active one is a filled pill in the navbar colour blend with white text.
   Phones: one row that scrolls sideways with snap and faded edges; never wraps. Never black backgrounds (owner). */
:root {
  --esb-a: #00a8ff; --esb-b: #64dd17;                    /* brainmify.com bar colours */
  --esb-ink: #15314d;
  --esb-h: 52px;
  --esb-top: var(--nav-h, 72px);                         /* sticky just below the top bar */
}
html[data-face="socialify"] { --esb-a: #e8336d; --esb-b: #7b3fe4; --esb-ink: #3b1838; --esb-top: 60px; }
@media (max-width: 1199.98px) {
  :root { --esb-h: 50px; --esb-top: calc(var(--nav-h, 60px) + env(safe-area-inset-top, 0px)); }
  html[data-face="socialify"] { --esb-top: calc(58px + env(safe-area-inset-top, 0px)); }
  html[data-face="socialify"] body.sf-bar-hidden .esb { top: 0; }
}

.esb { position: sticky; top: var(--esb-top); z-index: 900; font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  transition: top .28s cubic-bezier(.32, .72, 0, 1); }
.esb-inner { position: relative; display: flex; align-items: center; gap: 10px; height: var(--esb-h); padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  background: linear-gradient(90deg, color-mix(in srgb, var(--esb-a) 13%, #fff) 0%, rgba(255, 255, 255, .82) 50%, color-mix(in srgb, var(--esb-b) 13%, #fff) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--esb-a) 22%, #fff);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--esb-a) 14%, transparent); }
.esb a { text-decoration: none; }

.esb-home { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  color: #fff !important; font-weight: 700; font-size: 14px; letter-spacing: .2px;
  background: linear-gradient(90deg, var(--esb-a), var(--esb-b)); box-shadow: 0 3px 10px color-mix(in srgb, var(--esb-a) 35%, transparent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .22); }
.esb-home i { font-size: 14px; }

.esb-track { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 4px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.esb-track::-webkit-scrollbar { display: none; }

.esb-item { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 13px;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer; scroll-snap-align: center;
  color: var(--esb-ink) !important; font: 600 14px/1 'Poppins', system-ui, sans-serif; white-space: nowrap; }
.esb-item i { font-size: 15px; color: color-mix(in srgb, var(--esb-a) 70%, var(--esb-ink)); }
.esb-item .esb-caret { font-size: 10px; opacity: .55; margin-left: -1px; }
.esb-item:hover { background: rgba(255, 255, 255, .78); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--esb-a) 25%, #fff); }
.esb-item[aria-expanded="true"] { background: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--esb-a) 35%, #fff); }
.esb-item.on, .esb-item.on:hover { color: #fff !important; background: linear-gradient(90deg, var(--esb-a), var(--esb-b));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--esb-a) 35%, transparent); text-shadow: 0 1px 2px rgba(0, 0, 0, .22); }
.esb-item.on i { color: #fff; }
.esb-item.esb-fold { display: none; }
.esb-home:focus-visible, .esb-item:focus-visible, .esb-panel a:focus-visible, .esb-x:focus-visible, .esb-all summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--esb-a) 70%, #000); outline-offset: 2px; }
.esb-more-btn { flex: none; }

/* panels: a glass card under the band */
.esb-panel { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - var(--esb-top) - var(--esb-h) - 90px); overflow: auto; z-index: 950; border-radius: 22px;
  background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid color-mix(in srgb, var(--esb-a) 18%, #fff);
  box-shadow: 0 2px 6px rgba(20, 40, 80, .08), 0 26px 60px rgba(20, 40, 90, .22); animation: esb-in .2s cubic-bezier(.2, .8, .2, 1); }
.esb-panel[hidden] { display: none; }
@keyframes esb-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.esb-panel-head { position: sticky; top: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 54px 12px;
  text-align: center; color: #fff; background: linear-gradient(90deg, var(--esb-a), var(--esb-b)); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.esb-panel-head b { font-size: 16px; }
.esb-panel-head small { font-size: 12.5px; opacity: .92; }
.esb-x { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .22); color: #fff; cursor: pointer; font-size: 16px; }
.esb-panel-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; padding: 14px 16px 16px; }
.esb-panel-body a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 10px; border-radius: 14px; color: var(--esb-ink) !important; }
.esb-panel-body a > i { flex: none; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px;
  color: #fff; font-size: 15px; background: linear-gradient(135deg, var(--esb-a), var(--esb-b)); }
.esb-panel-body a span { display: flex; flex-direction: column; min-width: 0; }
.esb-panel-body a b { font-size: 14px; font-weight: 600; }
.esb-panel-body a small { font-size: 12px; color: #5f7389; line-height: 1.3; }
.esb-panel-body a:hover { background: color-mix(in srgb, var(--esb-a) 9%, #fff); }
.esb-panel-more .esb-dup { display: none; }
.esb-panel-more .esb-dup.show { display: flex; }
.esb-all { margin: 0 16px 16px; border-top: 1px solid #e3edf7; padding-top: 10px; }
.esb-all summary { cursor: pointer; text-align: center; font-weight: 700; color: var(--esb-ink); min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.esb-all .bmx { margin-top: 10px; }

/* "Everything on Brainmify Edu" cards (same look as brainmify.com's More map); here so they work on both faces */
.esb .bmx { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; align-items: start; }
.esb .bmx-g { --t1: #00a8ff; --t2: #0086d1; --tint: #eaf6ff; display: flex; flex-direction: column; min-width: 0; padding: 10px; border-radius: 16px; background: var(--tint); }
.esb .bmx-c2 { --t1: #ff4f6d; --t2: #ff7b25; --tint: #fff0f2; }
.esb .bmx-c3 { --t1: #12b886; --t2: #64dd17; --tint: #eafbf1; }
.esb .bmx-c4 { --t1: #0086d1; --t2: #12b886; --tint: #e8f7f7; }
.esb .bmx-c5 { --t1: #7b61ff; --t2: #ff4f6d; --tint: #f6f0ff; }
.esb .bmx-c6 { --t1: #ff7b25; --t2: #ffb300; --tint: #fff6e8; }
.esb .bmx-c7 { --t1: #7b61ff; --t2: #00a8ff; --tint: #f1efff; }
.esb .bmx-g h4 { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 6px; font-size: 14px; font-weight: 800; color: #15263a; text-align: center; }
.esb .bmx-g a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: #1b2a41 !important; }
.esb .bmx-g a:hover { background: #fff; color: var(--t2) !important; }
.esb .bmx-g h4 em { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, var(--t1), var(--t2)); }

/* phones and tablets: one sideways row, faded edges, panels as a sheet under the band */
@media (max-width: 1199.98px) {
  .esb-inner { gap: 6px; padding: 0 8px; }
  .esb-home { padding: 0 11px; min-height: 34px; font-size: 13px; }
  .esb-track { justify-content: flex-start; gap: 2px; padding: 0 22px 0 8px; scroll-padding: 0 24px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%); }
  .esb-item { padding: 0 11px; font-size: 13.5px; gap: 6px; }
  .esb-item .esb-caret { display: none; }
  .esb-more-btn span { display: none; }
  .esb-more-btn { width: 44px; padding: 0; background: rgba(255, 255, 255, .7); }
  .esb-panel { position: fixed; top: calc(var(--esb-top) + var(--esb-h) + 6px); left: 8px; right: 8px; width: auto; transform: none;
    max-height: calc(100dvh - var(--esb-top) - var(--esb-h) - 90px); animation: esb-in-m .18s ease-out; }
  @keyframes esb-in-m { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  .esb-panel-body { grid-template-columns: 1fr; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .esb-panel { animation: none; } .esb { transition: none; } }

/* the Socialify face: socialify.com's fixed bars need room (their own pages use the same offsets) */
@media (min-width: 1200px) {
  html[data-face="socialify"] body { padding-top: 60px; padding-bottom: 60px; }
}
@media (max-width: 1199.98px) {
  html[data-face="socialify"] body { padding-top: calc(58px + env(safe-area-inset-top, 0px)); padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 12px); }
}
@media print { .esb, .socbar, .site-header, .sf-appbar, .sf-tabbar, .sfm { display: none !important; } }

/* Owner 2026-12-02: on edu.socialify.com the Edu pill and the menus use the same pink -> violet as socialify.com's
   "School OS" pill (static/app/subbar.css .sf-subbar-product): linear-gradient(115deg, #f03e9b, #c44ee6 55%, #7b5cff). */
/* Owner 2026-12-02 (later the same day): switched to the "Socialify Pitch Sheets" colours: purple #7b2ff7 -> magenta #f107a3. */
html[data-face="socialify"] { --esb-grad: linear-gradient(115deg, #7b2ff7, #f107a3); --esb-a: #7b2ff7; --esb-b: #f107a3; }
html[data-face="socialify"] .esb-home,
html[data-face="socialify"] .esb-item.on, html[data-face="socialify"] .esb-item.on:hover,
html[data-face="socialify"] .esb-panel-head,
html[data-face="socialify"] .esb-panel-body a i { background: var(--esb-grad); }
html[data-face="socialify"] .esb-item:not(.on) > span,
html[data-face="socialify"] .esb-item:not(.on) > i { background: var(--esb-grad); -webkit-background-clip: text; background-clip: text;
  color: transparent !important; -webkit-text-fill-color: transparent; font-weight: 700; }
html[data-face="socialify"] .esb-item:not(.on) .esb-caret { opacity: .8; }
