/* ============================================
   CHATBOT – Morphing Chat Component
   Hero Input ↔ Floating Chat Bubble
   (visually upgraded, brand-consistent)
   ============================================ */

/* ---- HERO CHAT ---- */
.hero-chat {
  width: 100%;
  max-width: 680px;
  margin: 0 auto var(--sp-4);
  pointer-events: auto;
  position: relative;
  z-index: 5;
}

.hero-chat--hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out);
}

/* Input Wrapper */
.hero-chat__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-5);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02)),
    rgba(18,18,18,0.55);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(184,126,95,0.18);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 10px 40px rgba(0,0,0,0.35);
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}

.hero-chat__input-wrap:focus-within {
  border-color: rgba(184, 126, 95, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(184, 126, 95, 0.2),
    0 0 30px rgba(184, 126, 95, 0.12),
    0 0 80px rgba(184, 126, 95, 0.06);
}

/* Sparkle Icon */
.hero-chat__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #D4976F;
  opacity: 0.85;
  filter: drop-shadow(0 0 6px rgba(212,151,111,0.35));
  animation: icon-sparkle 4s ease-in-out infinite;
}

@keyframes icon-sparkle {
  0%, 100% { opacity: 0.75; transform: scale(1) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.08) rotate(6deg); }
}

/* Input Field */
.hero-chat__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--c-text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  padding: var(--sp-1) 0;
  min-height: 48px;
  font-size: max(16px, var(--fs-base)); /* verhindert iOS-Zoom beim Focus */
}

.hero-chat__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Send Button */
.hero-chat__send {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(135deg, #B87E5F 0%, #D4976F 55%, #E1A77F 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 4px 14px rgba(184,126,95,0.35);
  transition: transform var(--dur-fast) var(--ease-spring),
              box-shadow var(--dur-base) var(--ease-out),
              filter var(--dur-base) var(--ease-out);
  pointer-events: auto;
}

.hero-chat__send:hover {
  transform: scale(1.08) translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 0 22px rgba(184, 126, 95, 0.5),
    0 0 45px rgba(212, 151, 111, 0.25);
}

.hero-chat__send:active {
  transform: scale(0.95);
}

.hero-chat__send svg {
  width: 18px;
  height: 18px;
  display: block;
  transform: translate(-1px, 1px); /* Paper-Plane optisch zentrieren */
}

/* ---- SUGGESTION CHIPS ---- */
.hero-chat__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.hero-chat__chip {
  position: relative;
  overflow: hidden;
  padding: var(--sp-2) var(--sp-4);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: var(--c-text-body);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  cursor: pointer;
  transition: border-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out);
  pointer-events: auto;
}

.hero-chat__chip:hover {
  border-color: rgba(184, 126, 95, 0.35);
  color: var(--c-text-primary);
  background: rgba(184, 126, 95, 0.08);
}

/* Shimmer effect on hover */
.hero-chat__chip::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(184, 126, 95, 0.12), transparent);
  transition: left 400ms var(--ease-out);
  pointer-events: none;
}

.hero-chat__chip:hover::after {
  left: 100%;
}

/* ---- HERO CHAT MESSAGES ---- */
.hero-chat__messages {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms var(--ease-out),
              margin-bottom 400ms var(--ease-out),
              opacity 400ms var(--ease-out);
  opacity: 0;
  margin-bottom: 0;
  pointer-events: auto;
}

.hero-chat__messages--visible {
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-bottom: var(--sp-3);
  opacity: 1;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(184, 126, 95, 0.12);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}

/* Scrollbar */
.hero-chat__messages::-webkit-scrollbar,
.chatbot-panel__body::-webkit-scrollbar {
  width: 4px;
}

.hero-chat__messages::-webkit-scrollbar-track,
.chatbot-panel__body::-webkit-scrollbar-track {
  background: transparent;
}

.hero-chat__messages::-webkit-scrollbar-thumb,
.chatbot-panel__body::-webkit-scrollbar-thumb {
  background: rgba(184, 126, 95, 0.3);
  border-radius: var(--radius-full);
}

.hero-chat__messages::-webkit-scrollbar-thumb:hover,
.chatbot-panel__body::-webkit-scrollbar-thumb:hover {
  background: rgba(184, 126, 95, 0.55);
}

