/* Vote-Button-Assistent (/blog-bewerten) */
.vb-head { margin-bottom: 8px; }
.vb-facts { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.vb-facts li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .88rem; }
.vb-facts svg { width: 16px; height: 16px; fill: var(--brand); flex: none; }

/* Schritte */
.vb-step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 18px 0; transition: border-color .2s, box-shadow .2s; scroll-margin-top: 16px; }
.vb-step.is-current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.vb-step-title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 16px; }
.vb-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .95rem; flex: none; }
.vb-step.is-done .vb-num { background: var(--ok); font-size: 0; }
.vb-step.is-done .vb-num::after { content: "✓"; font-size: 1rem; }

/* Schritt 1: Suche */
.vb-search label { display: block; font-weight: 600; margin-bottom: 6px; }
.vb-combo { position: relative; display: flex; }
.vb-combo-icon { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.vb-combo input { flex: 1; min-width: 0; padding: 12px 12px 12px 40px; font: inherit; font-size: 1.02rem; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.vb-combo input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.vb-combo .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.js .vb-combo .btn { display: none; }
.js .vb-combo input { border-right: 1px solid var(--line); border-radius: var(--radius-sm); }
.js .vb-combo input:focus { border-color: var(--brand); }
.vb-hint { font-size: .88rem; margin: 8px 0 0; }

.vb-suggest { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgba(20, 18, 12, .16); max-height: 360px; overflow-y: auto; }
.vb-suggest li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: 6px; cursor: pointer; }
.vb-suggest li[aria-selected="true"], .vb-suggest li:hover { background: var(--brand-soft); }
.vb-suggest img { width: 56px; height: 42px; object-fit: cover; object-position: top; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); }
.vb-suggest strong, .vb-result-list strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-suggest small, .vb-result-list small { color: var(--muted); }
.vb-suggest mark { background: none; color: var(--brand-ink); font-weight: 700; }
.vb-suggest .vb-rating { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.vb-suggest .vb-empty { display: block; padding: 12px; cursor: default; color: var(--muted); }
.vb-suggest .vb-empty:hover { background: none; }

.vb-results { margin-top: 16px; }
.vb-result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.vb-result-list a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.vb-result-list a:hover { border-color: var(--brand); }
.vb-result-list img { width: 64px; height: 48px; object-fit: cover; object-position: top; border-radius: 4px; }

.vb-selected { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; animation: vb-in .25s ease-out; }
.vb-thumb { width: 96px; height: 72px; object-fit: cover; object-position: top; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); }
.vb-selected-text { display: grid; gap: 2px; min-width: 0; }
.vb-selected-text strong { font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-selected-text span, .vb-selected-text a { font-size: .9rem; }

/* Schritt 2: Stile */
.vb-styles { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.vb-style { position: relative; display: grid; grid-template-rows: 132px auto auto; gap: 2px; padding: 10px 10px 12px; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.vb-style:hover { border-color: var(--muted); transform: translateY(-1px); }
.vb-style input { position: absolute; opacity: 0; pointer-events: none; }
.vb-style:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.vb-style:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.vb-style:has(input:checked)::after { content: "✓"; position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; }
.vb-style-preview { display: grid; place-items: center; border-radius: var(--radius-sm); margin-bottom: 8px; background: #f7f6f2 radial-gradient(#e3e0d8 1px, transparent 1px) 0 0 / 12px 12px; }
.vb-style-preview.is-dark { background: #15140f radial-gradient(#2a2822 1px, transparent 1px) 0 0 / 12px 12px; }
.vb-style-preview img { max-width: 100%; height: auto; }
.vb-textlink { color: #9a3412; text-decoration: underline; font-size: .9rem; padding: 0 10px; text-align: center; }
.vb-style-name { font-weight: 700; font-size: .95rem; }
.vb-style-desc { font-size: .82rem; color: var(--muted); }
.vb-badge-live { display: inline-block; vertical-align: 1px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* Schritt 3: Code */
.vb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 14px; }
.vb-tabs { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.vb-tab input { position: absolute; opacity: 0; pointer-events: none; }
.vb-tab span { display: block; padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.vb-tab input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.vb-tab input:focus-visible + span { outline: 3px solid var(--brand); }
.vb-check { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.vb-check input { width: 18px; height: 18px; accent-color: var(--brand); }
.js .vb-nojs { display: none; }

.vb-output { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.vb-preview { position: relative; display: grid; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: #fff radial-gradient(#ece9e1 1px, transparent 1px) 0 0 / 12px 12px; min-height: 150px; }
.vb-preview-label { position: absolute; top: 8px; left: 10px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #6b6860; }
.vb-preview-stage { display: grid; place-items: center; padding: 28px 12px 12px; }
.vb-preview-stage a { color: #9a3412; }
.vb-preview-stage img { animation: vb-in .25s ease-out; }
.vb-code { display: flex; flex-direction: column; gap: 10px; }
.vb-code textarea { flex: 1; min-height: 110px; resize: vertical; word-break: break-all; }
.vb-code-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vb-copy-status { font-weight: 600; color: var(--ok); font-size: .92rem; }
[data-vb-copy].is-copied { background: var(--ok); }
.vb-code textarea.is-flash { animation: vb-flash .6s ease-out; }
.vb-need-blog a { font-weight: 600; white-space: nowrap; }

.vb-help { margin: 36px 0 12px; }

@keyframes vb-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes vb-flash { from { box-shadow: 0 0 0 4px var(--ok-soft); border-color: var(--ok); } to { box-shadow: none; } }

@media (max-width: 760px) {
  .vb-step { padding: 18px 16px; }
  .vb-selected { grid-template-columns: 72px minmax(0, 1fr); }
  .vb-selected .btn { grid-column: 1 / -1; }
  .vb-thumb { width: 72px; height: 54px; }
  .vb-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vb-style { grid-template-rows: 110px auto auto; }
  .vb-output { grid-template-columns: 1fr; }
  .vb-preview { min-height: 120px; }
  .vb-suggest li { grid-template-columns: 48px minmax(0, 1fr); }
  .vb-suggest .vb-rating { display: none; }
  .vb-suggest img { width: 48px; height: 36px; }
  .vb-code-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .vb-selected, .vb-preview-stage img, .vb-code textarea.is-flash { animation: none; }
}
