/* ================================================================
   DOCK
   ================================================================ */
.dock-wrap {
    position: fixed;
    /* env(safe-area-inset-bottom) protects dock from iOS home-indicator on
       iPad portrait (768–1024px, pointer:coarse, NOT mobile-os mode). On
       desktop browsers the env() resolves to 0, so no visual change. */
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: 0; right: 0;
    display: flex; justify-content: center;
    z-index: var(--byte-z-dock);
    pointer-events: none;
}
.dock {
    position: relative;
    display: flex; align-items: flex-end;
    gap: 8px;
    padding: 8px 12px;
    background:
        linear-gradient(to bottom, rgba(255,255,255,0.03), transparent 50%),
        rgba(6, 12, 16, 0.94);
    border: 1px solid rgba(0, 160, 160, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 18px;
    box-shadow: 0 20px 60px -10px rgba(0,0,0,0.8),
                0 8px 24px rgba(0,0,0,0.4),
                0 8px 32px -4px rgba(253, 125, 0, 0.06),
                inset 0 1px 0 rgba(255,255,255,0.1),
                inset 0 0 0 1px rgba(255,255,255,0.08);
    pointer-events: auto;
}
.dock::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: transparent;
    transition: background 0.4s ease;
    pointer-events: none;
}
.dock-item {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(18, 30, 38, 0.95), rgba(10, 20, 26, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px;
    color: var(--byte-primary);
    position: relative;
    box-shadow: 0 0 0 rgba(0,0,0,0), 0 0 0 transparent;
    transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
    transform-origin: bottom;
}
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
    /* Hover glow + z-index (always active) */
    .dock-item:hover {
        z-index: 1;
        box-shadow: 0 12px 28px rgba(0,0,0,0.5),
                    0 0 16px color-mix(in srgb, currentColor 25%, transparent);
    }
    /* CSS stepped fallback (no JS / .dock--magnify not set) */
    .dock:not(.dock--magnify) .dock-item:hover {
        transform: translateY(-10px) scale(1.35);
    }
    .dock:not(.dock--magnify) .dock-item:hover:active {
        transform: translateY(-4px) scale(1.2);
        transition-duration: 0.1s;
    }
    .dock:not(.dock--magnify) .dock-item:has(+ .dock-item:hover),
    .dock:not(.dock--magnify) .dock-item:hover + .dock-item {
        transform: translateY(-4px) scale(1.15);
        box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    }
    .dock:not(.dock--magnify) .dock-item:has(+ .dock-item + .dock-item:hover),
    .dock:not(.dock--magnify) .dock-item:hover + .dock-item + .dock-item {
        transform: translateY(-1px) scale(1.05);
    }
    /* Hover tint (always active) */
    .dock:has(.dock-item:hover)::before         { background: color-mix(in srgb, var(--byte-primary) 3%, transparent); }
    .dock:has(.dock-item--red:hover)::before    { background: color-mix(in srgb, var(--byte-danger) 5%, transparent); }
    .dock:has(.dock-item--teal:hover)::before   { background: color-mix(in srgb, var(--byte-accent) 5%, transparent); }
    .dock:has(.dock-item--blue:hover)::before   { background: color-mix(in srgb, var(--byte-code-blue) 5%, transparent); }
    .dock:has(.dock-item--purple:hover)::before { background: color-mix(in srgb, var(--byte-code-purple) 5%, transparent); }
    .dock:has(.dock-item--amber:hover)::before  { background: color-mix(in srgb, var(--byte-warning) 5%, transparent); }
    .dock:has(.dock-item--green:hover)::before  { background: color-mix(in srgb, var(--byte-success) 5%, transparent); }
}
.dock-item--teal   { color: var(--byte-accent); }
.dock-item--blue   { color: var(--byte-code-blue); }
.dock-item--purple { color: var(--byte-code-purple); }
.dock-item--green  { color: var(--byte-success); }
.dock-item--red    { color: var(--byte-danger); }
.dock-item--amber  { color: var(--byte-warning); }
.dock-item__dot {
    position: absolute;
    bottom: 2px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--byte-text-muted);
    opacity: 0;
    transition: opacity var(--byte-t-fast);
}
.dock-item.running .dock-item__dot {
    opacity: 1;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
}
.dock-item__tip {
    position: absolute;
    bottom: 62px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(8, 18, 23, 0.95);
    color: var(--byte-text);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: var(--byte-fs-xs);
    font-family: var(--byte-font-mono);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    border: 1px solid var(--byte-border-strong);
    transition: opacity var(--byte-t-fast), transform var(--byte-t-fast);
}
.dock-item:hover .dock-item__tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.dock-sep {
    width: 1px; height: 32px;
    background: linear-gradient(to bottom, transparent, var(--byte-border-strong) 30%, var(--byte-border-strong) 70%, transparent);
    margin: 0 2px;
    align-self: center;
}
@media (prefers-reduced-motion: no-preference) {
    @keyframes dock-bounce {
        0%   { translate: 0 0; }
        30%  { translate: 0 -8px; }
        50%  { translate: 0 -2px; }
        70%  { translate: 0 -5px; }
        100% { translate: 0 0; }
    }
    .dock-item.dock-bounce {
        animation: dock-bounce 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
}

