/* wa-lint: skip */
/* Blog-hero: Samtale-butler — filter-form → AI chat. */

.blog-hero-chat {
  width: 100%;
  aspect-ratio: 600 / 380;
  background: rgb(255, 255, 255);
  border-radius: 24px;
  box-shadow:
    0 1px 0 rgba(49, 79, 89, 0.04),
    0 30px 60px -20px rgba(49, 79, 89, 0.25);
  padding: 0;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .blog-hero-chat { background: var(--surface); }

.blog-hero-chat__slider {
  display: flex;
  width: 200%;
  height: 100%;
  animation: blog-chat-slide 14s ease-in-out infinite;
}

.blog-hero-chat__panel {
  width: 50%;
  height: 100%;
  flex-shrink: 0;
  padding: 16px 22px 20px;
  display: flex;
  flex-direction: column;
}

.blog-hero-chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(49, 79, 89, 0.10);
  margin-bottom: 14px;
  font-family: var(--font-display, system-ui), sans-serif;
}

.blog-hero-chat__title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(13px, 1.6vw, 16px);
  font-weight: 700;
  color: var(--primary, rgb(49, 79, 89));
}

.blog-hero-chat__sub {
  font-size: clamp(9px, 1.1vw, 11px);
  font-weight: 600;
  color: rgba(49, 79, 89, 0.55);
}

.blog-hero-chat__online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(9px, 1.1vw, 11px);
  font-weight: 700;
  color: var(--brand-success, rgb(0, 136, 60));
}

.blog-hero-chat__online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-success, rgb(0, 136, 60));
  animation: blog-chat-pulse 1.6s ease-in-out infinite;
}

/* ─── Filter panel ──────────────────────────────────────────────────── */
.blog-hero-chat__filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.blog-hero-chat__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-hero-chat__field label {
  font-family: var(--font-display, system-ui), sans-serif;
  font-size: clamp(9px, 1.05vw, 11px);
  font-weight: 700;
  color: rgba(49, 79, 89, 0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-hero-chat__select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border: 1px solid rgba(49, 79, 89, 0.18);
  border-radius: 6px;
  background: rgb(255, 255, 255);
  font-family: var(--font-display, system-ui), sans-serif;
  font-size: clamp(10px, 1.2vw, 12px);
  font-weight: 500;
  color: rgba(49, 79, 89, 0.65);
}
[data-theme="dark"] .blog-hero-chat__select {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.blog-hero-chat__select span {
  color: rgba(49, 79, 89, 0.40);
}

.blog-hero-chat__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.blog-hero-chat__chip {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(49, 79, 89, 0.06);
  font-family: var(--font-display, system-ui), sans-serif;
  font-size: clamp(9px, 1.05vw, 11px);
  font-weight: 600;
  color: rgba(49, 79, 89, 0.70);
}

.blog-hero-chat__hint {
  margin-top: auto;
  padding: 7px 11px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
  font-family: var(--font-display, system-ui), sans-serif;
  font-size: clamp(10px, 1.2vw, 12px);
  font-style: italic;
  color: rgb(185, 28, 28);
}

/* ─── Chat panel ──────────────────────────────────────────────────── */
.blog-hero-chat__stream {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: hidden;
}

.blog-hero-chat__bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 14px;
  font-family: var(--font-display, system-ui), sans-serif;
  font-size: clamp(10px, 1.25vw, 12px);
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px);
}

.blog-hero-chat__bubble--user {
  align-self: flex-end;
  background: var(--brand-50, rgb(49, 79, 89));
  color: rgb(255, 255, 255);
  border-bottom-right-radius: 4px;
  animation: blog-chat-bubble-in 14s linear infinite;
  animation-delay: 9.5s;
}

.blog-hero-chat__bubble--bot {
  align-self: flex-start;
  background: rgba(49, 79, 89, 0.06);
  color: var(--text, rgb(29, 35, 39));
  border-bottom-left-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: blog-chat-bubble-in 14s linear infinite;
  animation-delay: 10.5s;
}
[data-theme="dark"] .blog-hero-chat__bubble--bot {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.blog-hero-chat__bot-card {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgb(255, 255, 255);
  border: 1px solid rgba(184, 90, 58, 0.30);
  color: var(--brand-accent, rgb(184, 90, 58));
  font-size: 0.9em;
  font-weight: 700;
  align-self: flex-start;
}

.blog-hero-chat__typing {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(49, 79, 89, 0.06);
  border-bottom-left-radius: 4px;
  opacity: 0;
  animation: blog-chat-typing-in 14s linear infinite;
  animation-delay: 10s;
}
[data-theme="dark"] .blog-hero-chat__typing { background: rgba(255, 255, 255, 0.06); }
.blog-hero-chat__typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(49, 79, 89, 0.55);
  animation: blog-chat-dot 1.2s ease-in-out infinite;
}
.blog-hero-chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.blog-hero-chat__typing span:nth-child(3) { animation-delay: 0.30s; }

/* Keyframes */
@keyframes blog-chat-slide {
  0%, 30%    { transform: translateX(0); }
  40%, 93%   { transform: translateX(-50%); }
  100%       { transform: translateX(0); }
}

@keyframes blog-chat-bubble-in {
  0%         { opacity: 0; transform: translateY(8px); }
  3%         { opacity: 1; transform: translateY(0); }
  25%        { opacity: 1; transform: translateY(0); }
  30%        { opacity: 0; transform: translateY(-8px); }
  100%       { opacity: 0; }
}

@keyframes blog-chat-typing-in {
  0%         { opacity: 0; }
  3%         { opacity: 1; }
  7%         { opacity: 1; }
  9%         { opacity: 0; }
  100%       { opacity: 0; }
}

@keyframes blog-chat-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-3px); opacity: 1; }
}

@keyframes blog-chat-pulse {
  0%, 100%   { box-shadow: 0 0 0 0 rgba(0, 136, 60, 0.5); }
  50%        { box-shadow: 0 0 0 5px rgba(0, 136, 60, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .blog-hero-chat__slider { animation: none; transform: translateX(-50%); }
  .blog-hero-chat__bubble { animation: none; opacity: 1; transform: none; }
  .blog-hero-chat__typing { animation: none; opacity: 0; }
}
