/* ==========================================================================
   Petiht mobile bottom bar — Haiti scheme
   Light: white bar, Haiti blue #00209F active, Haiti red #D21034 accents.
   Dark (body.night-mode): matte dark bar, yellow #F5C518 active, red create.
   Icons: kay (home), tanbou (reels), vèvè (create), lanbi lens (search).
   Overrides the old purple bar in style.css; loaded after it.
   ========================================================================== */

body .footer-bottom-bar.pbb {
  --pbb-bg: #ffffff;
  --pbb-ink: #6b7280;
  --pbb-active: #00209F;
  --pbb-active-soft: rgba(0, 32, 159, 0.09);
  --pbb-accent: #D21034;
  --pbb-hover: #15803d;
  --pbb-line: rgba(15, 23, 42, 0.07);

  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  height: calc(66px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--pbb-bg);
  border-top: 1px solid var(--pbb-line);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 24px rgba(0, 20, 80, 0.08);
  display: block;
}

/* thin flag stripe on top: blue over red */
body .footer-bottom-bar.pbb::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(to bottom, #00209F 0 50%, #D21034 50% 100%);
}

body.night-mode .footer-bottom-bar.pbb {
  --pbb-bg: #17191c;
  --pbb-ink: #9aa1ab;
  --pbb-active: #F5C518;
  --pbb-active-soft: rgba(245, 197, 24, 0.12);
  --pbb-hover: #4ade80;
  --pbb-line: rgba(255, 255, 255, 0.06);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
}

body.night-mode .footer-bottom-bar.pbb::before {
  background: linear-gradient(to bottom, #F5C518 0 50%, #D21034 50% 100%);
}

@media (min-width: 768px) {
  body .footer-bottom-bar.pbb { display: none; }
}

body .footer-bottom-bar.pbb.x-hidden { display: none; }

body .footer-bottom-bar.pbb > .container {
  height: 66px;
  max-width: 560px;
  padding: 0 6px;
}

body .pbb .footer-bottom-bar-links {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 66px;
  padding: 0;
  gap: 0;
}

body .pbb .footer-bottom-bar-links > .link {
  flex: 1 1 0;
  min-width: 0;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ---- regular items ---- */
body .pbb .footer-bottom-bar-links > .link > a,
body .pbb .footer-bottom-bar-links > .link.link-menu .user-menu {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  color: var(--pbb-ink);
  background: transparent;
  border-radius: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s ease;
}

body .pbb .footer-bottom-bar-links > .link > a::before { display: none; }

body .pbb .pbb-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  transition: background-color .25s ease, transform .2s ease;
}

body .pbb .pbb-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

body .pbb .pbb-icon .pbb-thin { stroke-width: 1.4; }
body .pbb .pbb-icon .pbb-fill { stroke: none; fill: transparent; transition: fill .25s ease; }

body .pbb .footer-bottom-bar-links .title,
body .pbb .footer-bottom-bar-links > .link.link-menu .user-menu .title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .2px;
  line-height: 1.1;
  text-transform: none;
  color: inherit;
  margin: 0;
}

/* hover: green */
@media (hover: hover) {
  body .pbb .footer-bottom-bar-links > .link:not(.link-add) > a:hover,
  body .pbb .footer-bottom-bar-links > .link.link-menu .user-menu:hover {
    color: var(--pbb-hover);
  }
}

body .pbb .footer-bottom-bar-links > .link:not(.link-add) > a:active .pbb-ico { transform: scale(.92); }

/* active: soft pill + blue (light) / yellow (dark) */
body .pbb .footer-bottom-bar-links > .link.active > a { color: var(--pbb-active); }
body .pbb .footer-bottom-bar-links > .link.active > a .pbb-ico { background: var(--pbb-active-soft); }
body .pbb .footer-bottom-bar-links > .link.active > a .pbb-icon { stroke-width: 2; }
body .pbb .footer-bottom-bar-links > .link.active > a .pbb-fill { fill: var(--pbb-active-soft); }
body .pbb .footer-bottom-bar-links > .link.active > a > .title,
body.night-mode .pbb .footer-bottom-bar-links > .link.active > a > .title { color: var(--pbb-active); font-weight: 700; }

