/* 字体定义 */
@font-face {
  font-family: "AlimamaShuHeiTi";
  src: url("/assets/font/AlimamaShuHeiTi-Bold.ttf") format("truetype");
  font-weight: bold;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans SC";
  src: url("/assets/font/Source_Han_Sans_SC.otf") format("opentype");
  font-display: swap;
}

/* 联系方式侧边栏 */
.contact-sidebar {
  position: fixed;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  transition: right 0.3s ease-in-out;
  background: #ffffff;
  box-shadow: 0rem 0rem 0.16rem 0rem rgba(0, 0, 0, 0.06);
  border-radius: 0.12rem;
  border: 0.01rem solid #f6f6f6;
  overflow: visible;
}

.contact-sidebar.show {
  right: 0;
}

.contact-sidebar-inner {
  background: #ffffff;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
}

/* 联系项 */
.contact-item {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
  overflow: visible;
}

.contact-item:hover {
  background-color: #d12f2d;
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon {
  transform: scale(1.1);
}

.contact-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.contact-icon .icon-default {
  opacity: 1;
}

.contact-icon .icon-hover {
  opacity: 0;
}

.contact-item:hover .contact-icon .icon-default {
  opacity: 0;
}

.contact-item:hover .contact-icon .icon-hover {
  opacity: 1;
}

/* 提示框 */
.contact-tooltip {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  background-color: #c9252f;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-right: 10px;
  font-size: 16px;
  font-family: "AlimamaShuHeiTi", "Source Han Sans SC", sans-serif;
  font-weight: bold;
  box-shadow: 0 2px 12px rgba(201, 37, 47, 0.3);
  pointer-events: none;
  letter-spacing: 1px;
  z-index: 10000;
}

/* 提示框箭头 */
.contact-tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent #c9252f;
}

.contact-item:hover .contact-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
  right: calc(100% + 5px);
  display: block;
}

/* 电话提示框 - 支持多行显示 */
.contact-tooltip-phone {
  white-space: nowrap;
  line-height: 1.6;
  min-width: 200px;
  text-align: left;
}

/* 二维码提示框 */
.contact-tooltip-qrcode {
  padding: 10px;
  min-width: 150px;
}

.contact-tooltip-qrcode img {
  width: 150px;
  height: 150px;
  display: block;
  background: #ffffff;
  padding: 5px;
  border-radius: 4px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  .contact-sidebar {
    right: -70px;
  }

  .contact-sidebar-inner {
    padding: 8px 0;
  }

  .contact-item {
    width: 50px;
    height: 50px;
  }

  .contact-icon {
    width: 24px;
    height: 24px;
  }

  .contact-tooltip {
    font-size: 12px;
    padding: 10px 16px;
  }

  .contact-tooltip-qrcode {
    min-width: 130px;
  }

  .contact-tooltip-qrcode img {
    width: 130px;
    height: 130px;
  }
}
