.chat-bubble {
  position: fixed !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 0 !important;
  height: 0 !important;
  z-index: 2147482998 !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
}

.chat-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 62px;
  height: 62px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  z-index: 2147483000;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.chat-button svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.chat-modal {
  position: fixed;
  right: 24px;
  bottom: 100px;
  width: 360px;
  height: 500px;
  background: #fff;
  color: #000;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  z-index: 2147482999;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
}

.chat-modal.active {
  display: flex !important;
  flex-direction: column;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.chat-header {
  height: 72px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  flex-shrink: 0;
}

.chat-header strong {
  display: block;
  font-size: 16px;
}

.chat-header span {
  display: block;
  font-size: 12px;
  color: #666;
  margin-top: 3px;
}

.chat-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f2f2f2;
  color: #000;
  font-size: 24px;
  cursor: pointer;
}

.chat-body {
  flex: 1;
  padding: 18px;
  background: #fafafa;
  overflow-y: auto;
}

.message {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 12px;
  overflow-wrap: break-word;
}

.message.bot {
  background: #fff;
  color: #000;
  border: 1px solid rgba(0,0,0,.08);
  border-bottom-left-radius: 6px;
}

.message.bot p {
  margin: 0 0 10px;
}

.message.bot p:last-child,
.message.bot ul:last-child {
  margin-bottom: 0;
}

.message.bot ul {
  margin: 0 0 12px;
  padding-left: 18px;
}

.message.bot li {
  margin-bottom: 7px;
}

.message.bot strong {
  display: inline-block;
  font-weight: 700;
}

.chat-product-title {
  font-weight: 800;
  color: #050505;
  padding-top: 4px;
}

.chat-plan {
  margin: 0 0 10px;
  padding: 10px 11px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: #f7f7f7;
}

.chat-plan-name {
  font-weight: 750;
  color: #050505;
  margin-bottom: 7px;
}

.chat-plan-details {
  display: grid;
  gap: 5px;
  color: #333;
  font-size: 13px;
  line-height: 1.35;
}

.message.user {
  margin-left: auto;
  background: #000;
  color: #fff;
  border-bottom-right-radius: 6px;
}

.chat-form {
  height: 70px;
  padding: 12px;
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(0,0,0,.08);
  background: #fff;
}

.chat-form input {
  flex: 1;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
  font-size: 14px;
  background: #fff !important;
  color: #050505 !important;
  -webkit-text-fill-color: #050505 !important;
  caret-color: #050505 !important;
}

.chat-form input::placeholder {
  color: #777 !important;
  -webkit-text-fill-color: #777 !important;
}

.chat-form input:focus {
  background: #fff !important;
  color: #050505 !important;
  -webkit-text-fill-color: #050505 !important;
}

.chat-form button {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: #000;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 600px) {
  .chat-modal {
    right: 12px;
    left: 12px;
    bottom: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: auto;
    height: min(560px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
    border-radius: 18px;
    z-index: 2147483647;
  }

  .chat-body {
    padding: 12px;
  }

  .message {
    font-size: 13.5px;
  }

  .message.bot {
    max-width: 100%;
  }

  .message.user {
    max-width: 92%;
  }

  .chat-button {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 58px;
    height: 58px;
    display: flex !important;
  }

  .chat-button svg {
    width: 27px;
    height: 27px;
  }
}
