@import url(https://fonts.googleapis.com/css?family=Roboto:100,200,300,regular,500,600,700,800,900,100italic,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic);

.macos nav.dock {
  font-family: "Roboto", sans-serif;

  margin-bottom: 16px;

  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px) brightness(0.8);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 32px;

  z-index: 999;
}

.macos nav.dock>ul {
  display: flex;
  list-style-type: none;
  padding: 10px;
  margin: 0;
  gap: 8px;
}

.macos nav.dock a {
  cursor: pointer;
}

.macos nav.dock div.separator {
  width: 1px;
  margin: 6px 0;
  background-color: rgba(255, 255, 255, 0.5);
}

.macos nav.dock li.active::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 100px;
  background: white;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 75%);
}

.macos nav.dock li {
  position: relative;

  .tooltip {
    display: block;
    border-radius: 1000px;

    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -16px);
    opacity: 0;

    transition: opacity 0.2s ease, transform 0.2s ease;
    transition-delay: 0s;
    /* default: no delay */

    backdrop-filter: blur(8px) brightness(0.8);
  }

  .tooltip-wrapper {
    padding: 3px 10px;

    font-size: 14px;
    color: white;
    position: relative;
  }

  .tooltip-wrapper::after {
    content: "";
    clip-path: polygon(0 100%,
        0 0,
        100% 0,
        100% 100%,
        calc(50% + 4.5px) 100%,
        calc(50% + 5.9px) calc(100% - 1px),
        calc(50% - 6.1px) calc(100% - 1px),
        calc(50% - 5.1px) 100%);

    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);

    border-radius: 100px;

    display: block;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    position: absolute;
  }

  /* Tooltip arrow */
  .tooltip .arrow {
    content: "";
    position: absolute;
    top: calc(100% - 1px);
    left: calc(50% - 6px);
    width: 12px;
    height: 12px;
  }

  .tooltip .arrow::before {
    position: absolute;
    display: block;
    content: "";
    background: rgba(0, 0, 0, 0.2);
    /* backdrop-filter: blur(8px) brightness(0.8); */
    width: 12px;
    height: 12px;

    clip-path: polygon(1px 0, calc(100% - 1px) 0, 50% calc(50% - 1px));
  }

  .tooltip .arrow::after {
    display: block;
    content: "";
    background-color: rgba(255, 255, 255, 0.2);
    width: 12px;
    height: 12px;

    clip-path: polygon(0 0, 10% 0, 50% 40%, 90% 0, 100% 0, 50% 50%);
  }

  a:hover+.tooltip {
    opacity: 1;
    transition-delay: 0s;
    transform: translate(-50%, -22px);
  }

  a:not(:hover)+.tooltip {
    transition-delay: 0.2s;
    /* slight delay before hiding */
  }
}

.macos nav.dock img {
  width: 64px;
  height: 64px;
}

.macos nav.dock {

  .separator,
  .trash {
    display: none;
  }
}

@media screen and (min-width: 600px) {
  .macos nav.dock {
    .separator,
    .trash {
      display: block;
    }
  }
}
