/* ═══════════════════════════════════════════════════
   bottombar.css — Mobile bottom navigation bar
   ═══════════════════════════════════════════════════ */

/* ── Animations ── */
@keyframes bbBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(.85); }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes bbDotPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50%      { transform: translateX(-50%) scale(1.3); opacity: .7; }
}

.bottom-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(8, 11, 16, .8);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .3);
  z-index: calc(var(--z-drawer-overlay, 599) + 2);
  align-items: center;
  justify-content: space-around;
}

/* ── Mobile-first: push content above bottom bar ── */
#sidebar {
  padding-bottom: 64px !important;
}
#favorites-content,
#add-location-content,
#account-content,
#leaderboard-content,
#my-locations-content,
#tachograph-content {
  padding-bottom: 64px;
}

/* 5-tab layout */
.bottom-bar.bottom-bar-5 .bb-btn {
  font-size: 10px;
}
.bottom-bar.bottom-bar-5 .bb-btn:not(.bb-tachograph-btn) {
  flex: 1;
}

/* 6-tab layout */
.bottom-bar.bottom-bar-6 .bb-btn {
  font-size: 9px;
}
.bottom-bar.bottom-bar-6 .bb-btn:not(.bb-tachograph-btn) {
  flex: 1;
}
.bottom-bar.bottom-bar-6 .bb-icon {
  font-size: 18px;
}

/* Spacer that reserves the center slot in the flex flow */
.bb-tachograph-slot {
  flex: 1;
  pointer-events: none;
}
/* social-content uses position:fixed with bottom:56px, no padding needed */
/* Push toast above bottom bar */
#toast {
  bottom: 72px !important;
}

/* === DESKTOP LAYOUT (activează când ai design desktop) ===
@media (min-width: 801px) {
  .bottom-bar { display: none; }
  #sidebar { padding-bottom: 0 !important; }
  #favorites-content,
  #add-location-content,
  #account-content,
  #leaderboard-content,
  #my-locations-content { padding-bottom: 0; }
  #toast { bottom: 20px !important; }
}
=== END DESKTOP LAYOUT === */

/* ── Button base ── */
.bb-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s;
  min-height: var(--touch-min, 44px);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.bb-btn:hover {
  color: var(--text);
}

/* ── Active state with indicator dot ── */
.bb-btn.active {
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb),.3));
}

.bb-btn.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb),.5);
  animation: bbDotPulse 2s ease infinite;
}

/* ── Icon ── */
.bb-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform .2s;
}

.bb-btn:active .bb-icon {
  animation: bbBounce .35s ease;
}

/* ── Label ── */
.bb-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  transition: color .2s;
}

/* ── Social button special style ── */
.bb-social-btn .bb-icon {
  font-size: 22px;
}

.bb-social-btn.active {
  color: var(--accent);
}

.bb-social-btn.active .bb-icon {
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb),.4));
}

/* Bottom bar avatar (replaces icon when logged in) */
.bb-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--glass-border);
  transition: border-color .2s, box-shadow .2s;
}

.bb-btn.active .bb-avatar {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb),.4);
}

/* Social unread indicator on bottom bar */
.bb-social-btn .bb-unread-dot {
  position: absolute;
  top: 6px;
  right: calc(50% - 16px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb),.5);
}

/* Tahograf: circle centered in the bar — defined AFTER .bb-btn to override position:relative */
.bottom-bar .bb-tachograph-btn {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1;
}
.bottom-bar .bb-tachograph-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), .4);
  filter: none;
  color: #fff;
}

/* ── Light theme ── */
[data-theme="light"] .bottom-bar {
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .06);
}

