/* z_widget.css - Instagram Messenger Style */

/* Circle widget styles */
#chatCircle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  background-color: #c1d7ec; /* Instagram blue */
  background-image: url('https://storage.googleapis.com/zemits_management/library/web_chat_1.png');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 9999;
}

#chatCircle:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

/* Chat widget container (hidden by default) */
#chatWidget {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 30px;
  max-width: 390px;
  min-width: 350px;
  max-height: 700px;
  min-height: 500px;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 9999;
}

@media (max-width: 768px) {
  #chatWidget {
    right: auto;
    left: 5px;
    bottom: 7px;
    width: 96vw;         /* 90% of viewport width */
    max-width: 96vw;
    max-height: 90vh;
    min-width: unset;
    box-sizing: border-box;
  }

  #chatCircle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 70px;
    height: 70px;
    background-color: #c1d7ec; /* Instagram blue */
    background-image: url('https://storage.googleapis.com/zemits_management/library/web_chat_1.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
  }
}
/* Header with Instagram gradient style */
#chatWidget .chat-header {
  background: linear-gradient(
    135deg,
    #e6e6e6 0%,
    #cfcfcf 20%,
    #f7f7f7 40%,
    #b8b8b8 60%,
    #e2e2e2 80%,
    #c7c7c7 100%
  );
  color: #000000;
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  position: relative;
}

/* Close button in header */
#chatWidget .close-chat {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
}

/* Chat body */
#chatWidget .chat-body {
  flex: 1;
  padding: 12px;
  background-color: #fafafa;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Chat message bubbles */
.message {
  max-width: 73%;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.4;
}

/* Sent messages (from user) */
.message.sent {
  align-self: flex-end;
  background-color: #dcf8c6;
}

/* Received messages (from assistant) */
.message.received {
  align-self: flex-start;
  background-color: #fff;
  border: 1px solid #e5e5e5;
}

/* Chat footer */
#chatWidget .chat-footer {
  padding: 10px;
  background-color: #fff;
  border-top: 1px solid #ddd;
  display: flex;
}

#chatWidget .chat-footer .chat-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
  font-size: 16px;

}

#chatWidget .chat-footer .send-button {
  margin-left: 8px;
  background-color: #3897f0;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

#chatWidget .chat-footer .send-button:hover {
  background-color: #2a78d2;
}





.no-scroll {
  overflow: hidden;
  height: 100%;
}



.chat-circle.blink {
  position: relative; /* Ensure pseudo-element positions relative to the circle */
}

.chat-circle.blink::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border: 2px solid #ccc;           /* Base border color */
  border-top: 5px solid #2a78d2;        /* Blue color on top */
  border-radius: 50%;
  animation: spin 1s linear 4;      /* Spin 3 times */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


