/* Dodo AI Support — floating chat widget */
.dodo-ai-fab {
  position: fixed;
  right: 22px;
  bottom: 82px;
  z-index: 1000002;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px 0 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(145deg, #4f46e5, #3730a3);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dodo-ai-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.5);
}

.dodo-ai-fab__icon {
  font-size: 1.1rem;
}

.dodo-ai-panel {
  position: fixed;
  right: 22px;
  bottom: 140px;
  z-index: 1000003;
  width: min(380px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 160px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  border: 1px solid #e8ebf0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.dodo-ai-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* AI panel açıkken Tawk balonunun üstte kalmasını engelle */
body.dodo-ai-panel-open #tawkchat-container,
body.dodo-ai-panel-open .tawk-min-container {
  z-index: 999990 !important;
}

.dodo-ai-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #fff;
}

.dodo-ai-panel__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.dodo-ai-panel__sub {
  margin: 2px 0 0;
  font-size: 0.72rem;
  opacity: 0.9;
}

.dodo-ai-panel__close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.dodo-ai-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  max-height: 320px;
  background: #f8fafc;
}

.dodo-ai-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.5;
  word-break: break-word;
}

.dodo-ai-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.dodo-ai-msg--user {
  align-self: flex-end;
  background: #4f46e5;
  color: #fff;
}

.dodo-ai-msg a {
  color: #4f46e5;
  text-decoration: underline;
}

.dodo-ai-msg--user a {
  color: #e0e7ff;
}

.dodo-ai-msg--typing {
  opacity: 0.7;
  font-style: italic;
}

.dodo-ai-msg--fallback {
  border-left: 3px solid #a5b4fc;
}

.dodo-ai-panel__foot {
  padding: 12px 14px 14px;
  border-top: 1px solid #eef1f5;
  background: #fff;
}

.dodo-ai-panel__captcha {
  margin-bottom: 10px;
  min-height: 0;
}

.dodo-ai-panel__captcha:not(.is-visible) {
  display: none;
}

.dodo-ai-panel__input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.dodo-ai-panel__input {
  flex: 1;
  min-height: 42px;
  max-height: 100px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.84rem;
  resize: none;
  font-family: inherit;
}

.dodo-ai-panel__send {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: #4f46e5;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.dodo-ai-panel__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dodo-ai-panel__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.dodo-ai-panel__link {
  font-size: 0.72rem;
  color: #64748b;
  text-decoration: none;
}

.dodo-ai-panel__link:hover {
  color: #4f46e5;
}

@media (max-width: 480px) {
  .dodo-ai-fab {
    bottom: 76px;
    right: 16px;
    padding: 0 14px;
  }

  .dodo-ai-panel {
    right: 16px;
    bottom: 130px;
    width: calc(100vw - 32px);
  }
}