/* ---- SHARED MESSAGE STYLES ---- */
.chat-msg {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  animation: msg-in 220ms var(--ease-out) both;
}

.chat-msg:last-child {
  margin-bottom: 0;
}

.chat-msg--user {
  flex-direction: row-reverse;
}

.chat-msg__avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background:
    radial-gradient(circle at 30% 30%, rgba(212,151,111,0.35), rgba(184,126,95,0.12) 70%);
  border: 1px solid rgba(184,126,95,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E1A77F;
  margin-top: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 10px rgba(184,126,95,0.15);
}

.chat-msg__avatar svg {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 0 3px rgba(212,151,111,0.4));
}

/* Bot avatar — elegant "P" in Fraunces serif */
.chat-msg__avatar--bot {
  background:
    linear-gradient(180deg, rgba(232,201,168,0.16), rgba(184,126,95,0.10));
  border: 1px solid rgba(212,151,111,0.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 2px 8px rgba(0,0,0,0.25);
}
.chat-msg__avatar-letter {
  font-family: 'Fraunces', 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  line-height: 1;
  color: #E8C9A8;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  transform: translateY(0.5px);
  display: inline-block;
}

/* User avatar — minimal mountain range */
.chat-msg__avatar--user {
  background: rgba(20,16,13,0.55);
  border: 1px solid rgba(212,151,111,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.chat-msg__avatar-mountain {
  width: 16px;
  height: 16px;
  color: rgba(232,201,168,0.85);
  filter: drop-shadow(0 0 3px rgba(212,151,111,0.3));
}

/* ---- NEUE MARKEN-ICONS IN AVATAREN ---- */
.chat-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
/* Bot: P-Monogramm-Tile bringt eigenen dunklen Grund mit → Container-Gradient
   entfernen, nur dezenten Ring behalten. */
.chat-msg__avatar--bot,
.chatbot-panel__avatar--letter,
.chatbot-panel__welcome-icon {
  background: none !important;
  box-shadow: none !important;
}
.chat-msg__avatar--bot { border-color: rgba(184,126,95,0.28); }
/* User: Gipfel ist transparent (schwarz+kupfer) → heller warmer Grund,
   damit beide Bergflanken lesbar sind. */
.chat-msg__avatar--user {
  background: radial-gradient(circle at 50% 38%, #F6ECDF, #E7D2BC) !important;
  border: 1px solid rgba(184,126,95,0.45) !important;
}
.chat-avatar-img--user {
  object-fit: contain;
  padding: 15%;
}

/* User row: avatar on the right, bubble flows left */
.chat-msg--user .chat-msg__avatar {
  display: inline-flex;
}

.chat-msg__bubble {
  max-width: 80%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  word-break: break-word;
}

.chat-msg--bot .chat-msg__bubble {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255, 255, 255, 0.92);
  border-bottom-left-radius: 4px;
  text-align: left;
}

.chat-msg--user .chat-msg__bubble {
  background: linear-gradient(135deg, rgba(184,126,95,0.22), rgba(212,151,111,0.14));
  border: 1px solid rgba(184,126,95,0.28);
  color: rgba(255, 255, 255, 0.98);
  border-bottom-right-radius: 4px;
}

/* Markdown in messages */
.chat-msg__bubble strong {
  font-weight: var(--fw-semibold);
  color: var(--c-text-primary);
}

.chat-msg__bubble em {
  font-style: italic;
  opacity: 0.9;
}

.chat-msg__bubble a {
  color: #D4976F;
  text-decoration: underline;
  text-decoration-color: rgba(184, 126, 95, 0.35);
  transition: text-decoration-color var(--dur-fast) var(--ease-out);
  pointer-events: auto;
}

.chat-msg__bubble a:hover {
  text-decoration-color: #D4976F;
}

/* ---- TYPING INDICATOR ---- */
.chat-typing {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  animation: msg-in 220ms var(--ease-out) both;
}

.chat-typing__dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: var(--sp-3) var(--sp-4);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
}

.chat-typing__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #B87E5F, #D4976F);
  box-shadow: 0 0 6px rgba(212,151,111,0.45);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.chat-typing__dot:nth-child(2) { animation-delay: 0.18s; }
.chat-typing__dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   FLOATING CHATBOT (FAB + PANEL)
   ============================================ */

.chatbot-float {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  right: max(24px, env(safe-area-inset-right, 0px));
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--ease-out);
}

.chatbot-float--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---- FAB ---- */
.chatbot-fab {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #B87E5F 0%, #D4976F 55%, #E1A77F 100%);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -2px 6px rgba(0,0,0,0.25),
    0 6px 22px rgba(184, 126, 95, 0.38),
    0 12px 44px rgba(184, 126, 95, 0.18);
  transition: transform var(--dur-fast) var(--ease-spring),
              box-shadow var(--dur-base) var(--ease-out),
              filter var(--dur-base) var(--ease-out);
  animation: fab-breathe 3.2s ease-in-out infinite;
  overflow: visible;
}

/* Outer glow halo (decorative) */
.chatbot-fab::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,126,95,0.25), transparent 65%);
  filter: blur(6px);
  opacity: 0.7;
  z-index: -1;
  pointer-events: none;
}

