/* ChatGPT Clone Custom Stylesheet for 'empfohlen von ki' */

:root {
  --gpt-bg: #212121;
  --gpt-sidebar: #171717;
  --gpt-input: #2f2f2f;
  --gpt-border: #424242;
  --gpt-subtle: #303030;
  --gpt-accent: #10a37f;
  --gpt-text: #ececec;
  --gpt-muted: #b4b4b4;
  --gpt-dim: #8e8e8e;
}

/* Custom Scrollbar to match ChatGPT */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Base font adjustments & Mobile Viewport Locking */
html, body {
  height: 100%;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background-color: #080c0e;
  background-image: 
    radial-gradient(480px 400px at 96% 4%, rgba(16, 163, 127, 0.18) 0%, rgba(16, 163, 127, 0.03) 50%, transparent 80%), 
    radial-gradient(480px 400px at 4% 96%, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.03) 50%, transparent 80%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--gpt-text);
}

#chatContainer {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Message Appearance Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Subtle glow animations */
@keyframes subtleGlow {
  0%, 100% {
    box-shadow: 0 0 25px -5px rgba(16, 163, 127, 0.35);
  }
  50% {
    box-shadow: 0 0 35px 2px rgba(16, 163, 127, 0.55);
  }
}

.animate-subtle-glow {
  animation: subtleGlow 4s infinite ease-in-out;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spinSlow 8s linear infinite;
}

/* Typewriter blinking cursor */
.typing-cursor::after {
  content: '▋';
  display: inline-block;
  vertical-align: baseline;
  color: #10a37f;
  margin-left: 2px;
  animation: blink 0.9s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Message styling matching ChatGPT */
.user-msg-bubble {
  background-color: #2f2f2f;
  color: #ececec;
  border-radius: 1.5rem;
  padding: 0.75rem 1.25rem;
  max-width: 85%;
  align-self: flex-end;
  line-height: 1.6;
  font-size: 0.96rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  word-break: break-word;
}

@media (min-width: 768px) {
  .user-msg-bubble {
    max-width: 75%;
  }
}

.ai-msg-container {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ai-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #10a37f 0%, #0d8466 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16, 163, 127, 0.25);
}

.ai-content {
  flex: 1;
  color: #ececec;
  font-size: 0.98rem;
  line-height: 1.7;
  word-break: break-word;
}

/* Marketing Headline in AI Messages */
.ai-headline {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-content p {
  margin-bottom: 0.85rem;
}

.ai-content p:last-child {
  margin-bottom: 0;
}

.ai-content strong {
  color: #ffffff;
  font-weight: 600;
}

/* --- CHATGPT AD PREVIEW CARD (MATCHING USER SCREENSHOT) --- */
.ad-preview-wrapper {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  padding: 1.25rem;
  margin: 1rem 0;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-out;
}

.ad-card-inner {
  background: #ffffff;
  color: #111827;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

@media (min-width: 640px) {
  .ad-card-inner {
    flex-direction: row;
  }
}

.ad-card-image-box {
  width: 100%;
  height: 140px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .ad-card-image-box {
    width: 170px;
    height: auto;
    min-height: 130px;
  }
}

.ad-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ad-card-content {
  padding: 1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ad-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.ad-card-brand {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: -0.01em;
}

.ad-card-badge {
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid #e5e7eb;
}

.ad-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.ad-card-desc {
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.45;
}

.ad-card-footer {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #10a37f;
  font-weight: 600;
}

/* Large CTA action buttons replacing chatbar */
.action-pill-btn {
  background: linear-gradient(135deg, #10a37f 0%, #0d9472 100%);
  color: #ffffff;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 163, 127, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 1rem;
  width: auto;
}

.action-pill-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px rgba(16, 163, 127, 0.55);
  background: linear-gradient(135deg, #14b890 0%, #10a37f 100%);
}

.action-pill-btn:active {
  transform: translateY(1px) scale(0.98);
}

.secondary-chip-btn {
  background-color: #2f2f2f;
  color: #ececec;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.7rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.92rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.secondary-chip-btn:hover {
  background-color: #3a3a3a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.secondary-chip-btn:active {
  transform: translateY(1px);
}

/* Tool execution / Thinking card */
.thought-card {
  background-color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
  font-size: 0.85rem;
}

/* Action icons under assistant messages */
.msg-action-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  color: var(--gpt-dim);
}

.msg-action-btn {
  padding: 0.35rem;
  border-radius: 0.375rem;
  transition: all 0.15s;
  cursor: pointer;
}

.msg-action-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
}

/* Lead summary card */
.lead-summary-card {
  background: linear-gradient(145deg, #1e2925 0%, #171f1c 100%);
  border: 1px solid rgba(16, 163, 127, 0.35);
  border-radius: 1.25rem;
  padding: 1.35rem;
  margin-top: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}
