/* WhatsApp Widget Styles */
.whatsapp-widget {
  position: fixed;
  bottom: 200px;
  left: 0px; /* اگر left edge کے بالکل قریب چاہیے تو 0 کر دیں */
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  direction: rtl;
}

.whatsapp-button {
  background-color: #64485e;
  border: none;
  border-radius: 6px; /* گول سے مربع بنایا */
  padding: 10px 12px; /* padding کم کی */
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px; /* آئیکن اور ٹیکسٹ کا فاصلہ کم کیا */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: 0.3s;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  flex-direction: row-reverse;

  transform-origin: center center;
  transform: rotate(90deg);
  margin-left: -15px; /* بٹن کو left edge کے قریب کیا */
}

.whatsapp-button:hover {
  background-color: #553d52;
  transform: rotate(90deg) translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.whatsapp-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.whatsapp-popup {
  position: absolute;
  bottom: 70px;
  left: 0;
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
  direction: rtl;
  text-align: right;
  font-family: inherit;
  user-select: none;
  z-index: 99999;
}

.whatsapp-popup.show {
  transform: scale(1) translateY(0);
  opacity: 1;
  visibility: visible;
}

.whatsapp-header {
  background-color: #64485e;
  color: #fff;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
}

.whatsapp-close {
  position: absolute;
  top: 15px;
  left: 15px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.whatsapp-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.whatsapp-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.whatsapp-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
}

.whatsapp-profile-info {
  display: flex;
  flex-direction: column;
}

.whatsapp-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  text-align: right;
}

.whatsapp-website {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  text-align: right;
}

.whatsapp-website:hover {
  text-decoration: underline;
}

.whatsapp-body {
  padding: 20px;
  background-color: #f8f9fa;
}

.whatsapp-message {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  border: 1px solid #e9ecef;
  user-select: text;
}

.whatsapp-chat-button {
  background-color: #64485e;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 12px 20px;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s;
  flex-direction: row-reverse;
}

.whatsapp-chat-button:hover {
  background-color: #553d52;
}

@media (max-width: 480px) {
  .whatsapp-popup {
    width: 280px;
    left: -10px;
  }
  .whatsapp-widget {
    bottom: 200px;
    left: 15px;
  }
}