body{
    overflow:hidden;
}
#promo-widget {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
}

#promo-widget{
    display:none !important;
  .promo-content {
    position: relative;
    width: min(520px, 100%);
    padding: 26px 22px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
    animation: fadeIn 0.25s ease;
  }
}

.name-prompt{
    display:none !important;
}
  .promo-content h3 {
    margin-top: 0;
    color: #075e54;
    font-size: 20px;
  }

#chat-input input{
    pointer-events:auto;
}
.promo-content {
  position: relative;
  .promo-text {
    color: #222;
    line-height: 1.6;
    margin: 12px 0 0;
    font-size: 16px;
  }
  animation: fadeIn 0.25s ease;
}

.promo-content h3 {
  margin-top: 0;
  color: #075e54;
}

.promo-text {
  color: #444;
  line-height: 1.6;
  .promo-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 12px 18px;
    background: #25d366;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.18s;
    font-size: 15px;
  }
  border-radius: 8px;
  transition: 0.2s;
}

.promo-btn:hover {
  transform: scale(1.05);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

#chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
  z-index: 10001;
}

#chat-toggle:hover {
  transform: scale(1.1);
}
#chat-box {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;

    display: none;
    flex-direction: column;

    background: #fff;
    z-index: 99999;
}
#chat-box.show {
  display: flex;
}

#chat-header{
    height:60px;
    min-height:60px;
    background:#075e54;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 16px;
}

#chat-header span:first-child {
  display: inline-block;
  max-width: calc(100% - 40px);
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

#minimize-chat {
  cursor: pointer;
  font-size: 20px;
  transition: 0.2s;
}

#minimize-chat:hover {
  transform: scale(1.2);
}

.pre-chat{
    padding:12px 15px;
    background:#f5f5f5;
    border-bottom:1px solid #ddd;
}

#chat-messages{
    flex:1;
    overflow-y:auto;
    padding:15px;
    background:#ece5dd;
}

#chat-input{
    display:flex;
    padding:10px;
    background:#fff;
    border-top:1px solid #ddd;
}


#chat-messages::-webkit-scrollbar {
  width: 5px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.5;
  color: #111;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  animation: pop 0.2s ease;
}

.msg-name {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #333;
}

.msg-text {
  margin: 0;
  padding: 0;
}

.msg-image-wrap {
  display: inline-block;
  max-width: 100%;
  margin-top: 6px;
}

.msg-image-wrap{
  display:inline-flex;
  max-width:100%;
  margin-top:6px;
  padding:4px;
  border-radius:14px;
  background:rgba(255,255,255,0.72);
  border:1px solid rgba(0,0,0,0.06);
}
.msg-image{
  display:block;
  width:min(240px, 100%);
  max-width:240px;
  max-height:280px;
  height:auto;
  border-radius:10px;
  object-fit:contain;
  background:#f7f7f7;
  box-shadow:0 2px 8px rgba(0,0,0,0.12);
}
.msg-caption {
  margin-top: 8px;
  font-size: 13px;
  color: #444;
  line-height: 1.4;
  white-space: pre-wrap;
}
.user {
  align-self: flex-end;
  background: #dcf8c6;
  border-bottom-right-radius: 3px;
  margin-left: auto;
}

.admin {
  align-self: flex-start;
  background: #fff;
  border-bottom-left-radius: 3px;
  margin-right: auto;
}
.msg-time{
  display:inline-block;
  margin-top:6px;
  font-size:12px;
  color:#667781;
  text-align:right;
  line-height:1;
  align-self:flex-end;
}

#chat-input input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 20px;
  border: none;
  outline: none;
  font-size: 14px;
}

#chat-input button {
  background: #25d366;
  border: none;
  color: white;
  margin-left: 6px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: 0.2s;
}

#chat-input button:hover {
  transform: scale(1.1);
}

.name-prompt {
  position: fixed;
  bottom: 140px;
  right: 20px;
  width: 320px;
  display: none;
  z-index: 10001;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  align-items: center;
  gap: 8px;
}

.name-prompt input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.name-prompt button {
  background: #25d366;
  border: none;
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.name-prompt button#cancel-name {
  background: #ccc;
  color: #222;
  margin-left: 6px;
}

@media (max-width: 480px) {
  #chat-box {
    inset: 0;
    width: 100vw;
    height:100dvh;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}