/* ========= Floating Customer Service Styles - Tesla Style ========= */

/* Main Floating Panel */
.floating-customer-service {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  background: #FFFFFF;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-radius: 12px 0 0 12px;
  border: 1px solid #E8E8E8;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.floating-customer-service.hidden {
  right: -280px;
}

/* Close Button */
.floating-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: #F6F6F6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.floating-close-btn:hover {
  background: #E8E8E8;
  transform: rotate(90deg);
}

.floating-close-btn i {
  color: #393C41;
  font-size: 14px;
}

/* Desktop Open Button (visible when panel is closed) */
.floating-customer-open {
  display: none;
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: #FFFFFF;
  border: 1px solid #E8E8E8;
  border-right: none;
  border-radius: 12px 0 0 12px;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.06);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-customer-open.show {
  display: flex;
}

.floating-customer-open:hover {
  width: 52px;
  background: #FFFFFF;
  box-shadow: -3px 0 16px rgba(232, 33, 39, 0.15);
  border-color: #E82127;
}

.floating-customer-open i {
  color: #E82127;
  font-size: 22px;
  margin: 0;
  padding: 0;
}

.open-tooltip {
  display: none;
}

/* Floating Content */
.floating-content {
  padding: 24px;
}

/* Title */
.floating-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 500;
  color: #171A20;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E8E8E8;
}

.floating-title i {
  color: #E82127;
  font-size: 20px;
}

/* QR Code Section */
.floating-qr-section {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px;
  background: #F6F6F6;
  border-radius: 12px;
}

.floating-qr-code {
  width: 150px;
  height: 150px;
  margin: 0 auto 12px;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  overflow: hidden;
  background: #FFFFFF;
}

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

.floating-qr-text {
  font-size: 14px;
  color: #5C5E62;
  margin: 0;
  font-weight: 400;
}

/* Contact Section */
.floating-contact-section {
  margin-bottom: 20px;
}

.floating-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #FFFFFF;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.floating-contact-item:hover {
  background: #F6F6F6;
  border-color: #E82127;
  transform: translateX(-3px);
}

.floating-contact-item i {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F6F6F6;
  color: #E82127;
  border-radius: 50%;
  font-size: 15px;
  flex-shrink: 0;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.contact-label {
  font-size: 12px;
  color: #5C5E62;
  font-weight: 400;
}

.contact-value {
  font-size: 14px;
  color: #171A20;
  font-weight: 500;
}

/* Links Section */
.floating-links-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.floating-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: #E82127;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
}

.floating-link-btn:hover {
  background: #CC0000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 33, 39, 0.25);
  color: #FFFFFF;
}

.floating-link-btn i {
  font-size: 16px;
}

/* Mobile Toggle Button */
.floating-customer-toggle {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 80px;
  width: 56px;
  height: 56px;
  background: #FFFFFF;
  border: 1px solid #E8E8E8;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-customer-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(232, 33, 39, 0.15);
  border-color: #E82127;
}

.floating-customer-toggle i {
  color: #E82127;
  font-size: 24px;
}

/* Return to Top Button Enhancement */
#return-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: #FFFFFF;
  border: 1px solid #E8E8E8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9997;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

#return-to-top.show {
  opacity: 1;
  visibility: visible;
}

#return-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border-color: #E82127;
  background: #E82127;
}

#return-to-top i {
  color: #E82127;
  font-size: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Hide floating panel on mobile */
  .floating-customer-service {
    right: -280px;
  }

  .floating-customer-service.show {
    right: 0;
  }

  /* Show toggle button on mobile */
  .floating-customer-toggle {
    display: flex;
  }

  /* Hide desktop open button on mobile */
  .floating-customer-open {
    display: none !important;
  }

  /* Adjust return to top button position on mobile */
  #return-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  #return-to-top i {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .floating-customer-service {
    width: 100%;
    max-width: 320px;
  }

  .floating-content {
    padding: 20px;
  }
}

.floating-customer-show {
  display: flex;
}

