/* Responsive Button Visibility */
.dentum-chat-message .btn.desktop {
  display: inline-flex !important;
}
.dentum-chat-message .btn.tablet {
  display: none !important;
}

@media (max-width: 768px) {
  .dentum-chat-message .btn.desktop {
    display: none !important;
  }
  .dentum-chat-message .btn.tablet {
    display: inline-flex !important;
  }
} /* Scoped styles for Dentum AI Chat Widget */
/* Base container - high z-index to sit on top */
#dentum-ai-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 98;
font-family: "Onest", sans-serif;
  line-height: normal;
  font-weight: 400;
  box-sizing: border-box;
}
#dentum-ai-widget .btn {
  text-align: center;
}
#dentum-ai-widget.dentum-ai-widget--toggle-hidden .dentum-ai-widget__toggle {
  display: none;
}

#dentum-ai-widget * {
  box-sizing: border-box;
}

.dentimus__open,
.dentimus__mobile,
.dentimus .dentimus__open,
.dentimus .dentimus__mobile {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Toggle Button */
.dentum-ai-widget__toggle {
  width: 60px;
  height: 60px;
  background-color: #0b9da6; /* Teal */
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(11, 157, 166, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
}

.dentum-ai-widget__toggle:hover {
  transform: scale(1.05);
  background-color: #09858d;
}

.dentum-ai-widget__toggle-icon {
  width: 30px;
  height: 30px;
  fill: white;
}

/* Chat Window */
.dentum-ai-widget__window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 600px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  border: 1px solid #e5e5e5;
  max-height: calc(100dvh - 200px);
}

.dentum-ai-widget__window.operator-mode {
  height: 510px;
}

.dentum-ai-widget__window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Header */
.dentum-ai-widget__header {
  background-color: #0b9da6; /* Teal */
  color: white;
  padding: 20px;
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 3;
}

.dentum-ai-widget__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dentum-ai-widget__switch {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.dentum-ai-widget__switch.visible {
  opacity: 1;
  visibility: visible;
}

.dentum-ai-widget__switch-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.dentum-ai-widget__switch-toggle {
  position: relative;
  width: 36px;
  height: 18px;
  display: inline-block;
}

.dentum-ai-widget__switch-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.dentum-ai-widget__switch-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  transition: background 0.2s;
  cursor: pointer;
}

.dentum-ai-widget__switch-slider:before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.dentum-ai-widget__switch-input:checked + .dentum-ai-widget__switch-slider {
  background: rgba(255, 255, 255, 0.65);
}

.dentum-ai-widget__switch-input:checked
  + .dentum-ai-widget__switch-slider:before {
  transform: translateX(18px);
}

.dentum-ai-widget__title {
  font-weight: 600;
  font-size: 16px;
  margin: 0;
}

.dentum-ai-widget__close {
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  opacity: 0.8;
  transition:
    opacity 0.2s,
    color 0.2s;
}

.dentum-ai-widget__close:hover {
  opacity: 1;
  color: #ffdcb0; /* Light orange tint on hover */
}

/* Chat Container */
.dentum-chat-views {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dentum-chat-view {
  flex: 1;
  display: none;
  min-height: 0;
}

.dentum-chat-view.active {
  display: flex;
  flex-direction: column;
}

.dentum-operator-container {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.dentum-operator-container .dentimus__chat {
  position: absolute !important;
  inset: auto !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  display: block !important;
}

.dentum-chat-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.status::before {
  display: none!important;
}

/* Chat Body (Messages) */
.dentum-chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: #f9f9f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.dentum-chat-body::-webkit-scrollbar {
width: 7px;
}
.dentum-chat-body::-webkit-scrollbar-thumb {
background: #0b9da6;
}
.dentum-chat-body::-webkit-scrollbar-track {
background: #e7f7f5;
}
/* Messages */
.dentum-chat-message {
  max-width: 85%;
  margin-bottom: 5px;
  clear: both;
}

.dentum-chat-message.user {
  align-self: flex-end;
}

.dentum-chat-message.bot {
  align-self: flex-start;
}

.dentum-chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px;
letter-spacing: -0.28px;
  position: relative;
  word-wrap: break-word;
}

.dentum-chat-message.user .dentum-chat-bubble {
  background-color: #0b9da6; /* Teal */
  color: white;
  border-bottom-right-radius: 2px;
}

.dentum-chat-message.bot .dentum-chat-bubble {
  background-color: #fff;
  color: #333;
  border: 1px solid #e5e5e5;
  border-bottom-left-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Input Area */
.dentum-chat-input {
  padding: 20px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dentum-chat-input input {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid #eee;
  border-radius: 0;
  outline: none;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px;
letter-spacing: -0.28px;
  background: transparent;
  transition: border-color 0.2s;
  color: #333;
}

.dentum-chat-input input::placeholder {
  color: #999;
}

.dentum-chat-input input:focus {
  border-bottom-color: #0b9da6; /* Teal */
}

/* Action Button */
.dentum-chat-action-btn {
  display: inline-block;
  background-color: #ff6b35; /* Orange */
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
  margin-top: 5px;
  margin-left: 2px;
  text-align: center;
  border: none;
  cursor: pointer;
}

.dentum-chat-action-btn:hover {
  background-color: #e55a2b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
  color: white;
}

.action-btn-container {
  margin-bottom: 15px;
  width: 100%;
}

.dentum-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f5f5;
  border: none;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
}

.dentum-chat-send svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: stroke 0.2s;
}

.dentum-chat-send:hover {
  background-color: #0b9da6; /* Teal */
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(11, 157, 166, 0.2);
}

.dentum-chat-send:disabled {
  background: #f5f5f5;
  color: #d1d1d1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .dentum-ai-widget__window {
    position: fixed;
    left: 20px;
    right: 20px;
    width: auto;
    bottom: 90px;
    height: 70vh;
    max-height: 600px;
  }
}

.dentum-chat-message-link {
  color: #0b9da6;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px;
letter-spacing: -0.28px;
display: inline-block;
transition: 0.4s;
text-underline-offset: 4px;
text-decoration: underline;
}
.dentum-chat-message-link:hover {
opacity: 0.5;
}

/* Operator Status */
.dentum-chat-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dentum-chat-operator-status {
  font-size: 10px;
  font-weight: 500;
  display: none;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.dentum-chat-operator-status.online {
  display: inline-block;
  color: #fff;
  background-color: #22c55e;
}

.dentum-chat-operator-status.offline {
  display: inline-block;
  color: #fff;
  background-color: #ef4444;
}
