.floating-social {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: 0;

  &.is-collapsed {
    .floating-social__panel {
      width: 0;
      min-width: 0;
      margin-right: 0;
      padding: 0;
      opacity: 0;
      visibility: hidden;
      transform: translateX(18px) scale(0.96);
      pointer-events: none;
      overflow: hidden;
      box-shadow: none;
    }

    .floating-social__toggle {
      border-radius: 18px 0 0 18px;
      box-shadow: 0 18px 32px rgba(20, 46, 36, 0.16);
    }

    .floating-social__toggle .bi-chevron-left {
      transform: rotate(180deg);
    }
  }

  .floating-social__toggle {
    width: 38px;
    min-height: 108px;
    padding: 11px 7px;
    border: 0;
    border-radius: 15px 0 0 15px;
    background: linear-gradient(180deg, #163239 0%, #0f6b4d 100%);
    color: #ffffff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 18px 32px rgba(20, 46, 36, 0.18);
    cursor: pointer;
    transition:
      transform 0.25s ease,
      box-shadow 0.25s ease,
      background 0.25s ease;

    &:hover {
      transform: translateX(-3px);
      box-shadow: 0 22px 36px rgba(20, 46, 36, 0.22);
    }

    .bi {
      font-size: 0.88rem;
      line-height: 1;
    }

    .bi-chevron-left {
      transition: transform 0.25s ease;
    }
  }

  .floating-social__toggle-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .floating-social__panel {
    width: 62px;
    min-width: 62px;
    padding: 9px 7px;
    border-radius: 18px 0 0 18px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 28px rgba(20, 46, 36, 0.12);
    transition:
      width 0.32s ease,
      min-width 0.32s ease,
      margin-right 0.32s ease,
      padding 0.32s ease,
      opacity 0.25s ease,
      visibility 0.25s ease,
      transform 0.32s ease,
      box-shadow 0.32s ease;
  }

  .floating-social__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
  }

  .floating-social__link {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 12px 22px rgba(20, 46, 36, 0.12);
    transition:
      transform 0.25s ease,
      box-shadow 0.25s ease,
      filter 0.25s ease;

    &:hover {
      transform: translateY(-3px);
      box-shadow: 0 16px 26px rgba(20, 46, 36, 0.18);
      filter: saturate(1.06);
    }

    .bi {
      font-size: 0.98rem;
      line-height: 1;
    }
  }

  .floating-social__link--instagram {
    background: radial-gradient(
      circle at 30% 30%,
      #ffe38a 0%,
      #ff6b57 28%,
      #f40097 58%,
      #5c33ff 100%
    );
  }

  .floating-social__link--facebook {
    background: linear-gradient(135deg, #4f7cff 0%, #315bd8 100%);
  }

  .floating-social__link--linkedin {
    background: linear-gradient(135deg, #3d74de 0%, #2450b8 100%);
  }

  @media (max-width: 991px) {
    &.is-collapsed {
      .floating-social__toggle {
        border-radius: 16px 0 0 16px;
      }
    }

    .floating-social__toggle {
      width: 36px;
      min-height: 100px;
    }

    .floating-social__panel {
      padding: 8px 6px;
    }

    .floating-social__link {
      width: 40px;
      height: 40px;

      .bi {
        font-size: 0.92rem;
      }
    }
  }

  @media (max-width: 767px) {
    &.is-collapsed {
      .floating-social__toggle {
        border-radius: 14px 0 0 14px;
      }
    }

    .floating-social__toggle {
      width: 31px;
      min-height: 88px;
      padding: 9px 6px;

      .bi {
        font-size: 0.76rem;
      }
    }

    .floating-social__toggle-text {
      font-size: 0.52rem;
    }

    .floating-social__panel {
      width: 58px;
      min-width: 58px;
      padding: 7px 5px;
      border-radius: 16px 0 0 16px;
    }

    .floating-social__list {
      gap: 7px;
    }

    .floating-social__link {
      width: 36px;
      height: 36px;
      border-radius: 13px;

      .bi {
        font-size: 0.84rem;
      }
    }
  }
}

.floating-chat {
  position: fixed;
  right: 26px;
  bottom: 96px;
  z-index: 1035;

  .floating-chat__btn {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, #25d366 0%, #128c4a 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 16px 30px rgba(18, 140, 74, 0.24);
    transition:
      transform 0.25s ease,
      box-shadow 0.25s ease,
      filter 0.25s ease;

    &:hover {
      transform: translateY(-4px);
      box-shadow: 0 20px 34px rgba(18, 140, 74, 0.28);
      filter: saturate(1.05);
    }

    .bi {
      font-size: 1.35rem;
      line-height: 1;
    }
  }

  @media (max-width: 991px) {
    right: 18px;
    bottom: 82px;

    .floating-chat__btn {
      width: 50px;
      height: 50px;
      border-radius: 16px;
    }
  }

  @media (max-width: 767px) {
    right: 14px;
    bottom: 72px;

    .floating-chat__btn {
      width: 46px;
      height: 46px;
      border-radius: 15px;

      .bi {
        font-size: 1.15rem;
      }
    }
  }
}

.back-to-top {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 1035;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;

  &.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .back-to-top__btn {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #d7f15c 0%, #0f6b4d 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 30px rgba(20, 46, 36, 0.18);
    cursor: pointer;
    transition:
      transform 0.25s ease,
      box-shadow 0.25s ease,
      filter 0.25s ease;

    &:hover {
      transform: translateY(-4px);
      box-shadow: 0 20px 34px rgba(20, 46, 36, 0.22);
      filter: saturate(1.04);
    }

    .bi {
      font-size: 1.2rem;
      line-height: 1;
    }
  }

  @media (max-width: 991px) {
    right: 18px;
    bottom: 18px;

    .back-to-top__btn {
      width: 50px;
      height: 50px;
    }
  }

  @media (max-width: 767px) {
    right: 14px;
    bottom: 14px;

    .back-to-top__btn {
      width: 46px;
      height: 46px;

      .bi {
        font-size: 1rem;
      }
    }
  }
}