.chatbot-fab:hover {
  transform: scale(1.08) translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 8px 28px rgba(184, 126, 95, 0.5),
    0 16px 60px rgba(184, 126, 95, 0.3);
}

.chatbot-fab:active {
  transform: scale(0.95);
}

.chatbot-fab svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}

/* Notification Dot */
.chatbot-fab__dot {
  display: none;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #E1A77F;
  border: 2px solid var(--c-bg-deep);
  box-shadow: 0 0 10px rgba(225, 167, 127, 0.7);
}

.chatbot-fab__dot--active {
  /* Notification-Dot bewusst deaktiviert – wirkte als störende "Ecke" oben rechts */
  display: none;
  animation: dot-pulse 1.8s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 8px rgba(225,167,127,0.6); }
  50%      { transform: scale(1.15); box-shadow: 0 0 14px rgba(225,167,127,0.9); }
}

@keyframes fab-breathe {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.25),
      inset 0 -2px 6px rgba(0,0,0,0.25),
      0 6px 22px rgba(184, 126, 95, 0.38),
      0 12px 44px rgba(184, 126, 95, 0.18),
      0 0 0 0 rgba(184, 126, 95, 0.3);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.25),
      inset 0 -2px 6px rgba(0,0,0,0.25),
      0 6px 22px rgba(184, 126, 95, 0.38),
      0 12px 44px rgba(184, 126, 95, 0.18),
      0 0 0 16px rgba(184, 126, 95, 0);
  }
}

/* ---- CHAT PANEL ---- */
.chatbot-panel {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 400px;
  height: 560px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(24,24,24,0.92), rgba(16,16,16,0.94));
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(184,126,95,0.18);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 8px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 300ms var(--ease-out),
              transform 300ms var(--ease-out);
}

/* Subtle brand glow inside panel */
.chatbot-panel::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,126,95,0.22), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.chatbot-panel--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Panel Header */
.chatbot-panel__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid rgba(184, 126, 95, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
}

.chatbot-panel__header-info {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.chatbot-panel__avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background:
    radial-gradient(circle at 30% 30%, rgba(225,167,127,0.5), rgba(184,126,95,0.15) 70%);
  border: 1px solid rgba(184,126,95,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 0 14px rgba(184,126,95,0.3);
}

.chatbot-panel__avatar::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid rgba(18,18,18,0.95);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.55);
}

.chatbot-panel__avatar svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 4px rgba(225,167,127,0.5));
}

.chatbot-panel__avatar-letter {
  font-family: 'Fraunces', 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  color: #E8C9A8;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  text-shadow: 0 0 12px rgba(212,151,111,0.45);
  display: inline-block;
  transform: translateY(0.5px);
}

.chatbot-panel__title {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--c-text-primary);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

.chatbot-panel__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.55);
  line-height: var(--lh-tight);
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.chatbot-panel__close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}

.chatbot-panel__close:hover {
  background: rgba(184, 126, 95, 0.12);
  border-color: rgba(184, 126, 95, 0.3);
  color: var(--c-text-primary);
  transform: rotate(90deg);
}

.chatbot-panel__close svg {
  width: 16px;
  height: 16px;
}

/* Panel Body */
.chatbot-panel__body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-4) var(--sp-5);
}

/* Welcome message in empty panel */
.chatbot-panel__welcome {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  animation: msg-in 400ms var(--ease-out) both;
}

