.by-floating-menu {
  --by-fm-bg: rgba(25, 25, 25, 0.86);
  --by-fm-bg-hover: #d8bb4a;
  --by-fm-text: #ffffff;
  --by-fm-text-hover: #141414;
  --by-fm-ring: rgba(216, 187, 74, 0.38);
  position: fixed;
  right: 14px;
  top: 50%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
}

.by-floating-menu__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  max-width: 178px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: var(--by-fm-bg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  color: var(--by-fm-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.by-floating-menu__link:hover,
.by-floating-menu__link:focus-visible {
  background: var(--by-fm-bg-hover);
  color: var(--by-fm-text-hover);
  text-decoration: none;
  transform: translateX(-2px);
}

.by-floating-menu__link:focus-visible {
  outline: 3px solid var(--by-fm-ring);
  outline-offset: 3px;
}

.by-floating-menu__link svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.by-floating-menu__short-label {
  display: none;
}

@media (max-width: 768px) {
  .by-floating-menu {
    right: 0;
    bottom: 0;
    left: 0;
    top: auto;
    flex-direction: row;
    justify-content: space-around;
    gap: 4px;
    padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(18, 18, 18, 0.93);
    box-shadow: 0 -5px 18px rgba(0, 0, 0, 0.24);
    transform: none;
  }

  .by-floating-menu__link {
    flex: 1 1 0;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 42px;
    max-width: none;
    padding: 7px 5px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
  }

  .by-floating-menu__link:hover,
  .by-floating-menu__link:focus-visible {
    transform: none;
  }

  .by-floating-menu__label {
    display: none;
  }

  .by-floating-menu__short-label {
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media print {
  .by-floating-menu {
    display: none;
  }
}
