.whatsapp-widget {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 1000 !important;
  font-family: "Cairo", sans-serif;
  direction: rtl;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.what-up-hero {
  background: #1dff83 !important;
  color: black !important;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 4rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 400;
  transition: all 0.3s ease;
  border: none;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  flex: 1;
  max-width: 138px;
  white-space: nowrap;
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) !important;
  pointer-events: all !important;
}

.intro__btn .whatsapp-btn {
  opacity: 1 !important;
  pointer-events: all !important;
  transform: scale(1) !important;
  transition: all 0.3s ease;
  display: inline-flex !important;
  visibility: visible !important;
}

body.whatsapp-widget-active .whatsapp-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.whatsapp-widget .whatsapp-popup.show ~ .whatsapp-button,
.whatsapp-widget:has(.whatsapp-popup.show) .whatsapp-button {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.8) !important;
  transition: all 0.3s ease !important;
  visibility: hidden !important;
}

.whatsapp-button.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.8) !important;
  transition: all 0.3s ease !important;
  visibility: hidden !important;
}

.whatsapp-button {
  width: 60px !important;
  height: 60px !important;
  background: linear-gradient(135deg, #25d366, #20b358) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3) !important;
  transition: all 0.3s ease !important;
  border: none !important;
  animation: pulse 2s infinite !important;
  position: relative !important;
  z-index: 1002 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.whatsapp-button:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4) !important;
}

.whatsapp-button svg {
  width: 30px !important;
  height: 30px !important;
  fill: white !important;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
  }
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
  }
}

.whatsapp-popup {
  position: absolute;
  bottom: 0px;
  right: 0;
  width: 320px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s ease;
  overflow: hidden;
  z-index: 1001;
  color-scheme: light dark;
}

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

.whatsapp-header {
  background: linear-gradient(135deg, #25d366, #20b358);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.whatsapp-header .avatar {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.whatsapp-header .info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.whatsapp-header .info p {
  margin: 2px 0 0 0;
  font-size: 12px;
  opacity: 0.9;
}

.close-button {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.whatsapp-content {
  padding: 20px;
}

.message {
  background: #f0f2f5;
  padding: 12px 15px;
  border-radius: 18px;
  margin-bottom: 15px;
  position: relative;
  border-bottom-right-radius: 5px;
}

.message::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -8px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-left-color: #f0f2f5;
  border-bottom: none;
}

.message p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

.time {
  font-size: 11px;
  color: #999;
  margin-top: 5px;
  text-align: left;
}

.whatsapp-action {
  background: linear-gradient(135deg, #25d366, #20b358);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: "Cairo", sans-serif;
}

.whatsapp-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-action svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .whatsapp-popup {
    width: 290px;
    right: -10px;
  }

  .whatsapp-widget {
    bottom: 15px;
    right: 15px;
  }

  body.whatsapp-widget-active .whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 768px) {
  .intro-section ~ * .whatsapp-widget {
    display: block;
  }
}

.online-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #4caf50;
  border: 3px solid white;
  border-radius: 50%;
  animation: online-pulse 2s infinite;
}

@keyframes online-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 1024px) {
  .what-up-hero {
    max-width: 312px;
    flex: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  .whatsapp-popup {
    background: #1e1e1e !important;
    color: white !important;
    border: 1px solid #333 !important;
  }

  .message {
    background: #2d2d2d !important;
    color: white !important;
    border: 1px solid #404040 !important;
  }

  .message p {
    color: white !important;
  }

  .time {
    color: #ccc !important;
  }

  .whatsapp-header .info h4 {
    color: white !important;
  }

  .whatsapp-header .info p {
    color: rgba(255, 255, 255, 0.9) !important;
  }

  /* Треугольник сообщения для темной темы */
  .message::after {
    border-left-color: #2d2d2d !important;
  }
}

/* Принудительная темная тема для Windows и других систем */
.whatsapp-popup {
  color-scheme: light dark;
}

/* Дополнительная поддержка для высокого контраста */
@media (forced-colors: active) {
  .whatsapp-popup {
    background: Canvas !important;
    color: CanvasText !important;
    border: 1px solid ButtonBorder !important;
  }

  .message {
    background: Field !important;
    color: FieldText !important;
    border: 1px solid ButtonBorder !important;
  }

  .message p {
    color: FieldText !important;
  }

  .time {
    color: GrayText !important;
  }
}

.burger {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger span {
  display: block !important;
  width: 100%;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
  transform-origin: center;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav.active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.overflow {
  overflow: hidden !important;
}

/* 
body.popup-open .whatsapp-popup {
  display: none !important;
}
*/

/*
body.whatsapp-widget-active .intro__btn .whatsapp-btn {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: all 0.3s ease;
}
*/
