/* Varial Energy's phone navigation: a fixed bar along the bottom (templates/includes/bottom_nav.html),
   icon over label, with the account tab opening a panel above it. It replaces the top nav on a phone
   (up to 760px); above that it is not shown. */
.vrl-bottom-nav { display: none; }

@media (max-width: 760px) {
  body:has(.vrl-bottom-nav) { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .vrl-bottom-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 1045;
    display: flex;
    align-items: stretch;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding: 0 4px env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--varial-border, #dce4e1);
    background: var(--varial-card-bg, #fff);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
  }
  .vrl-bnav-link, .vrl-bnav-account { flex: 1 1 0; min-width: 0; }
  .vrl-bnav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 56px;
    margin: 2px 0;
    padding: 4px 2px;
    border-radius: 10px;
    color: var(--varial-fg-muted, #5f6b66);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    list-style: none;
    cursor: pointer;
  }
  .vrl-bnav-link::-webkit-details-marker { display: none; }
  .vrl-bnav-link.is-active { background: var(--varial-primary-bg-light, #ddf7ed); color: var(--varial-primary, #0f745b); }
  .vrl-bnav-link:focus-visible { outline: 2px solid var(--varial-primary, #0f745b); outline-offset: -2px; }
  .vrl-bnav-glyph { width: 22px; height: 22px; }
  .vrl-bnav-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
  }
  .vrl-bnav-account { position: relative; display: flex; }
  .vrl-bnav-account > summary { flex: 1; }
  .vrl-bnav-panel {
    position: fixed;
    right: 12px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    z-index: 1046;
    padding: 0.875rem;
    border: 1px solid var(--varial-border, #dce4e1);
    border-radius: 0.75rem;
    background: var(--varial-card-bg, #fff);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
    font-size: 0.875rem;
    line-height: 1.45;
  }
  .vrl-bnav-panel .vrl-account-links { gap: 0.75rem; padding-top: 0; border-top: 0; }
  .vrl-bnav-panel .vrl-account-who + .vrl-account-links { padding-top: 0.75rem; border-top: 1px solid var(--varial-border, #dce4e1); }
  .vrl-bnav-credits { display: flex; align-items: center; justify-content: space-between; }
  .vrl-bnav-credits .vrl-credit-badge { min-width: 1.5rem; padding: 1px 8px; border-radius: 999px; background: var(--varial-primary-bg-light, #ddf7ed); color: var(--varial-primary, #0f745b); font-size: 0.75rem; font-weight: 700; text-align: center; }
  .vrl-bnav-credits .vrl-credit-badge--empty { background: #fbe4e1; color: #b3261e; }
  .vrl-bnav-account[open] > summary { background: var(--varial-primary-bg-light, #ddf7ed); color: var(--varial-primary, #0f745b); }
}
