.vedos-chatbot-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.vedos-chatbot-launcher {
  border: 0;
  border-radius: 999px;
  width: 56px;
  height: 56px;
  padding: 0;
  background: #1d4ed8;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vedos-chatbot-launcher:hover,
.vedos-chatbot-launcher:focus {
  background: #1e40af;
}

.vedos-chatbot-launcher-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.vedos-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: min(360px, calc(100vw - 40px));
  height: min(520px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.vedos-chatbot-header {
  padding: 12px 14px 12px 16px;
  background: #111827;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vedos-chatbot-close {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  line-height: 1;
}

.vedos-chatbot-close:hover,
.vedos-chatbot-close:focus {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.vedos-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f9fafb;
}

.vedos-chatbot-message {
  margin-bottom: 12px;
}

.vedos-chatbot-message-user {
  text-align: right;
}

.vedos-chatbot-message-assistant {
  text-align: left;
}

.vedos-chatbot-bubble {
  display: inline-block;
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.vedos-chatbot-message-user .vedos-chatbot-bubble {
  white-space: pre-wrap;
}

.vedos-chatbot-message-user .vedos-chatbot-bubble {
  background: #1d4ed8;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble {
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-bottom-left-radius: 4px;
}

.vedos-chatbot-bubble a {
  color: #1d4ed8;
  text-decoration: underline;
}

.vedos-chatbot-bubble a:hover,
.vedos-chatbot-bubble a:focus {
  color: #1e40af;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble p {
  margin: 0 0 8px;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble p:last-child {
  margin-bottom: 0;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble ul,
.vedos-chatbot-message-assistant .vedos-chatbot-bubble ol {
  margin: 0 0 8px;
  padding-left: 20px;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble ul:last-child,
.vedos-chatbot-message-assistant .vedos-chatbot-bubble ol:last-child {
  margin-bottom: 0;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble li {
  margin-bottom: 2px;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble li > ul,
.vedos-chatbot-message-assistant .vedos-chatbot-bubble li > ol {
  margin-top: 2px;
  margin-bottom: 2px;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble code {
  background: rgba(15, 23, 42, 0.07);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 12px;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble pre {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0 0 8px;
  overflow-x: auto;
  line-height: 1.5;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble pre:last-child {
  margin-bottom: 0;
}

.vedos-chatbot-message-assistant .vedos-chatbot-bubble pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
  white-space: pre;
}

.vedos-chatbot-sources {
  max-width: min(88%, 340px);
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  font-size: 12px;
  line-height: 1.4;
}

.vedos-chatbot-sources-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: #1e3a5f;
  cursor: pointer;
  text-align: left;
  width: 100%;
  line-height: 1.4;
}

.vedos-chatbot-sources-toggle:hover,
.vedos-chatbot-sources-toggle:focus {
  color: #1d4ed8;
}

.vedos-chatbot-sources-list {
  list-style: none;
  margin: 5px 0 0;
  padding: 0;
}

.vedos-chatbot-sources-list li {
  margin-top: 3px;
}

.vedos-chatbot-sources-list a {
  color: #1d4ed8;
  text-decoration: none;
}

.vedos-chatbot-sources-list a:hover,
.vedos-chatbot-sources-list a:focus {
  text-decoration: underline;
}

.vedos-chatbot-media {
  max-width: min(88%, 340px);
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.vedos-chatbot-media-image-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid #bfdbfe;
  background: #f0f7ff;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #1e3a5f;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  word-break: break-word;
}

.vedos-chatbot-media-image-btn:hover,
.vedos-chatbot-media-image-btn:focus {
  background: #dbeafe;
  border-color: #93c5fd;
}

.vedos-chatbot-media-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  background: #1d4ed8;
  color: #ffffff;
  text-decoration: none;
  line-height: 1.4;
  word-break: break-word;
}

.vedos-chatbot-media-action-btn:hover,
.vedos-chatbot-media-action-btn:focus {
  background: #1e40af;
  color: #ffffff;
  text-decoration: none;
}

.vedos-chatbot-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.vedos-chatbot-modal {
  position: relative;
  max-width: min(92vw, 960px);
  max-height: 90vh;
}

.vedos-chatbot-modal-img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.vedos-chatbot-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.vedos-chatbot-modal-close:hover,
.vedos-chatbot-modal-close:focus {
  background: #f3f4f6;
}

.vedos-chatbot-escalation {
  max-width: 88%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid #fed7aa;
}

.vedos-chatbot-message-user .vedos-chatbot-escalation {
  margin-left: auto;
}

.vedos-chatbot-escalation-text {
  margin: 0 0 8px;
}

.vedos-chatbot-escalation-btn {
  display: inline-block;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  background: #9a3412;
  color: #ffffff;
  text-decoration: none;
  line-height: 1.4;
}

.vedos-chatbot-escalation-btn:hover,
.vedos-chatbot-escalation-btn:focus {
  background: #7c2d12;
  color: #ffffff;
  text-decoration: none;
}

.vedos-chatbot-form {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.vedos-chatbot-input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--wp--preset--color--accent-2);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.45;
  resize: none;
  overflow-y: auto;
}

.vedos-chatbot-input:focus {
  outline: 2px solid var(--wp--preset--color--accent-1);
}

.vedos-chatbot-send {
  border: 0;
  border-radius: 10px;
  padding: 9px 11px;
  background: #1d4ed8;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.vedos-chatbot-send:hover,
.vedos-chatbot-send:focus {
  background: #1e40af;
}

.vedos-chatbot-send:disabled,
.vedos-chatbot-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.vedos-chatbot-session-cap {
  padding: 10px 12px;
  background: #fff7ed;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 13px;
  color: #7c2d12;
  line-height: 1.4;
}

.vedos-chatbot-session-cap a {
  color: #9a3412;
  font-weight: 700;
  text-decoration: underline;
}

/* ─── Inline block container ──────────────────────────────────────────────── */

.vedos-chatbot-inline-root {
  display: flex;
  flex-direction: column;
  height: 560px;
  border: 2px solid var(--wp--preset--color--accent-1);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.vedos-chatbot-inline-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f9fafb;
}

.vedos-chatbot-inline-input-area {
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
}

/* ─────────────────────────────────────────────────────────────────────────── */

.vedos-chatbot-unavailable {
  padding: 16px 20px;
  color: #9ca3af;
  font-size: 14px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
  border: 1px dashed rgba(15, 23, 42, 0.15);
  border-radius: 12px;
}

.vedos-chatbot-disclaimer {
  margin: 0;
  padding: 6px 12px 8px;
  background: #ffffff;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  line-height: 1.35;
}

/* ─── Inline block color theme ────────────────────────────────────────────── */

.vedos-chatbot-inline-root .vedos-chatbot-bubble {
  border-radius: 12px;
}

.vedos-chatbot-inline-root .vedos-chatbot-message-user .vedos-chatbot-bubble {
  background: var(--wp--preset--color--accent-1);
}

.vedos-chatbot-inline-root .vedos-chatbot-bubble a {
  color: var(--wp--preset--color--accent-1);
}

.vedos-chatbot-inline-root .vedos-chatbot-bubble a:hover,
.vedos-chatbot-inline-root .vedos-chatbot-bubble a:focus {
  color: var(--wp--preset--color--accent-1);
}

.vedos-chatbot-inline-root .vedos-chatbot-sources-toggle:hover,
.vedos-chatbot-inline-root .vedos-chatbot-sources-toggle:focus {
  color: var(--wp--preset--color--accent-1);
}

.vedos-chatbot-inline-root .vedos-chatbot-sources-list a {
  color: var(--wp--preset--color--accent-1);
}

.vedos-chatbot-inline-root .vedos-chatbot-media-action-btn {
  background: var(--wp--preset--color--accent-1);
}

.vedos-chatbot-inline-root .vedos-chatbot-media-action-btn:hover,
.vedos-chatbot-inline-root .vedos-chatbot-media-action-btn:focus {
  background: var(--wp--preset--color--accent-1);
  opacity: 0.85;
}


.vedos-chatbot-inline-root .vedos-chatbot-send {
  background: var(--wp--preset--color--accent-1);
}

.vedos-chatbot-inline-root .vedos-chatbot-send:hover,
.vedos-chatbot-inline-root .vedos-chatbot-send:focus {
  background: var(--wp--preset--color--accent-1);
  opacity: 0.85;
}