/* SEORCH – Google Suchvolumen mit 48 Monaten (tools-volume.js, enhanceSv48). Benötigt tools-results.css */
#result .res p.sv-meta { margin-top: -8px; color: var(--text-2); }
#result .res p.sv-meta b { color: var(--text); font-variant-numeric: tabular-nums; }

#result .res .sv48 td { vertical-align: middle; }
#result .res .sv48 th small { display: block; font-size: 9.5px; opacity: .75; }
#result .res .sv48 th button { all: unset; cursor: pointer; display: inline-block; }
#result .res .sv48 th button:focus-visible { outline: 3px solid var(--c2); outline-offset: 2px; border-radius: 4px; }
#result .res .sv48 .sv-sort::before { content: "\00a0↕"; font-size: 11px; opacity: .35; }
#result .res .sv48 th[aria-sort="ascending"] .sv-sort::before { content: "\00a0↑"; opacity: .9; }
#result .res .sv48 th[aria-sort="descending"] .sv-sort::before { content: "\00a0↓"; opacity: .9; }

#result .res .sv48 td.sv-kw { font-weight: 600; min-width: 180px; }
.sv-more { display: inline-block; margin-left: 10px; padding: 2px 9px; border-radius: 6px; border: 1px solid var(--stroke-2); background: var(--bg); color: var(--text-2); font: 600 12px var(--font); cursor: pointer; vertical-align: 1px; }
.sv-more::after { content: "\00a0▾"; }
.sv-more[aria-expanded="true"]::after { content: "\00a0▴"; }
.sv-more:hover { color: var(--text); border-color: var(--text); }
.sv-more:focus-visible { outline: 3px solid var(--c2); outline-offset: 2px; }
#result .res .sv48 td.sv-peak { color: var(--text-2); white-space: nowrap; }
#result .res .sv48 td.sv-range { color: var(--text-2); }
/* Wettbewerb als Füllbalken */
#result .res .sv48 td.sv-comp { white-space: nowrap; }
.sv-comp { text-align: right; }
.sv-bar { display: inline-block; vertical-align: middle; width: 72px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.sv-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--bc); transition: width .6s var(--ease); }
.sv-bar.is-low { --bc: var(--c4); }
.sv-bar.is-mid { --bc: #e8a33d; }
.sv-bar.is-high { --bc: var(--c1); }
.sv-comp__v { display: inline-block; min-width: 2.2em; margin-left: 8px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }

.sv-spark { display: block; width: 120px; height: 30px; overflow: visible; --sc: var(--muted); }
.sv-spark polyline { fill: none; stroke: var(--sc); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sv-spark circle { fill: var(--sc); }
.sv-spark.is-up { --sc: var(--c4); }
.sv-spark.is-down { --sc: var(--c1); }
.sv-yoy { display: inline-block; min-width: 58px; padding: 3px 8px; border-radius: 6px; font-weight: 700; text-align: center; white-space: nowrap; }
.sv-yoy.is-up { color: var(--c4); background: color-mix(in srgb, var(--c4) 13%, transparent); }
.sv-yoy.is-down { color: var(--c1); background: color-mix(in srgb, var(--c1) 12%, transparent); }

#result .res .sv48 tr.is-open > td { background: var(--bg-2); }
#result .res .sv48 tr.sv-detail > td { padding: 0; background: var(--bg-2); }
.sv-detail__in { position: sticky; left: 0; max-width: min(100%, calc(100vw - 2 * var(--gutter) - 2px)); box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 18px 20px 22px; }
.sv-detail__in > * { min-width: 0; }
.sv-chart { margin: 0; }
.sv-chart figcaption, .sv-heat__t { margin: 0 0 10px; font: 700 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sv-chart svg { display: block; width: 100%; height: auto; }
.sv-chart svg rect:not(.hit), .sv-chart svg text { stroke: none; }
.sv-chart svg rect.hit { stroke: none; }
.sv-chart rect.hit { fill: transparent; }
.sv-chart rect.bar { fill: color-mix(in srgb, var(--text) 26%, transparent); }
.sv-chart rect.bar.is-recent { fill: var(--red); }
.sv-chart g[data-i] { cursor: help; outline: none; }
.sv-chart :is(g:hover, g.is-hl) rect.bar { fill: var(--text); }
.sv-chart :is(g:hover, g.is-hl) rect.bar.is-recent { fill: var(--red-dark); }
.sv-chart :is(g:hover, g.is-hl) rect.hit { fill: color-mix(in srgb, var(--text) 6%, transparent); }
.sv-chart g:focus-visible rect.hit { stroke: var(--c2); stroke-width: 1.5; }
/* Tooltip im Stil des CrUX-Tools */
.sv-tip { position: fixed; z-index: 120; width: min(260px, calc(100vw - 24px)); padding: 10px 12px; border-radius: var(--r); background: var(--glass-2); border: 1px solid var(--stroke-2); box-shadow: var(--shadow-lg); font: 500 13px/1.4 var(--font); color: var(--text-2); pointer-events: none; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.sv-tip[hidden] { display: none; }
.sv-tip strong { display: block; margin-bottom: 6px; font: 700 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
#result .res .sv-tip table { width: 100%; border-collapse: collapse; border: 0; background: none; }
#result .res .sv-tip td { padding: 3px 0; border: 0; background: none; font: 500 12.5px/1.4 var(--font); color: var(--text-2); }
#result .res .sv-tip td:last-child { padding-left: 12px; text-align: right; white-space: nowrap; color: var(--text); font-variant-numeric: tabular-nums; }
.sv-tip .sv-yoy { min-width: 0; padding: 1px 6px; font-size: 12px; }
.sv-chart line { stroke: var(--stroke-2); stroke-width: 1; stroke-dasharray: 2 3; }
.sv-chart text { font: 600 11px var(--mono); fill: var(--muted); }
.sv-chart text.max { fill: var(--text-2); }

.sv-heat__scroll { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--stroke); background: var(--bg); }
#result .res .sv-heat table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
#result .res .sv-heat th, #result .res .sv-heat td { padding: 7px 6px; text-align: center; border: 0; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
#result .res .sv-heat thead th, #result .res .sv-heat tr:first-child th { font: 700 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: color-mix(in srgb, var(--bg-2) 60%, var(--bg)); }
#result .res .sv-heat th[scope="row"] { font: 700 12px var(--mono); color: var(--text); text-align: left; padding-left: 12px; }
#result .res .sv-heat td { background: color-mix(in srgb, var(--red) var(--a, 0%), transparent); color: var(--text); }
#result .res .sv-heat td.is-top { font-weight: 800; }
#result .res .sv-heat td.is-empty { background: transparent; }
#result .res .sv-heat td.sum { background: transparent; font-weight: 700; text-align: right; padding-right: 12px; }
#result .res .sv-heat tr:last-child > * { border-bottom: 0; }

@media (max-width: 680px) {
  #result .res .sv48 td.sv-kw { min-width: 140px; }
  .sv-more { display: block; margin: 6px 0 0; width: fit-content; }
}

/* volle Länge statt eigenem Scrollbereich (überschreibt die Höhenbegrenzung aus tools-results.css) */
#result .res .table-wrap:has(> .sv48) { max-height: none; overflow-y: visible; }

/* Keyword Tool: Filter, Zähler und stufenweise Anzeige */
.sv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 12px; }
.sv-filter { display: flex; align-items: center; gap: 10px; flex: 1 1 320px; max-width: 460px; font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sv-filter input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: var(--r); border: 1px solid var(--stroke-2); background: var(--bg); color: var(--text); font: 500 14px var(--font); letter-spacing: 0; text-transform: none; }
.sv-filter input:focus-visible { outline: 3px solid var(--c2); outline-offset: 1px; border-color: var(--text); }
.sv-count { font: 600 13px var(--font); color: var(--text-2); font-variant-numeric: tabular-nums; }
#result .res p.sv-none { margin: 12px 0 0; color: var(--text-2); }
.sv-showmore { display: block; margin: 14px auto 0; padding: 9px 20px; border-radius: var(--r); border: 1px solid var(--stroke-2); background: var(--bg); color: var(--text); font: 600 14px var(--font); cursor: pointer; }
.sv-showmore:hover { border-color: var(--text); }
.sv-showmore:focus-visible { outline: 3px solid var(--c2); outline-offset: 2px; }
.sv-showmore[hidden], .sv-none[hidden] { display: none; }

/* Suchvolumen-Prognose */
#result .res .fc-table td :is(b, small) { display: block; }
#result .res .fc-table td small { margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
#result .res .fc-table td.fc-next small { font-variant-numeric: tabular-nums; }
#result .res .fc-table td.sv-peak b { color: var(--text); }
.fc-muted { color: var(--muted); }
.fc-spark polyline.fc { stroke: var(--red); stroke-dasharray: 3 3; }
.fc-level { display: inline-block; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 13px; }
.fc-level.is-high { color: var(--c4); background: color-mix(in srgb, var(--c4) 13%, transparent); }
.fc-level.is-medium { color: #b7791f; background: color-mix(in srgb, #e8a33d 16%, transparent); }
.fc-level.is-low { color: var(--c1); background: color-mix(in srgb, var(--c1) 12%, transparent); }
.sv-chart rect.bar.is-fc { fill: color-mix(in srgb, var(--red) 30%, transparent); }
.sv-chart :is(g:hover, g.is-hl) rect.bar.is-fc { fill: color-mix(in srgb, var(--red) 55%, transparent); }
.sv-chart line.wh { stroke: var(--red); stroke-width: 1.5; stroke-dasharray: none; }
.fc-season .sv-heat__scroll table td { font-weight: 600; }
.fc-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
#result .res .fc-season table { table-layout: fixed; min-width: 760px; }