/* little red dot under the active label */
body .pbb .footer-bottom-bar-links > .link.active > a::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--pbb-accent);
}

/* ---- center create button (vèvè) ---- */
body .pbb .footer-bottom-bar-links > .link.link-add {
  flex: 0 0 76px;
  position: relative;
}

body .pbb .footer-bottom-bar-links > .link.link-add > a.pbb-add {
  width: 76px;
  height: 66px;
  padding: 0;
  gap: 3px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  transform: none;
  color: var(--pbb-ink);
}

body .pbb .pbb-add-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-top: -26px;
  border-radius: 50%;
  color: #fff;
  /* Haiti flag: blue over red */
  background: linear-gradient(to bottom, #00209F 0 50%, #D21034 50% 100%);
  border: 4px solid var(--pbb-bg);
  box-shadow: 0 8px 18px rgba(210, 16, 52, 0.28), 0 3px 8px rgba(0, 32, 159, 0.22);
  transition: transform .2s ease, box-shadow .2s ease;
}

/* gold ring inside the disc */
body .pbb .pbb-add-disc::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 197, 24, 0.85);
  pointer-events: none;
}

body .pbb .pbb-vev {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  position: relative;
  z-index: 1;
  transition: transform .35s ease;
}

body .pbb .pbb-vev .pbb-solid { fill: #fff; stroke: none; }

body .pbb .footer-bottom-bar-links > .link.link-add > a.pbb-add .title {
  display: block;
  color: var(--pbb-accent);
  font-weight: 700;
}

@media (hover: hover) {
  body .pbb .footer-bottom-bar-links > .link.link-add > a.pbb-add:hover .pbb-add-disc {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(21, 128, 61, 0.30), 0 3px 8px rgba(0, 32, 159, 0.22);
  }
}

body .pbb .footer-bottom-bar-links > .link.link-add > a.pbb-add:active .pbb-add-disc { transform: scale(.94); }
body .pbb .footer-bottom-bar-links > .link.link-add.show > a.pbb-add .pbb-vev,
body .pbb .footer-bottom-bar-links > .link.link-add > a.pbb-add.show .pbb-vev { transform: rotate(45deg); }

/* dark: create stays red, no blue */
body.night-mode .pbb .pbb-add-disc {
  background: linear-gradient(145deg, #e3173f 0%, #D21034 55%, #9e0c28 100%);
  box-shadow: 0 8px 20px rgba(210, 16, 52, 0.35), 0 3px 8px rgba(0, 0, 0, 0.5);
}

body.night-mode .pbb .footer-bottom-bar-links > .link.link-add > a.pbb-add .title { color: #F5C518; }

/* ---- menu avatar ---- */
body .pbb .footer-bottom-bar-links > .link.link-menu .user-menu img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  padding: 2px;
  margin: 1px 0;
  border: 0;
  background: linear-gradient(to bottom, #00209F 0 50%, #D21034 50% 100%);
}

body.night-mode .pbb .footer-bottom-bar-links > .link.link-menu .user-menu img {
  background: linear-gradient(to bottom, #F5C518 0 50%, #D21034 50% 100%);
}

body .pbb .footer-bottom-bar-links > .link.link-menu .user-menu.show { color: var(--pbb-active); }

/* ---- dropdown sheet colors ---- */
body .pbb .footer-bottom-bar-links .dropdown-widget {
  border-top: 3px solid #00209F;
}

body.night-mode .pbb .footer-bottom-bar-links .dropdown-widget {
  background: #1d2024;
  border-top-color: #F5C518;
}

@media (prefers-reduced-motion: reduce) {
  body .pbb * { transition: none !important; }
}
