/* Right Panel Fixed Styles */
.right-panel-fixed {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.right-panel-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.right-panel-btn {
  background: #232F3E;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 15px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 75px;
  height: 75px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: visible;
  opacity: 0.3;
}

/* Ensure all specific buttons use the same size as .right-panel-btn */
.go-top-btn,
.phone-btn,
.wechat-btn,
.whatsapp-btn,
.contact-btn {
  width: 75px !important;
  height: 75px !important;
  min-width: 75px !important;
  min-height: 75px !important;
  max-width: 75px !important;
  max-height: 75px !important;
  box-sizing: border-box;
}

.right-panel-btn:hover {
  background: #1A252F;
  transform: translateX(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.right-panel-btn .btn-icon {
  font-size: 18px;
  margin-bottom: 6px;
  display: block;
}

.right-panel-btn .btn-text {
  font-size: 12px;
  text-align: center;
  line-height: 1.1;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Phone button specific styling with hover expansion */
.phone-btn {
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.phone-btn .btn-text {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

.phone-btn .btn-icon {
  color: white !important;
  font-size: 18px;
}

.phone-btn:hover {
  background: #1A252F;
  transform: translateX(-3px);
}

.phone-btn::after {
display: none;
}
.phone-btn-popup {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%);
  background: #232F3E;
  color: white;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 999;
  min-width: 180px;
  width: 180px;
  height: 75px;
  max-height: 75px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.phone-btn:hover .phone-btn-popup {
  opacity: 1;
  visibility: visible;
}

.phone-number-label {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}

.phone-number-value {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.phone-btn:hover::after {
  opacity: 1;
  visibility: visible;
}

/* WhatsApp button specific styling with QR code hover */
.whatsapp-btn .whatsapp-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 6px;
}

.whatsapp-btn {
  position: relative;
  overflow: visible;
}

.whatsapp-btn:hover {
  background: #1A252F;
  transform: translateX(-3px);
}

.whatsapp-qrcode-container {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  min-width: 180px;
  min-height: 180px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  border: 2px solid #232F3E;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  padding: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  
}

.whatsapp-qrcode {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.whatsapp-btn:hover .whatsapp-qrcode-container {
  opacity: 1;
  visibility: visible;
}

/* WeChat button specific styling with QR code hover */
.wechat-btn .wechat-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 6px;
}

.wechat-btn {
  position: relative;
  overflow: visible;
}

.wechat-btn:hover {
  background: #1A252F;
  transform: translateX(-3px);
}

.wechat-qrcode-container {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  min-width: 180px;
  min-height: 180px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  border: 2px solid #232F3E;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  padding: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wechat-qrcode {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.wechat-btn:hover .wechat-qrcode-container {
  opacity: 1;
  visibility: visible;
}

/* Go Top button specific styling */
.go-top-btn .btn-icon {
  font-size: 20px;
  font-weight: 900;
}

/* Contact button specific styling */
.contact-btn .btn-icon {
  font-size: 18px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  /* On mobile, allow hover to show QR code but prevent app opening with JavaScript */
  .wechat-btn {
    cursor: pointer; /* Keep cursor as pointer for better UX */
  }
  
  .whatsapp-btn {
    cursor: default;
  }
  
  .right-panel-fixed {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }

  .right-panel-btn,
  .go-top-btn,
  .phone-btn,
  .wechat-btn,
  .whatsapp-btn,
  .contact-btn {
    width: 75px !important;
    height: 75px !important;
    min-width: 75px !important;
    min-height: 75px !important;
    max-width: 75px !important;
    max-height: 75px !important;
    padding: 10px 8px;
    font-size: 10px;
    box-sizing: border-box;
  }

  .right-panel-btn .btn-text {
    font-size: 12px;
    text-align: center;
  }

  .phone-btn::after {
    right: 75px;
    font-size: 12px;
    padding: 10px 15px;
    min-width: 120px;
  }

  .phone-btn-popup {
    right: 80px;
    min-width: 150px;
    width: 120px;
    height: 75px;
    max-height: 75px;
    font-size: 12px;
    padding: 8px 12px;
  }

  .whatsapp-qrcode-container {
    right: 80px;
    min-width: 130px;
    min-height: 130px;
  }

  .wechat-qrcode-container {
    right: 80px;
    min-width: 130px;
    min-height: 130px;
  }

  .phone-number-label {
    font-size: 11px;
    font-weight: 500;
  }

  .phone-number-value {
    font-size: 13px;
    font-weight: 700;
  }
}

@media (max-width: 480px) {
  .right-panel-fixed {
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
  }

  .right-panel-btn,
  .go-top-btn,
  .phone-btn,
  .wechat-btn,
  .whatsapp-btn,
  .contact-btn {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    padding: 8px 6px;
    box-sizing: border-box;
  }

  .right-panel-btn .btn-text {
    font-size: 12px;
    text-align: center;
  }

  .phone-btn::after {
    right: 65px;
    font-size: 11px;
    padding: 8px 12px;
    min-width: 110px;
  }

  .phone-btn-popup {
    right: 65px;
    min-width: 120px;
    width: 120px;
    height: 60px;
    max-height: 60px;
    font-size: 11px;
    padding: 6px 10px;
  }

  .whatsapp-qrcode-container {
    right: 65px;
    min-width: 130px;
    min-height: 130px;
  }

  .wechat-qrcode-container {
    right: 65px;
    min-width: 130px;
    min-height: 130px;
  }

  .phone-number-label {
    font-size: 10px;
    font-weight: 500;
  }

  .phone-number-value {
    font-size: 12px;
    font-weight: 700;
  }
}

/* Hide on very small screens to avoid interference */
@media (max-width: 320px) {
  .right-panel-fixed {
    display: none;
  }
}
