/* ==================== 浮動選單 (Site Float Menu) ==================== */

.site-float-menu {
  position: fixed;
  right: 15px;
  bottom: 8%;
  z-index: 99;
  visibility: hidden;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  opacity: 0;
}

.site-float-menu__list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
}

.site-float-menu__link {
  padding: 0.5rem;
  font-size: 1rem;
  text-align: center;
  background-color: var(--white);
  color: var(--gray-600);
  border-radius: 0.5rem;
  border: 1px solid var(--color-border-strong);
  height: 44px;
  width: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-float-menu__link:hover {
  background-color: var(--gray-800);
  color: var(--white);
}

/* 顯示狀態 */
.site-float-menu.is-visible {
  opacity: 1;
  visibility: visible;
}

/* 手機版：底部水平導覽列 */
@media (max-width: 767.98px) {
  .site-float-menu {
    left: 0;
    bottom: 0;
    top: initial;
    right: initial;
    transform: initial;
    width: 100%;
    display: block;
  }

  .site-float-menu__list {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 0;
    background-color: var(--white);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
  }

  .site-float-menu__item {
    flex: 1;
    width: 25%;
    height: 100%;
    border-right: var(--color-border-default) solid 1px;
  }

  .site-float-menu__item:last-child {
    border-right: none;
  }

  .site-float-menu__link {
    width: 100%;
    font-size: 1rem;
    border: 0;
    border-radius: 0;
  }

  /* 浮動選單出現時，footer 加底部間距避免被遮住 */
  .site-float-menu.is-visible ~ .site-footer {
    margin-bottom: 44px;
  }
}
