/* IMARK ChatBot — floating widget */
#imark-chatbot.imark-chatbot,
.imark-chatbot {
  --imark-blue: #1c5d94;
  --imark-blue-deep: #154a78;
  --imark-gold: #fbbc34;
  --imark-ink: #1c2a3a;
  --imark-muted: #6b7785;
  --imark-line: #e6ebf0;
  position: fixed !important;
  right: 22px !important;
  bottom: 22px !important;
  z-index: 999999 !important;
  font-family: Lato, Poppins, system-ui, sans-serif;
  width: auto !important;
  height: auto !important;
  pointer-events: none;
}

.imark-chatbot > * {
  pointer-events: auto;
}

#imark-chatbot .imark-chatbot-fab,
.imark-chatbot-fab {
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  -webkit-border-radius: 50% !important;
  background: linear-gradient(145deg, #2a7bb8 0%, #1c5d94 55%, #154a78 100%) !important;
  color: #fff !important;
  box-shadow:
    0 10px 24px rgba(28, 93, 148, 0.38),
    0 0 0 4px rgba(251, 188, 52, 0.22) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  line-height: 1 !important;
  overflow: visible !important;
}

#imark-chatbot .imark-chatbot-fab:hover,
.imark-chatbot-fab:hover {
  transform: translateY(-3px) scale(1.04) !important;
  box-shadow:
    0 14px 30px rgba(28, 93, 148, 0.45),
    0 0 0 5px rgba(251, 188, 52, 0.3) !important;
  color: #fff !important;
  background: linear-gradient(145deg, #3390d0 0%, #1c5d94 55%, #154a78 100%) !important;
}

#imark-chatbot .imark-chatbot-fab:focus,
.imark-chatbot-fab:focus {
  outline: none !important;
  box-shadow:
    0 10px 24px rgba(28, 93, 148, 0.38),
    0 0 0 4px rgba(251, 188, 52, 0.45) !important;
}

.imark-chatbot-fab-icon,
.imark-chatbot-fab-close {
  display: flex !important;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.imark-chatbot-fab-icon svg,
.imark-chatbot-fab-close svg {
  display: block;
  width: 28px;
  height: 28px;
}

.imark-chatbot-fab-close {
  display: none !important;
}

.imark-chatbot.is-open .imark-chatbot-fab-icon {
  display: none !important;
}

.imark-chatbot.is-open .imark-chatbot-fab-close {
  display: flex !important;
}

#imark-chatbot .imark-chatbot-panel,
.imark-chatbot-panel {
  position: absolute !important;
  right: 0 !important;
  bottom: 80px !important;
  width: min(380px, calc(100vw - 28px)) !important;
  height: min(560px, calc(100vh - 120px)) !important;
  background: #fff !important;
  border-radius: 20px !important;
  box-shadow: 0 22px 50px rgba(16, 24, 40, 0.24) !important;
  display: none;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid var(--imark-line) !important;
  animation: imarkChatIn 0.22s ease;
  z-index: 2;
}

#imark-chatbot.is-open .imark-chatbot-panel,
.imark-chatbot.is-open .imark-chatbot-panel {
  display: flex !important;
}

.imark-chatbot-panel[hidden] {
  display: none !important;
}

.imark-chatbot.is-open .imark-chatbot-panel[hidden] {
  display: flex !important;
}

@keyframes imarkChatIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.imark-chatbot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, var(--imark-blue), var(--imark-blue-deep));
  color: #fff;
}

.imark-chatbot-head strong {
  display: block;
  font-family: Poppins, Lato, sans-serif;
  font-size: 15px;
  margin-bottom: 2px;
  color: #fff;
}

.imark-chatbot-head span {
  display: block;
  font-size: 12px;
  opacity: 0.85;
  color: #fff;
}

.imark-chatbot-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.imark-chatbot-whatsapp {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #25d366 !important;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, background 0.15s ease;
}

.imark-chatbot-whatsapp:hover {
  background: #1ebe57 !important;
  color: #fff !important;
  transform: scale(1.06);
}

.imark-chatbot-whatsapp svg {
  display: block;
}

.imark-chatbot-reset {
  border: 0 !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  cursor: pointer;
  font-size: 16px;
  padding: 0 !important;
}

.imark-chatbot-reset:hover {
  background: rgba(255, 255, 255, 0.28) !important;
}

.imark-chatbot-minimize {
  border: 0 !important;
  background: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  cursor: pointer;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.imark-chatbot-minimize:hover {
  background: rgba(255, 255, 255, 0.28) !important;
}

.imark-chatbot-minimize svg {
  display: block;
}

.imark-chatbot-messages {
  flex: 1;
  overflow: auto;
  padding: 14px;
  background: #f5f8fb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.imark-chat-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.imark-chat-bubble.is-bot {
  align-self: flex-start;
  background: #fff;
  color: var(--imark-ink);
  border: 1px solid var(--imark-line);
  border-bottom-left-radius: 4px;
}

.imark-chat-bubble.is-user {
  align-self: flex-end;
  background: var(--imark-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.imark-chat-bubble.is-typing {
  color: var(--imark-muted);
  font-style: italic;
}

.imark-chatbot-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--imark-line);
  background: #fff;
}

.imark-chatbot-form input {
  flex: 1;
  border: 1px solid #d7dee7 !important;
  border-radius: 999px !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  outline: none !important;
  box-shadow: none !important;
  background: #fff !important;
  color: var(--imark-ink) !important;
}

.imark-chatbot-form input:focus {
  border-color: var(--imark-blue) !important;
  box-shadow: 0 0 0 3px rgba(28, 93, 148, 0.15) !important;
}

.imark-chatbot-send {
  width: 42px !important;
  height: 42px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--imark-gold) !important;
  color: var(--imark-ink) !important;
  cursor: pointer;
  display: grid !important;
  place-items: center;
  flex-shrink: 0;
  padding: 0 !important;
}

.imark-chatbot-send:disabled {
  opacity: 0.55;
  cursor: wait;
}

.imark-chatbot-foot {
  margin: 0;
  padding: 0 12px 10px;
  font-size: 11px;
  color: var(--imark-muted);
  text-align: center;
  background: #fff;
}

.imark-chatbot .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

@media (max-width: 480px) {
  .imark-chatbot {
    right: 14px !important;
    bottom: 14px !important;
  }

  .imark-chatbot-panel {
    bottom: 74px !important;
    height: min(70vh, 560px) !important;
  }
}
