:root {
  --chat-widget-position-bottom: 30px;
  --chat-widget-position-right: 10px;
}
/* Container */
.askmimak-container {
  margin: 0 auto;
  background: #fff;
  border: 1px solid #0b5c60;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 32px 24px 24px;
  font-family: "Segoe UI", Arial, sans-serif;
  width: 90%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  height: 85vh;
  overflow: hidden;
}

/* Header */
.askmimak-header {
  text-align: center;
  margin-bottom: 24px;
}
.askmimak-header h1 {
  font-size: 2.2rem;
  color: #2a7be4;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.askmimak-header p {
  color: #555;
  font-size: 1.1rem;
}

/* Chatbox */
.askmimak-chatbox {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Input area */
.askmimak-input-area {
  display: flex;
  gap: 10px;
}
.askmimak-input-area input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.askmimak-input-area input[type="text"]:focus {
  border-color: #2a7be4;
}
.askmimak-input-area button {
  color: #fff;
  background: var(--dark-mimak);
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.askmimak-input-area button:hover {
  color: var(--contrast-color);
  background: color-mix(
    in srgb,
    var(--bs-btn-hover-border-color),
    transparent 15%
  );
}

/* Messages */
.message-container {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 95%;
  word-break: break-word;
}

.message-container a:not(.option-button) {
  color: #fff !important;
}

.message-container.user {
  align-self: flex-end;
}
.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.5;
  position: relative;
  display: inline-block;
}
.message.bot {
  align-self: flex-start;
  background-color: var(--dark-mimak);
  color: #fff;
  border-top-left-radius: 0;
}
.message.user {
  align-self: flex-end;
  background-color: var(--purple-mimak);
  color: #fff;
  border-top-right-radius: 0;
}

/* Avatars */
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #e4f0f0;
  margin-right: 8px;
}

.message-container.bot .chat-avatar {
  background-image: url(../../assets/img/mimak-ai.png);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.message.user .chat-avatar {
  order: 2;
  margin-left: 8px;
  margin-right: 0;
}

.message.bot a {
  color: #000;
  text-decoration: underline;
}
/* Option buttons */
a.option-button {
  text-decoration: none;
}

.option-button {
  margin: 5px 5px 0 0;
  padding: 5px;
  border: none;
  background-color: #ffffff;
  color: #000000;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.option-button:hover {
  background-color: #8d8d8d;
  color: #fff;
}

/* Typing indicator (dot animation style) */
.typing-indicator {
  background-color: var(--dark-mimak);
  color: #fff;
  border-radius: 16px;
  padding: 10px 16px;
  font-size: 0.9rem;
  display: flex;
  gap: 4px;
  width: fit-content;
  align-items: center;
}
.typing-dot {
  width: 6px;
  height: 6px;
  background-color: #fff;
  border-radius: 50%;
  animation: blink 1.4s infinite;
}
.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.2;
  }
  40% {
    opacity: 1;
  }
}

.askmimak-chatbox {
  flex: 1 1 auto;
  height: 320px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #eee;
}

.askmimak-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 0 0 8px 8px;
  border-top: 1px solid #eee;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.askmimak-input-area input[type="text"] {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
}

.askmimak-input-area button[type="submit"] {
  border-radius: 4px;
  padding: 8px 16px;
}

#ask-mimak {
  display: none;
  position: fixed;
  bottom: calc(125px - var(--chat-widget-position-bottom));
  right: 20px;
  z-index: 1100;
  width: 350px;
  max-width: 95vw;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: all 0.3s;
}

#ask-mimak.open {
  display: flex;
  flex-direction: column;

  min-height: 320px;
  max-height: 80vh;
  padding: 0;
  animation: fadeInUp 0.3s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.askmimak-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.askmimak-close {
  cursor: pointer;
  font-size: 1.5rem;
  color: #888;
  margin-left: 10px;
  border: none;
  background: none;
}

#chat-widget {
  position: fixed;
  bottom: var(--chat-widget-position-bottom);
  right: var(--chat-widget-position-right);
  z-index: 1000;
  cursor: pointer;
}

#chat-widget img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  background: var(--dark-mimak);
}
