/* 浮動框容器 */
.fsw-floating-container {
  position: fixed;
  bottom: 30px;
  right: 10px;
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* padding: 10px 0; */
  z-index: 1000;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 水平排列模式 */
.fsw-floating-container.fsw-horizontal {
  flex-direction: row;
  width: auto;
  padding: 5px;
}

.fsw-floating-container.fsw-horizontal .fsw-floating-button {
  margin: 0 5px;
}

/* 按鈕樣式 */
.fsw-floating-button {
  width: 40px;
  height: 40px;
  margin: 5px 0;
  background-color: #f5f5f5;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, transform 0.3s;
  overflow: hidden;
  padding: 0px;
  position: relative;
}

/* 图标样式 */
.fsw-floating-button img {
  width: 24px;
  height: 24px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 增大所有图标尺寸 */
.fsw-floating-button img,
.fsw-floating-button i {
  width: 80%;
  height: 80%;
  min-width: 32px;
  min-height: 32px;
  object-fit: contain;
  font-size: 24px; /* 为Font Awesome图标设置固定大小 */
  text-align: center;
  color: #ffffff; /* 默认图标颜色为白色 */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 特定社交平台样式 */
.fsw-floating-button--telegram {
  background-color: #0088cc;
}

.fsw-floating-button--line {
  background-color: #00c300;
}

.fsw-floating-button--whatsapp {
  background-color: #25d366;
}

.fsw-floating-button--facebook {
  background-color: #3b5998;
}

.fsw-floating-button--instagram {
  background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
}

.fsw-floating-button--twitter {
  background-color: #1da1f2;
}

.fsw-floating-button--youtube {
  background-color: #ff0000;
}

.fsw-floating-button--gleezy {
  background-color: #FFBE1C;
}

.fsw-floating-button--wechat {
  background-color: #ffffff;
  border-color: #e2e8f0;
  border-style: solid;
  border-width: 1px;
}

/* 修改微信和Gleezy图标样式 */
.fsw-floating-button--wechat img {
  background-color: #fafafa;
}

.fsw-floating-button--gleezy img {
  background-color: #fafafa;
  border-radius: 50%;
  padding: 3px;
  width: 90%;
  height: 90%;
}

/* 自定义按钮 */
.fsw-floating-button--custom {
  background-color: #f5f5f5;
}

/* 自定义按钮图标特殊样式 */
.fsw-floating-button--custom i {
  color: #757575;
  font-size: 22px !important;
  width: 60% !important;
  height: 60% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
  visibility: visible !important;
}

/* 针对特定Font Awesome图标的优化 */
.fsw-floating-button .fa-shopping-cart,
.fsw-floating-button .fa-link,
.fsw-floating-button .fa-share-alt,
.fsw-floating-button .fa-envelope,
.fsw-floating-button .fa-bell,
.fsw-floating-button .fa-star,
.fsw-floating-button .fa-heart {
  font-size: 18px !important;
}

/* 返回頂部圖標 */
.fsw-back-to-top-icon {
  width: 70%;
  height: 70%;
  max-width: 28px;
  max-height: 28px;
  fill: #333;
}

.fsw-floating-button--back-to-top {
  background-color: #f5f5f5;
}

.fsw-floating-button--back-to-top img {
  filter: invert(1); /* 转为白色图标 */
}

/* QR 碼模態框樣式 */
.fsw-modal {
  display: none; /* 初始隱藏 */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.fsw-modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 0px 20px;
  border: 1px solid #888;
  width: 300px;
  border-radius: 10px;
  text-align: center;

  /* 使其绝对定位并居中 */
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fsw-modal-content h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: #333;
}

.fsw-wechat-info {
  background-color: #f1f1f1;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 300px;
  border-radius: 10px;
  text-align: center;

  /* 使其绝对定位并居中 */
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fsw-copy-and-open-wechat {
  margin: 0px 0px 20px 0px;
  padding: 10px 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
}

.fsw-copy-and-open-wechat:hover {
  background-color: #0056b3;
}

.fsw-copy-and-open-line {
  margin: 0px 0px 20px 0px;
  padding: 10px 10px;
  background-color: #00c300;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
}

.fsw-copy-and-open-line:hover {
  background-color: #009a00;
}

.fsw-close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.fsw-close-button:hover,
.fsw-close-button:focus {
  color: black;
}

/* 按钮标题悬停提示 */
.fsw-floating-button .fsw-tooltip {
  position: absolute;
  background-color: #333;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.fsw-floating-button:hover .fsw-tooltip {
  visibility: visible;
  opacity: 1;
}

/* 右侧按钮的悬停提示 */
.fsw-floating-container[data-position^="right"] .fsw-tooltip {
  right: 100%;
  margin-right: 10px;
}

/* 左侧按钮的悬停提示 */
.fsw-floating-container[data-position^="left"] .fsw-tooltip {
  left: 100%;
  margin-left: 10px;
}

/* 动画效果 */
@keyframes fsw-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fsw-slide-in-right {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fsw-slide-in-left {
  from { transform: translateX(-50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fsw-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.fsw-animation-fade {
  animation: fsw-fade-in 0.5s ease-out;
}

.fsw-animation-slide[data-position^="right"] {
  animation: fsw-slide-in-right 0.5s ease-out;
}

.fsw-animation-slide[data-position^="left"] {
  animation: fsw-slide-in-left 0.5s ease-out;
}

.fsw-animation-bounce {
  animation: fsw-bounce 1s;
}

/* 计数器气泡 */
.fsw-counter {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff4757;
  color: white;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 响应式样式 */
@media (max-width: 768px) {
  .fsw-floating-container {
    width: 50px;
  }
  
  .fsw-floating-button {
    width: 36px;
    height: 36px;
  }
  
  .fsw-modal-content {
    width: 90%;
    max-width: 300px;
  }
}
