/* =============================================
   DOCK — GNOME-style bottom navigation dock
   ============================================= */

.dock-wrapper {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 0 8px;
}

.dock {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(220, 220, 220, 0.8);
  border-radius: 22px;
  padding: 16px 18px 12px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.14),
    0 2px 8px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.7);
}

[data-theme="dark"] .dock {
  background: rgba(28, 28, 28, 0.75);
  border-color: rgba(60, 60, 60, 0.9);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.5),
    0 2px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Separator line between dock groups */
.dock-sep {
  width: 1px;
  height: 40px;
  background: rgba(0,0,0,0.12);
  align-self: center;
  margin: 0 4px;
  flex-shrink: 0;
  border-radius: 1px;
}

/* Each dock item wrapper */
.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

/* The icon box */
.dock-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.22s ease;
  position: relative;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.dock-icon svg {
  width: 26px;
  height: 26px;
  color: var(--text-muted);
  transition: color 0.2s ease;
  flex-shrink: 0;
}

/* Dark mode — make inactive icons clearly visible */
[data-theme="dark"] .dock-icon {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
}

[data-theme="dark"] .dock-icon svg {
  color: #c8c8c8;
}

/* Active state — current page */
.dock-item.active .dock-icon {
  background: linear-gradient(145deg, var(--blue-subtle), #c8defb);
  border-color: var(--blue-light);
  box-shadow: 0 0 0 2px rgba(74,136,208,0.25), var(--shadow-sm);
}

[data-theme="dark"] .dock-item.active .dock-icon {
  background: linear-gradient(145deg, rgba(74,136,208,0.25), rgba(74,136,208,0.15));
}

.dock-item.active .dock-icon svg {
  color: var(--blue);
}

/* Active dot indicator */
.dock-item.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  width: 5px;
  height: 5px;
  background: var(--blue);
  border-radius: 50%;
}

/* Tooltip above icon */
.dock-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(30, 30, 30, 0.88);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.dock-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(30,30,30,0.88);
}

/* Show tooltip on hover */
.dock-item:hover .dock-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hover magnify — neighbouring items react in JS */
.dock-item:hover .dock-icon,
.dock-item.dock-near .dock-icon {
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
}

.dock-item:hover .dock-icon svg {
  color: var(--blue);
}

/* Responsive dock */
@media (max-width: 540px) {
  .dock-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .dock-icon svg { width: 22px; height: 22px; }
  .dock { gap: 7px; padding: 14px 14px 10px; }
}