.chatbot-panel__welcome-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--sp-4);
  border-radius: var(--radius-full);
  background:
    radial-gradient(circle at 30% 30%, rgba(225,167,127,0.45), rgba(184,126,95,0.12) 70%);
  border: 1px solid rgba(184,126,95,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 0 22px rgba(184,126,95,0.25);
  animation: icon-sparkle 4s ease-in-out infinite;
}

.chatbot-panel__welcome-icon svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 6px rgba(225,167,127,0.55));
}

.chatbot-panel__welcome-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--c-text-primary);
  margin-bottom: var(--sp-2);
  letter-spacing: -0.01em;
}

.chatbot-panel__welcome-text {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--c-text-body);
  line-height: var(--lh-normal);
  max-width: 28ch;
  margin: 0 auto;
}

/* Panel Footer / Input */
.chatbot-panel__footer {
  position: relative;
  z-index: 1;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid rgba(184, 126, 95, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(0,0,0,0.15));
}

.chatbot-panel__input-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}

.chatbot-panel__input-wrap:focus-within {
  border-color: rgba(184, 126, 95, 0.4);
  box-shadow:
    0 0 0 1px rgba(184, 126, 95, 0.15),
    0 0 22px rgba(184, 126, 95, 0.1);
}

.chatbot-panel__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--c-text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  padding: var(--sp-2) 0;
  min-height: 40px;
}

.chatbot-panel__input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.chatbot-panel__send {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(135deg, #B87E5F 0%, #D4976F 55%, #E1A77F 100%);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 4px 12px rgba(184,126,95,0.3);
  transition: transform var(--dur-fast) var(--ease-spring),
              box-shadow var(--dur-base) var(--ease-out),
              filter var(--dur-base) var(--ease-out);
}

.chatbot-panel__send:hover {
  transform: scale(1.1);
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 0 18px rgba(184, 126, 95, 0.45),
    0 0 36px rgba(212, 151, 111, 0.2);
}

.chatbot-panel__send:active {
  transform: scale(0.95);
}

.chatbot-panel__send svg {
  width: 17px;
  height: 17px;
  display: block;
  transform: translate(-1px, 1px); /* Paper-Plane optisch zentrieren */
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  /* Hero Chat */
  .hero-chat {
    max-width: 100%;
  }

  .hero-chat__input-wrap {
    padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  }

  .hero-chat__input {
    font-size: var(--fs-sm);
    min-height: 44px;
  }

  .hero-chat__chips {
    gap: var(--sp-2);
  }

  .hero-chat__chip {
    font-size: var(--fs-xs);
    padding: var(--sp-1) var(--sp-3);
  }

  .hero-chat__messages--visible {
    max-height: 270px;
    padding: var(--sp-4) var(--sp-4) calc(var(--sp-4) + 2px);
  }

  /* FAB */
  .chatbot-float {
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
  }

  /* Panel → fast Vollbild, aber als gerundete Sheet (Wunsch: abgerundete Ecken) */
  .chatbot-panel {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 10px);
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 10px);
    width: auto;
    height: auto;
    border-radius: 22px;
    padding-bottom: 0;
    /* iOS-Safari clippt overflow:hidden bei backdrop-filter nicht zuverlässig
       → Header-Hintergrund/Glow ragte als harte Ecke oben rechts heraus.
       clip-path erzwingt sauberes Runden aller Ecken. */
    clip-path: inset(0 round 22px);
  }

  /* 16px verhindert iOS-Auto-Zoom beim Fokus des Eingabefelds */
  .chatbot-panel__input {
    font-size: 16px;
  }

  /* Hintergrund nicht scrollen, während der Vollbild-Chat offen ist */
  body.chat-fullscreen {
    overflow: hidden;
  }

  .chatbot-panel__body {
    padding: var(--sp-4);
  }

  .chatbot-panel__footer {
    padding: var(--sp-3);
    padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom));
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .chatbot-fab        { animation: none; }
  .chatbot-fab__dot   { animation: none; }
  .chat-msg           { animation: none; }
  .chat-typing        { animation: none; }
  .chat-typing__dot   { animation: none; opacity: 0.6; }
  .chatbot-panel      { transition: opacity 0ms; transform: none; }
  .hero-chat__icon,
  .chatbot-panel__welcome-icon { animation: none; }
}
