
/* Bottom Dock Navigation (mobile) */
@media (max-width: 900px){
  .bottom-dock{
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,.08);
    display: grid;
    grid-template-columns: repeat(var(--dock-count, 6), 1fr);
    align-items: center;
    justify-items: center;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    z-index: 2147483601;
    gap: var(--dock-gap, 4px);
  }
  .bottom-dock a{
    text-decoration: none;
    color: #4b5563;
    min-width: 0;
    font-size: min(calc(11px * var(--ui-mult, 1)), calc((100vw - 24px) / var(--dock-count, 6) * 0.26));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  .bottom-dock .label{
    font-size: 0.85em; /* slightly smaller than base */
    line-height: 1.1;
  }
  .bottom-dock .icon{
    font-size: min(calc(18px * var(--ui-mult, 1)), calc((100vw - 24px) / var(--dock-count, 6) * 0.44));
    line-height: 1;
  }
  .bottom-dock a.active{
    color: #0d6efd;
    font-weight: 600;
  }
  body.with-bottom-dock{
    padding-bottom: 60px; /* prevent content underlap */
  }
  /* Slightly lower dock on creation to align with other pages visually */
  body[data-page="creation"] .bottom-dock{ transform: translateY(5px); }
}


/* Keep any floating round buttons above the dock if present */
@media (max-width: 900px){
  body.with-bottom-dock .fab-container { 
    bottom: calc(16px + 60px) !important; 
  }
  body.with-bottom-dock .fab-menu { 
    bottom: calc(86px + 60px) !important; 
  }
  /* generic helpers in case other round floats exist */
  body.with-bottom-dock .floating-round,
  body.with-bottom-dock .btn.rounded-circle.fixed-bottom,
  body.with-bottom-dock .btn.rounded-circle.position-fixed {
    bottom: calc(16px + 60px) !important;
  }
}


  }
}

@media (min-width: 901px) {
  .bottom-dock { display: none !important; }
}

/* Legacy alt-dock styles removed/neutralized to avoid conflicts */

@media (max-width: 360px){
  :root{ --dock-size: 40px; --dock-gap: 4px; }
}
@media (min-width: 361px) and (max-width: 389px){
  :root{ --dock-size: 44px; --dock-gap: 6px; }
}
@media (min-width: 390px){
  :root{ --dock-size: 48px; --dock-gap: 8px; }
}
