/* Contact Widget Styles */
.bw-contact-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: none;
}

body.bw-contact-widget-initialized .bw-contact-widget {
  display: block;
}

/* Main Button Wrapper (for ping animation) */
.bw-main-btn-wrapper {
  position: relative;
  width: 60px;
  height: 60px;
}

/* Main Floating Button */
.bw-main-floating-btn {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
  transition: all 0.3s ease;
  overflow: hidden;
  z-index: 2;
}

.bw-main-floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.bw-main-floating-btn:active {
  transform: scale(0.95);
}

/* Ping Animation */
@keyframes bw-ping {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.bw-ping-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 107, 53, 0.6);
  animation: bw-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
  z-index: 1;
}

/* Main Button Icon */
.bw-main-btn-icon {
  width: 28px;
  height: 28px;
  position: relative;
  z-index: 1;
  color: white;
}

/* Contact Options Container */
.bw-contact-options {
  position: absolute;
  bottom: 76px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 60px;
}

/* Contact Items */
.bw-contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-left: auto;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  will-change: transform, opacity;
}

.bw-contact-btn {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.bw-contact-item.bw-show.bw-contact-btn:hover {
  transform: translateY(0) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease-out;
}

.bw-contact-item.bw-show.bw-contact-btn:active {
  transform: translateY(0) scale(0.95);
  transition: transform 0.1s ease;
}

/* Contact Link */
.bw-contact-link {
  text-decoration: none;
  color: white;
}

/* Contact Icon */
.bw-contact-icon {
  width: 24px;
  height: 24px;
  color: white;
  position: relative;
  z-index: 1;
}

/* Social Media Button Colors */
.bw-whatsapp-btn {
  background-color: #25D366;
}

.bw-whatsapp-btn:hover {
  background-color: #1da851;
}

.bw-telegram-btn {
  background-color: #24A1DE;
}

.bw-telegram-btn:hover {
  background-color: #1e8bc3;
}

.bw-messenger-btn {
  background-color: #1877F2;
}

.bw-messenger-btn:hover {
  background-color: #1464d8;
}

.bw-wechat-btn {
  background-color: #7BC142;
}

.bw-wechat-btn:hover {
  background-color: #6ba638;
}

.bw-line-btn {
  background-color: #06C755;
}

.bw-line-btn:hover {
  background-color: #05b04a;
}

.bw-instagram-btn {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.bw-instagram-btn:hover {
  opacity: 0.9;
}

.bw-phone-btn {
  background-color: #ff6b35;
}

.bw-phone-btn:hover {
  background-color: #e55a2b;
}

/* Theme Background Color */
.bw-bg-theme {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

/* Animation Classes */
@keyframes bw-soft-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bw-contact-item.bw-animate-soft-in {
  /* Ready for animation but stays hidden until .bw-show is added */
}

.bw-contact-item.bw-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.bw-contact-item.bw-closing {
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

@keyframes bw-soft-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
}

/* City Dropdown */
.bw-city-dropdown {
  position: fixed;
  bottom: 100px;
  right: 75px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 8px;
  z-index: 9998;
  min-width: 200px;
}

.bw-city-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.bw-city-dropdown-btn:hover {
  background-color: #f5f5f5;
}

.bw-city-icon {
  width: 24px;
  height: 24px;
  color: #ff6b35;
}

/* Dropdown Backdrop */
.bw-dropdown-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9997;
  background: transparent;
}

/* Modal */
.bw-modal-contact-widget-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.bw-modal-contact-widget-content {
  background: white;
  border-radius: 20px;
  max-width: 400px;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Modal Header */
.bw-modal-contact-widget-header {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  padding: 32px 24px;
  text-align: center;
  color: white;
  position: relative;
  z-index: 1;
}

.bw-modal-contact-widget-icon {
  width: 56px;
  height: 56px;
  color: white;
  margin: 0 auto;
}

.bw-modal-contact-widget-header h2 {
  font-size: 24px;
  color: white;
  margin: 0;
}

/* Modal Body */
.bw-modal-contact-widget-body {
  padding: 32px 24px;
}

.bw-phone-label {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bw-phone-number {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  letter-spacing: 1px;
}

/* Call Button */
.bw-call-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 24px;
  margin-top: 1rem;
  margin-bottom: 0.7rem;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.bw-call-button:hover {
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.bw-call-button:active {
  transform: translateY(0);
}

.bw-call-button-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.bw-call-button:hover .bw-call-button-effect {
  transform: translateX(100%);
}

.bw-call-icon {
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 1;
}

.bw-call-button span {
  position: relative;
  z-index: 1;
}

/* Ping Dot */
.bw-ping-dot {
  position: relative;
  width: 8px;
  height: 8px;
  z-index: 1;
}

.bw-ping-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  border-radius: 50%;
  animation: bw-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Close Button */
.bw-close-button {
  width: 100%;
  padding: 14px 24px;
  background: #f9fafb;
  color: #666;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bw-close-button:hover {
  background: #e0e0e0;
  color: #333;
}

/* Modal Decorations */
.bw-modal-contact-widget-decoration-1,
.bw-modal-contact-widget-decoration-2 {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.bw-modal-contact-widget-decoration-1 {
  top: -30px;
  right: -30px;
}

.bw-modal-contact-widget-decoration-2 {
  bottom: -50px;
  left: -50px;
  width: 150px;
  height: 150px;
}

/* Fade In Animation */
@keyframes bw-fade-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.bw-animate-fade-in {
  animation: bw-fade-in 0.3s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
  .bw-contact-widget {
    bottom: 15px;
    right: 15px;
  }

  .bw-main-btn-wrapper {
    width: 48px;
    height: 48px;
  }

  .bw-main-floating-btn {
    width: 48px;
    height: 48px;
  }

  .bw-ping-ring {
    width: 48px;
    height: 48px;
  }

  .bw-main-btn-icon {
    width: 22px;
    height: 22px;
  }

  .bw-contact-item {
    width: 36px;
    height: 36px;
  }

  .bw-contact-icon {
    width: 18px;
  }

  .bw-contact-options {
    bottom: 64px;
  }

  .bw-city-dropdown {
    bottom: 82px;
    right: 60px;
  }

  .bw-modal-contact-widget-content {
    margin: 0 16px;
  }

  .bw-phone-number {
    font-size: 24px;
  }
}


.bw-contact-widget-initialized .to-top-right #toTop {
  right: 120px;
}

@media (max-width: 768px) {
  .bw-contact-widget-initialized .to-top-right #toTop {
    right: 90px;
    bottom: 15px;
  }
}