/* Footer bar */
:root {
  --pcl-footer-h: 64px;
  --pcl-green: #bed62f; /* PCL green for active label */
}

.pcl-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--pcl-footer-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid #eee;
  z-index: 2147482000; /* below the sheet (which is 2147483000) */
}

.pcl-footer__grid {
  margin: 0; padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: var(--pcl-footer-h);
}

.pcl-footer__item { display: flex; }

.pcl-footer__btn {
  appearance: none; background: transparent; border: 0;
  width: 100%; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; color: #0d3954; font-size: 12px; line-height: 1.2;
  cursor: pointer;
}

/* Accessibility focus */
.pcl-footer__btn:focus-visible { outline: 2px solid #111; outline-offset: -2px; }

/* Label styling (kept uniform across <a> and <button>) */
.pcl-footer__label {
  font-size: 9px;
  display: block;
  white-space: nowrap;
}

/* Icon sizing + smooth hover grow */
.pcl-footer__icon {
  display: block;
  width: 14px;
  height: 14px;
  margin-bottom: 2px;
  transition: transform .16s ease;
}

/* Hover/focus: no text underline + grow icon */
.pcl-footer__btn,
.pcl-footer__btn:hover,
.pcl-footer__btn:focus {
  text-decoration: none;
}

.pcl-footer__btn:hover .pcl-footer__icon,
.pcl-footer__btn:focus .pcl-footer__icon {
  transform: scale(1.15);
}

/* Ensure page content isn't hidden behind the footer */
html.pcl-footer-pad body { padding-bottom: calc(var(--pcl-footer-h) + env(safe-area-inset-bottom)); }

/* If your footer icons are <img>, ensure the image fits (kept for safety) */
.pcl-footer__icon img {
  display: block;
  width: 100%;
  height: 100%;
}

/* Hide role-scoped items by default; reveal by body role classes */
.pcl-footer__item.show-supervisor,
.pcl-footer__item.show-staff,
.pcl-footer__item.show-client,
.pcl-footer__item.show-admin { display: none; }

.role-supervisor .pcl-footer__item.show-supervisor { display: flex !important; }
.role-staff      .pcl-footer__item.show-staff      { display: flex !important; }
.role-client     .pcl-footer__item.show-client     { display: flex !important; }
.role-admin      .pcl-footer__item.show-admin      { display: flex !important; }

/* Optional: hide footer Menu button while sheet is open */
.pcl-sheet-open .pcl-footer__btn--menu { display: none; }

/* Active state (exact path match) — only color the label */
.pcl-footer__btn.is-active .pcl-footer__label {
  color: var(--pcl-green);
}

/* When the slide-up menu is open, style Menu like active */
.pcl-sheet-open .pcl-footer__btn--menu .pcl-footer__label {
  color: var(--pcl-green);
}