body.chat-open-body {
  overflow: hidden !important;
}

#city-widgets-root {
  position: relative;
  z-index: 1100;
  isolation: isolate;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: #f5f1e8;
}

#city-widgets-root,
#city-widgets-root * {
  box-sizing: border-box;
}

#city-widgets-root a,
#city-widgets-root button,
#city-widgets-root input,
#city-widgets-root textarea,
#city-widgets-root label,
#city-widgets-root p,
#city-widgets-root h3,
#city-widgets-root div,
#city-widgets-root span,
#city-widgets-root form {
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

#city-widgets-root a {
  color: inherit;
  text-decoration: none;
}

#city-widgets-root button,
#city-widgets-root input,
#city-widgets-root textarea {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

#city-widgets-root .hidden {
  display: none !important;
}

#city-widgets-root .block {
  display: block !important;
}

#city-widgets-root .flex {
  display: flex !important;
}

#city-widgets-root .fixed-btn {
  position: fixed;
  bottom: 20px;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(212, 168, 83, 0.22);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  z-index: 1102;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}

#city-widgets-root .fixed-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.3);
}

#city-widgets-root #callback-button {
  right: 20px;
  background: linear-gradient(135deg, #1f9d55, #137c42);
}

#city-widgets-root #chat-toggle-btn {
  left: 20px;
  background: linear-gradient(135deg, #1e8f67, #1f6a54);
}

#city-widgets-root #callback-form {
  position: fixed;
  right: 20px;
  bottom: 92px;
  width: min(300px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(212, 168, 83, 0.18);
  border-radius: 20px;
  background: rgba(15, 15, 15, 0.97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  z-index: 1102;
  pointer-events: auto;
}

#city-widgets-root #callback-form p {
  margin: 0 0 12px;
  color: #c6c0b3;
  font-size: 14px;
  line-height: 1.45;
}

#city-widgets-root #callback-request-form {
  display: block;
}

#city-widgets-root #callback-form input,
#city-widgets-root #callback-form button {
  display: block;
  width: 100%;
  margin-top: 8px;
  border-radius: 14px;
}

#city-widgets-root #callback-request-form input[type="hidden"],
#city-widgets-root #callback-request-form .callback-hidden-field {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
}

#city-widgets-root #callback-form input {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff8ef;
  padding: 0 14px;
  opacity: 1;
  visibility: visible;
}

#city-widgets-root #callback-form input::placeholder {
  color: rgba(255, 248, 239, 0.58);
}

#city-widgets-root #callback-form input[type="tel"] {
  display: block !important;
  width: 100% !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 16px;
}

#city-widgets-root #callback-form button {
  min-height: 44px;
  border: 0;
  font-weight: 600;
  cursor: pointer;
}

#city-widgets-root #submit-callback {
  background: linear-gradient(135deg, #d4a853, #c0903c);
  color: #111;
}

#city-widgets-root #cancel-callback {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f1e8;
}

#city-widgets-root .chat-widget {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1101;
  pointer-events: none;
}

#city-widgets-root .chat-button,
#city-widgets-root .chat-container,
#city-widgets-root .messenger-block,
#city-widgets-root .push-notification,
#city-widgets-root .proactive-popup {
  pointer-events: auto;
}

#city-widgets-root .chat-container {
  position: fixed;
  left: 20px;
  bottom: 92px;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 140px));
  border: 1px solid rgba(212, 168, 83, 0.18);
  border-radius: 24px;
  background: rgba(15, 15, 15, 0.98);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 1101;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#city-widgets-root .chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  min-height: 62px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.2), rgba(255, 255, 255, 0.03));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

#city-widgets-root .chat-header h3 {
  margin: 0;
  font-family: "Montserrat", "Inter", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff8ef;
}

#city-widgets-root .operators-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 8px;
  color: #c6c0b3;
  font-size: 12px;
  white-space: nowrap;
}

#city-widgets-root .status-indicator,
#city-widgets-root .green-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  animation: cityWidgetPulse 1.6s infinite;
}

#city-widgets-root .close-button,
#city-widgets-root .push-notification-close,
#city-widgets-root .proactive-popup-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff8ef;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#city-widgets-root .user-info-form {
  margin: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#city-widgets-root .user-info-form p {
  margin: 0 0 12px;
  color: #fff8ef;
  font-weight: 600;
}

#city-widgets-root .form-group {
  margin-bottom: 12px;
}

#city-widgets-root .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #c6c0b3;
}

#city-widgets-root .form-group input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff8ef;
}

#city-widgets-root .form-group input::placeholder,
#city-widgets-root #chat-message::placeholder {
  color: rgba(255, 248, 239, 0.56);
}

#city-widgets-root .start-chat-button {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #d4a853, #c0903c);
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

#city-widgets-root .chat-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

#city-widgets-root .chat-message {
  max-width: 84%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

#city-widgets-root .chat-message.client {
  align-self: flex-end;
  background: linear-gradient(135deg, #b8872f, #d4a853);
  color: #111;
}

#city-widgets-root .chat-message.operator,
#city-widgets-root .chat-message.ephemeral-welcome-message {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  color: #fff8ef;
}

#city-widgets-root .typing-indicator {
  padding: 10px 12px;
}

#city-widgets-root .message-sender {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.8;
}

#city-widgets-root .message-text {
  word-break: break-word;
}

#city-widgets-root .message-time {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.72;
  text-align: right;
}

