/* wa-lint: skip */
/* Blog-hero: kompleks → 2 linjer + widget */

.blog-hero-embed {
  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-embed { background: var(--surface); }

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

.blog-hero-embed__panel {
  width: 50%;
  height: 100%;
  flex-shrink: 0;
  padding: 16px 24px 18px;
  display: flex;
  flex-direction: column;
}

.blog-hero-embed__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: 12px;
  font-family: var(--font-display, system-ui), sans-serif;
}

.blog-hero-embed__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 700;
  color: var(--primary, rgb(49, 79, 89));
}

.blog-hero-embed__count {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: clamp(9px, 1.05vw, 11px);
  font-weight: 700;
}
.blog-hero-embed__count--bad { background: rgba(239, 68, 68, 0.10); color: rgb(185, 28, 28); }
.blog-hero-embed__count--good { background: rgba(0, 136, 60, 0.12); color: var(--brand-success, rgb(0, 136, 60)); }

.blog-hero-embed__files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
}

.blog-hero-embed__file {
  background: rgb(26, 34, 41);
  border-radius: 6px;
  overflow: hidden;
}

.blog-hero-embed__file-tab {
  display: block;
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  font-family: ui-monospace, monospace;
  font-size: clamp(8px, 0.95vw, 10px);
  color: rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.blog-hero-embed__code {
  margin: 0;
  padding: 6px 10px;
  font-family: ui-monospace, monospace;
  font-size: clamp(8px, 0.95vw, 10px);
  line-height: 1.45;
  color: rgb(230, 232, 234);
  white-space: pre;
  overflow: hidden;
}

.blog-hero-embed__kw { color: rgb(199, 146, 234); }
.blog-hero-embed__fn { color: rgb(130, 170, 255); }
.blog-hero-embed__str { color: rgb(195, 232, 141); }

/* PANEL 2: simple */
.blog-hero-embed__simple {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.blog-hero-embed__code--big {
  width: 100%;
  font-size: clamp(10px, 1.2vw, 13px);
  background: rgb(26, 34, 41);
  border-radius: 8px;
  padding: 12px 16px;
  line-height: 1.6;
}

.blog-hero-embed__arrow {
  font-size: 18px;
  color: rgba(49, 79, 89, 0.45);
  font-weight: 700;
}

.blog-hero-embed__widget {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-hero-embed__widget-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  width: 100%;
  border: 1px solid rgba(49, 79, 89, 0.12);
  border-radius: 10px;
  background: rgb(255, 255, 255);
  box-shadow: 0 4px 12px -6px rgba(0,0,0,0.10);
}
[data-theme="dark"] .blog-hero-embed__widget-card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}

.blog-hero-embed__widget-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--brand-accent, rgb(184, 90, 58));
  color: rgb(255, 255, 255);
  display: grid;
  place-items: center;
  font-family: var(--font-display, system-ui), sans-serif;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.blog-hero-embed__widget-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: var(--font-display, system-ui), sans-serif;
}
.blog-hero-embed__widget-info strong {
  font-size: clamp(12px, 1.4vw, 14px);
  font-weight: 700;
  color: var(--primary, rgb(49, 79, 89));
}
[data-theme="dark"] .blog-hero-embed__widget-info strong { color: rgb(241, 245, 249); }
.blog-hero-embed__widget-info span {
  font-size: clamp(9px, 1.1vw, 11px);
  color: rgba(49, 79, 89, 0.65);
}

.blog-hero-embed__widget-link {
  color: var(--brand-accent, rgb(184, 90, 58));
  font-weight: 600;
  margin-top: 2px;
}

@keyframes blog-embed-slide {
  0%, 32%    { transform: translateX(0); }
  42%, 93%   { transform: translateX(-50%); }
  100%       { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .blog-hero-embed__slider { animation: none; transform: translateX(-50%); }
}
