.floating-social-bar,
.floating-social-bar * {
  box-sizing: border-box;
}

.floating-social-bar {
  position: fixed;
  top: 50%;
  right: 24px;
  z-index: 9999;
  display: flex;
  width: 72px;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 10px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 24px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.floating-social-bar button,
.floating-social-bar a {
  font: inherit;
}

.fsb-social-link {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #243044;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(16, 49, 104, 0.1);
  cursor: pointer;
  outline: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.fsb-social-link:hover,
.fsb-social-link:focus-visible,
.fsb-item.is-open .fsb-social-link {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transform: scale(1.08);
}

.fsb-social-link:focus-visible {
  outline: 3px solid rgba(29, 95, 175, 0.24);
  outline-offset: 3px;
}

.fsb-social-link svg {
  display: block;
  width: 25px;
  height: 25px;
}

.fsb-social-link img {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.fsb-icon-text {
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.fsb-facebook {
  color: #1877f2;
}

.fsb-instagram {
  color: #ffffff;
  background: linear-gradient(135deg, #feda75 0%, #fa7e1e 28%, #d62976 52%, #962fbf 74%, #4f5bd5 100%);
}

.fsb-qq {
  color: #111111;
  background: #ffffff;
}

.fsb-wechat {
  color: #ffffff;
  background: #07c160;
}

.fsb-item {
  position: relative;
  width: 46px;
  height: 46px;
}

.fsb-panel {
  position: absolute;
  top: 50%;
  right: calc(100% + 16px);
  width: 186px;
  padding: 14px;
  color: #243044;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(223, 230, 240, 0.88);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(16, 49, 104, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fsb-item.is-open .fsb-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.fsb-panel::after {
  position: absolute;
  top: 50%;
  right: -7px;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(223, 230, 240, 0.88);
  border-right: 1px solid rgba(223, 230, 240, 0.88);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.fsb-panel-title {
  margin: 0 0 8px;
  color: #0e2d61;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.fsb-panel-text {
  margin: 0;
  color: #6d7b90;
  font-size: 12px;
  line-height: 1.65;
}

.fsb-panel-action {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 0 12px;
  color: #ffffff;
  background: #144a96;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.fsb-qr {
  width: 136px;
  height: 136px;
  margin: 0 auto 10px;
  overflow: hidden;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px) 0 0 / 34px 34px,
    linear-gradient(#111 10px, transparent 10px) 0 0 / 34px 34px,
    linear-gradient(90deg, transparent 12px, #111 12px 20px, transparent 20px) 7px 7px / 42px 42px,
    #ffffff;
  border: 8px solid #ffffff;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(16, 49, 104, 0.12);
}

.fsb-qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fsb-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  color: #6d7b90;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.fsb-close:hover,
.fsb-close:focus-visible {
  color: #0e2d61;
  background: rgba(20, 74, 150, 0.08);
}

@media (max-width: 767px) {
  .floating-social-bar {
    top: auto;
    right: 12px;
    bottom: 18px;
    width: 56px;
    gap: 10px;
    padding: 12px 8px;
    border-radius: 20px;
    transform: none;
  }

  .fsb-item,
  .fsb-social-link {
    width: 38px;
    height: 38px;
  }

  .fsb-social-link svg {
    width: 21px;
    height: 21px;
  }

  .fsb-social-link img {
    width: 21px;
    height: 21px;
  }

  .fsb-panel {
    right: calc(100% + 12px);
    width: min(178px, calc(100vw - 90px));
  }

  .fsb-qr {
    width: 118px;
    height: 118px;
  }
}
