/* Landingpage /einkauf: Kacheln mit reduzierten Widgets, Sicherheitsband mit Punkten, mobile Button-Leiste.
   Baut auf plattform.css und quality.css auf, Farben und Radien wie auf der Startseite. */

/* ---- Kacheln ---- */
.ek-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ek-tile { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ek-tile > h3 { margin: 22px 24px 8px; }
.ek-tile > p { margin: 0 24px 24px; }
.ek-widget { position: relative; height: 176px; padding: 20px; background: #F6F7F9; border-bottom: 1px solid #E8EAED; background-image: radial-gradient(70% 90% at 0% 0%, rgba(46, 107, 127, 0.1), transparent 60%); }
@media (max-width: 960px) { .ek-tiles { grid-template-columns: minmax(0, 1fr); max-width: 560px; } }

.w { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 8px; font-size: 12.5px; color: #5B6472; }
.w-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.w-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #6B7480; }
.w-chip { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.w-chip-good { background: #E7F4EE; color: #1F7A55; }
.w-chip-warn { background: #FFF4E2; color: #B9700E; }

/* Angebotsvergleich */
.w-head, .w-row { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.w-head { padding: 0 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #6B7480; }
.w-row { padding: 9px 12px; border-radius: 10px; border: 1px solid #E8EAED; background: #FFFFFF; color: #031E3F; font-weight: 500; }
.w-row span:nth-child(n+2) { font-variant-numeric: tabular-nums; }
.w-row em { position: absolute; right: 10px; top: -9px; padding: 2px 7px; border-radius: 999px; background: #1F7A55; color: #FFFFFF; font-size: 10.5px; font-style: normal; font-weight: 600; opacity: 0; transform: translateY(4px); transition: opacity 0.4s ease 1s, transform 0.4s ease 1s; }
.w-row.is-best { transition: border-color 0.4s ease 0.9s, box-shadow 0.4s ease 0.9s, background-color 0.4s ease 0.9s; }
.reveal.is-visible .w-row.is-best { border-color: #1F7A55; background: #F3FAF6; box-shadow: 0 0 0 3px rgba(31, 122, 85, 0.12); }
.reveal.is-visible .w-row em { opacity: 1; transform: none; }
html.js .ek-tile .w-row { opacity: 0; transform: translateY(6px); transition: opacity 0.45s ease, transform 0.45s ease; transition-delay: calc(0.25s + var(--d, 0) * 0.12s); }
html.js .ek-tile.is-visible .w-row { opacity: 1; transform: none; }
html.js .ek-tile.is-visible .w-row.is-best { transition: opacity 0.45s ease calc(0.25s + var(--d, 0) * 0.12s), transform 0.45s ease calc(0.25s + var(--d, 0) * 0.12s), border-color 0.4s ease 0.9s, box-shadow 0.4s ease 0.9s, background-color 0.4s ease 0.9s; }

/* Rohstoffindex */
.w-spark { display: block; width: 100%; height: 72px; overflow: visible; }
.w-spark-area { fill: rgba(46, 107, 127, 0.1); stroke: none; }
.w-spark-line { fill: none; stroke: #2E6B7F; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 320; stroke-dashoffset: 0; }
.w-spark-dot { fill: #2E6B7F; stroke: #FFFFFF; stroke-width: 2; }
html.js .ek-tile .w-spark-line { stroke-dashoffset: 320; transition: stroke-dashoffset 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s; }
html.js .ek-tile .w-spark-dot, html.js .ek-tile .w-spark-area { opacity: 0; transition: opacity 0.4s ease 1.5s; }
html.js .ek-tile.is-visible .w-spark-line { stroke-dashoffset: 0; }
html.js .ek-tile.is-visible .w-spark-dot, html.js .ek-tile.is-visible .w-spark-area { opacity: 1; }
.w-foot { margin: 0; font-size: 12.5px; color: #031E3F; font-weight: 500; }

/* Lieferantenrisiko */
.w-metric { display: flex; align-items: baseline; gap: 10px; color: #031E3F; }
.w-metric b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.w-trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: #B42318; }
.w-bar { height: 6px; border-radius: 3px; background: #E8EAED; overflow: hidden; }
.w-bar i { display: block; height: 100%; width: 84%; border-radius: 3px; background: #D97706; }
html.js .ek-tile .w-bar i { width: 96%; background: #1F7A55; transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.5s, background-color 1.1s ease 0.5s; }
html.js .ek-tile.is-visible .w-bar i { width: 84%; background: #D97706; }
.w-alert { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #FFFFFF; border: 1px solid #F3D9AE; color: #031E3F; font-weight: 500; }
.w-alert svg { flex: 0 0 auto; }
html.js .ek-tile .w-alert { opacity: 0; transform: translateY(6px); transition: opacity 0.45s ease 1.4s, transform 0.45s ease 1.4s; }
html.js .ek-tile.is-visible .w-alert { opacity: 1; transform: none; }

/* ---- Sicherheitsband mit Punkten ---- */
.ek-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; list-style: none; margin: 4px 0 0; padding: 0; }
.ek-points li { display: flex; align-items: flex-start; gap: 8px; font-size: 15.5px; line-height: 1.5; color: #031E3F; font-weight: 500; }
.ek-points svg { flex: 0 0 auto; margin-top: 3px; }
@media (max-width: 960px) { .ek-points { grid-template-columns: minmax(0, 1fr); } }

/* ---- Mobile Button-Leiste ---- */
.q-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid #E8EAED; }
.q-sticky .btn-primary { width: 100%; }
@media (min-width: 761px) { .q-sticky { display: none !important; } }
html.has-sticky body { padding-bottom: 72px; }

@media (prefers-reduced-motion: reduce) {
  html.js .ek-tile .w-row, html.js .ek-tile .w-alert, html.js .ek-tile .w-spark-dot, html.js .ek-tile .w-spark-area { opacity: 1; transform: none; transition: none; }
  html.js .ek-tile .w-spark-line { stroke-dashoffset: 0; transition: none; }
  html.js .ek-tile .w-bar i { width: 84%; background: #D97706; transition: none; }
  .w-row em { opacity: 1; transform: none; transition: none; }
}
