/* Overlay */
.ai-ticket-helper-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Modal (Lagom style) */
.ai-ticket-helper-modal {
  background: #fff;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.1), 0 1.5px 6px rgba(0, 0, 0, 0.07);
  max-width: 700px;
  width: 95vw;
  min-height: 420px;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
}

.ai-ticket-helper-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, #2563eb 0%, #1e40af 100%);
  color: #fff;
  border-radius: 8px 8px 0 0;
  padding: 18px 28px 14px 24px;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 0 #e5e7eb;
}

.ai-ticket-helper-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #2563eb;
  font-weight: bold;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.08);
}

.ai-ticket-helper-chat {
  flex: 1 1 auto;
  padding: 24px 24px 0 24px;
  background: #f4f7fa;
  overflow-y: auto;
  max-height: 420px;
}

.ai-ticket-helper-bubble {
  background: #f9fafb;
  color: #222;
  border-radius: 7px;
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.06);
  border: 1px solid #e5e7eb;
  word-break: break-word;
}

.ai-ticket-helper-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 15px 0 22px 0;
}

.ai-ticket-helper-btn {
  padding: 10px 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.18s, box-shadow 0.18s;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.07);
}

.ai-ticket-helper-close {
  margin: 15px 18px 18px auto;
  padding: 6px 18px;
  background: #f4f7fa;
  color: #2563eb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.98rem;
  transition: background 0.18s, color 0.18s;
  display: block;
}
.ai-ticket-helper-close:hover {
  background: #2563eb;
  color: #fff;
}

/* Spinner */
.ai-spinner {
  width: 60px;
  text-align: center;
  margin: 32px auto 18px auto;
}
.ai-spinner > div {
  width: 12px;
  height: 12px;
  background-color: #2563eb;
  border-radius: 100%;
  display: inline-block;
  animation: ai-bouncedelay 1.4s infinite ease-in-out both;
}
.ai-spinner .ai-bounce1 {
  animation-delay: -0.32s;
}
.ai-spinner .ai-bounce2 {
  animation-delay: -0.16s;
}
@keyframes ai-bouncedelay {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Markdown/code formatting */
.ai-ticket-helper-bubble p {
  margin: 0 0 0.4em 0;
  padding: 0;
}
.ai-ticket-helper-bubble ul,
.ai-ticket-helper-bubble ol {
  margin: 0.3em 0 0.3em 1.2em;
  padding: 0;
}
.ai-ticket-helper-bubble li {
  margin: 0.1em 0;
  padding: 0;
}
.ai-ticket-helper-bubble code {
  background: #f1f1f1;
  color: #c7254e;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: "Fira Mono", "Consolas", "Menlo", monospace;
  font-size: 0.98em;
}
.ai-ticket-helper-bubble pre {
  background: #f1f1f1;
  color: #222;
  padding: 10px 12px;
  border-radius: 6px;
  font-family: "Fira Mono", "Consolas", "Menlo", monospace;
  font-size: 0.98em;
  overflow-x: auto;
}
.ai-ticket-helper-bubble strong {
  font-weight: bold;
}
.ai-ticket-helper-bubble em {
  font-style: italic;
}