#city-widgets-root .quick-buttons {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 8px;
  padding: 0 14px 12px;
}

#city-widgets-root .quick-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(212, 168, 83, 0.28);
  border-radius: 999px;
  background: transparent;
  color: #fff8ef;
  cursor: pointer;
}

#city-widgets-root .chat-footer {
  flex-shrink: 0;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

#city-widgets-root .message-input-container {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 8px 48px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

#city-widgets-root #chat-message {
  display: block;
  width: 100%;
  min-height: 34px;
  max-height: 120px;
  border: 0;
  background: transparent;
  color: #fff8ef;
  resize: none;
  padding: 0;
}

#city-widgets-root .send-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4a853, #c0903c);
  color: #111;
  cursor: pointer;
}

#city-widgets-root .social-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

#city-widgets-root .messenger-hint {
  font-size: 12px;
  color: #c6c0b3;
  white-space: nowrap;
}

#city-widgets-root .simple-messengers,
#city-widgets-root .messenger-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

#city-widgets-root .messenger-mini,
#city-widgets-root .messenger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#city-widgets-root .messenger-mini {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

#city-widgets-root .messenger-mini img {
  width: 14px;
  height: 14px;
}

#city-widgets-root .messenger-block {
  position: fixed;
  right: 90px;
  bottom: 20px;
  z-index: 1099;
}

#city-widgets-root .messenger-circle {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

#city-widgets-root .messenger-icon.telegram .messenger-circle {
  background: #229ed9;
}

#city-widgets-root .messenger-icon.whatsapp .messenger-circle {
  background: #25d366;
}

#city-widgets-root .messenger-icon.max .messenger-circle {
  background: #2563eb;
}

#city-widgets-root .messenger-circle img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

#city-widgets-root .typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}

#city-widgets-root .typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  animation: cityWidgetDots 1s infinite;
}

#city-widgets-root .typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

#city-widgets-root .typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

#city-widgets-root .push-notification,
#city-widgets-root .proactive-popup {
  position: fixed;
  left: 20px;
  bottom: 92px;
  width: min(300px, calc(100vw - 32px));
  padding: 14px 42px 14px 14px;
  border: 1px solid rgba(212, 168, 83, 0.18);
  border-radius: 18px;
  background: rgba(15, 15, 15, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  color: #fff8ef;
  z-index: 1103;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#city-widgets-root .push-notification.notification-show,
#city-widgets-root .proactive-popup.notification-show {
  opacity: 1;
  transform: translateY(0);
}

#city-widgets-root .notification-hide {
  opacity: 0 !important;
  transform: translateY(20px) !important;
}

#city-widgets-root .push-notification-content,
#city-widgets-root .proactive-popup-content {
  font-size: 13px;
  line-height: 1.45;
}

#city-widgets-root .chat-link {
  color: #d4a853;
  text-decoration: underline;
}

#city-widgets-root #chat-toggle-btn.has-unread::after,
#city-widgets-root .has-unread::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  border: 2px solid #fff;
}

#city-widgets-root .pulse-animation {
  animation: cityWidgetPulse 1.6s infinite;
}

#city-widgets-root .chat-notification {
  padding: 10px 15px;
  margin: 5px auto;
  border-radius: 10px;
  max-width: 80%;
  text-align: center;
  animation: cityWidgetFadeIn 0.3s;
  transition: opacity 0.5s;
}

#city-widgets-root .chat-notification.info {
  background: rgba(33, 150, 243, 0.15);
  border-left: 4px solid #2196f3;
  color: #dceeff;
}

#city-widgets-root .chat-notification.error {
  background: rgba(244, 67, 54, 0.14);
  border-left: 4px solid #f44336;
  color: #ffe0de;
}

#city-widgets-root .chat-notification.fade-out {
  opacity: 0;
}

#city-widgets-root .chat-fixed {
  left: 20px !important;
  right: auto !important;
}

#city-widgets-root .chat-mobile {
  width: 100% !important;
  height: 65vh !important;
  max-height: 480px !important;
  bottom: 90px !important;
  right: 0 !important;
  left: 0 !important;
  border-radius: 0 !important;
  margin: 0 auto !important;
}

#city-widgets-root .chat-desktop {
  left: 20px !important;
  right: auto !important;
}

#city-widgets-root .chat-messages-mobile {
  max-height: calc(65vh - 120px) !important;
}

@keyframes cityWidgetPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 168, 83, 0.42);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(212, 168, 83, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 168, 83, 0);
  }
}

@keyframes cityWidgetDots {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@keyframes cityWidgetFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 767px) {
  #city-widgets-root .chat-container,
  #city-widgets-root .push-notification,
  #city-widgets-root .proactive-popup {
    left: 12px;
    width: calc(100vw - 24px);
  }

  #city-widgets-root .chat-container {
    bottom: 88px;
    height: min(72vh, 560px);
  }

  #city-widgets-root #callback-form {
    right: 12px;
    width: calc(100vw - 24px);
  }

  #city-widgets-root #callback-button {
    right: 12px;
  }

  #city-widgets-root #chat-toggle-btn {
    left: 12px;
  }

  #city-widgets-root .messenger-block {
    right: 78px;
    bottom: 16px;
  }

  #city-widgets-root .messenger-circle {
    width: 46px;
    height: 46px;
  }

  #city-widgets-root .messenger-circle img {
    width: 24px;
    height: 24px;
  }
}
