/* ============================================
   macOS Dock CSS - Premium Dock with Magnification
   ============================================ */

#dock {
  position: fixed;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 4px 6px;
  transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-container {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border-radius: 20px;
  border: 0.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 0.5px rgba(255,255,255,0.2), 0 10px 40px rgba(0,0,0,0.25), 0 2px 12px rgba(0,0,0,0.15);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode .dock-container {
  background: rgba(50, 50, 50, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 0.5px rgba(255,255,255,0.08), 0 10px 40px rgba(0,0,0,0.4), 0 2px 12px rgba(0,0,0,0.3);
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: default;
}

.dock-icon {
  width: var(--dock-icon-size);
  height: var(--dock-icon-size);
  border-radius: 12px;
  overflow: visible;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, width, height;
}

.dock-icon svg {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.15));
  transition: filter 0.25s ease;
}

.dock-icon:hover svg {
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
}

.dock-item:active .dock-icon {
  transform: scale(0.9);
  transition: transform 0.08s ease;
}

.dock-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  margin-top: 2px;
  transition: all 0.3s ease;
}

.dock-dot.active {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
}

.dock-separator {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 8px;
  align-self: center;
  border-radius: 1px;
}

body.dark-mode .dock-separator {
  background: rgba(255, 255, 255, 0.08);
}

/* Dock Tooltip */
.dock-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(20, 20, 20, 0.92);
  color: white;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 0 0.5px rgba(255,255,255,0.08);
  z-index: 101;
  letter-spacing: -0.1px;
}

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

/* Dock Bounce Animation */
@keyframes dockBounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-22px); }
  50% { transform: translateY(-4px); }
  75% { transform: translateY(-14px); }
}

.dock-icon.bouncing {
  animation: dockBounce 0.6s cubic-bezier(0.28, 0.84, 0.42, 1);
}

/* Multiple bounces for app opening */
@keyframes dockBounceLong {
  0% { transform: translateY(0); }
  10% { transform: translateY(-28px); }
  20% { transform: translateY(0); }
  30% { transform: translateY(-22px); }
  40% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
  60% { transform: translateY(0); }
  70% { transform: translateY(-10px); }
  80% { transform: translateY(0); }
  90% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

.dock-icon.bouncing-long {
  animation: dockBounceLong 1.5s ease-out;
}

/* Dock minimize target animation */
@keyframes dockMinReceive {
  0% { transform: scale(1); }
  50% { transform: scale(0.85); }
  100% { transform: scale(1); }
}

.dock-icon.min-receive {
  animation: dockMinReceive 0.3s ease;
}

/* Dock minimized window indicator */
.dock-item.has-minimized .dock-icon::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}

/* Dock hide animation */
#dock.dock-hidden {
  bottom: -80px;
}

/* Dark mode dock glow effect */
body.dark-mode .dock-icon:hover svg {
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5)) brightness(1.05);
}
