/* 06-cards.css — Website cards, health ring, progress steps, before/after, timeline, rating, dashboard, notification centre, phones.
   Part of the portal stylesheet; index.html loads the parts in order (01 to 12), so the cascade is
   the same as one file. */

/* Rustig binnenkomen van een scherm */
.view { animation: view-in 0.22s ease-out both; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.skeleton { display: grid; gap: 16px; padding-top: 4px; }
.skeleton-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.skeleton-block { border-radius: var(--radius); background: linear-gradient(90deg, var(--skeleton) 0%, var(--skeleton-shine) 40%, var(--skeleton) 80%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton-tile { height: 88px; }
.skeleton-panel { height: 220px; }
.skeleton-panel.short { height: 120px; }
.skeleton-inline { gap: 10px; padding-top: 0; }
.skeleton-inline .skeleton-tile { height: 64px; }
.skeleton-chart { height: 120px; }
.skeleton-line { height: 14px; border-radius: 999px; }
.skeleton-line:nth-child(3n + 2) { width: 92%; }
.skeleton-line:nth-child(3n) { width: 64%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) {
  .view, .skeleton-block, .progress-steps .current .progress-dot { animation: none !important; }
}

/* Websitekaarten */
.site-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.site-card-large { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-soft); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.site-card-large:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.site-shot { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.site-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.site-shot-empty { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); background: linear-gradient(135deg, var(--primary-soft), var(--surface-2)); }
.site-shot-empty svg { width: 40px; height: 40px; opacity: 0.6; }
.site-shot-badge { position: absolute; z-index: 3; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; box-shadow: var(--shadow-soft); }
.site-card-main { display: grid; gap: 8px; padding: 14px 16px 16px; align-content: start; }
.site-card-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.site-card-name { display: block; font-size: 17px; font-weight: 800; color: var(--ink); text-decoration: none; }
.site-card-url { display: block; text-decoration: none; }
.site-card-last { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0; }
.site-card-last svg { width: 14px; height: 14px; }
.site-card-action { justify-self: start; }
.site-card-stats { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); }
.site-card-stats strong { color: var(--ink); }
.site-card-stats svg.lucide { width: 14px; height: 14px; }
.site-card-stats svg:not(.lucide) { margin-left: auto; flex: 0 0 auto; }

/* Gezondheidsring */
.score-ring { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; }
.score-ring svg { display: block; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 5; }
.ring-fill { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; }
.score-ring-value { position: absolute; font-weight: 800; font-size: 14px; color: var(--ink); }
.score-ring.ring-good { color: var(--ok); }
.score-ring.ring-fair { color: var(--warn); }
.score-ring.ring-poor { color: var(--danger); }

/* Voortgangsstappen */
.progress-steps { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--info-bg); }
.progress-steps ol { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.progress-steps li { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; }
.progress-steps li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-dot { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.progress-dot svg { width: 11px; height: 11px; }
.progress-steps .done { color: var(--ok); }
.progress-steps .done .progress-dot { border-color: var(--ok); background: var(--ok); color: var(--surface); }
.progress-steps .current { color: var(--info); font-weight: 700; }
.progress-steps .current .progress-dot { border-color: var(--info); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--info) 40%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
@media (max-width: 720px) {
  .progress-steps ol { grid-auto-flow: row; }
}

/* Voor en na: schuifregelaar */
.compare-slider-wrap { max-height: 640px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; }
.compare-slider { position: relative; user-select: none; }
.compare-slider > img { display: block; width: 100%; height: auto; }
.compare-slider-before { position: absolute; inset: 0; }
.compare-slider-before img { display: block; width: 100%; height: auto; }
.compare-slider-handle { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--primary); pointer-events: none; }
.compare-slider-handle svg { position: sticky; top: 40%; margin-left: -15px; width: 32px; height: 32px; padding: 6px; border-radius: 50%; background: var(--primary); color: #ffffff; box-shadow: var(--shadow-soft); }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-slider:has(.compare-range:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.compare-tag { position: absolute; top: 10px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(17, 20, 24, 0.72); color: #ffffff; pointer-events: none; }
.compare-tag-before { left: 10px; }
.compare-tag-after { right: 10px; }

/* Tijdlijn per website */
.timeline-list { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline-list::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 8px 0; }
.timeline-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); border: 2px solid var(--surface); }
.timeline-dot svg { width: 14px; height: 14px; }
.timeline-reverted .timeline-dot { background: var(--surface-2); color: var(--muted); }
.timeline-revert .timeline-dot { background: var(--warn-bg); color: var(--warn); }
.timeline-body { display: grid; gap: 2px; min-width: 0; }
.timeline-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.timeline-title { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.timeline-title:hover { color: var(--primary); }
.timeline-rating svg { width: 14px; height: 14px; }
.timeline-shot img { display: block; width: 132px; height: 82px; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); }
.timeline-body .btn-link { justify-self: start; padding-left: 0; }
@media (max-width: 720px) {
  .timeline-item { grid-template-columns: 28px 1fr; }
  .timeline-shot { grid-column: 2; }
}

/* Beoordeling */
.rating-panel { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.rating-panel h2 { margin-bottom: 2px; }
.engine-ratings { display: inline-flex; align-items: center; gap: 2px; }
.engine-ratings svg { width: 13px; height: 13px; }

/* Dashboard */
/* Label on top, the number with its trend line beside it, a hint below: low and calm. */
.stat-tile { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "label label" "value trend" "hint hint"; align-items: end; column-gap: var(--space-4); row-gap: var(--space-1); padding: var(--space-4); }
.stat-tile .tile-label { grid-area: label; }
.stat-tile .tile-value { grid-area: value; font-size: 28px; line-height: 1.1; }
.stat-tile .sparkline { grid-area: trend; justify-self: end; width: 100%; max-width: 120px; margin-bottom: 4px; }
.stat-tile > .muted, .stat-tile > .stats-change { grid-area: hint; }
.sparkline { width: 120px; height: 28px; }
.sparkline path { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.status-tiles .tile { padding: 14px 16px; }
.status-tiles .tile:not(.tile-active) .tile-value { color: var(--muted); }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: var(--space-4); }
.chart-grid > .panel { margin: 0; }
.chart { position: relative; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-svg .chart-gridline { stroke: var(--chart-grid); stroke-width: 1; }
.chart-axis { fill: var(--chart-text); font-size: 11px; }
.chart-mark { fill: var(--chart-1); }
.chart-col:hover .chart-mark, .chart-col:focus-within .chart-mark { opacity: 0.8; }
.chart-line { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--chart-1); opacity: 0.1; }
.chart-dot { fill: var(--chart-1); stroke: var(--surface); stroke-width: 2; }
.chart-cross { stroke: var(--chart-text); stroke-width: 1; }
.chart-hit { fill: transparent; outline: none; }
.chart-hit:focus-visible { stroke: var(--primary); stroke-width: 1; }
.chart-tip { position: absolute; transform: translate(-50%, calc(-100% - 10px)); display: grid; padding: 6px 10px; border-radius: 6px; background: var(--ink); color: var(--surface); font-size: 12px; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-soft); }
.chart-tip strong { font-size: 14px; }
.chart-table { margin-top: 6px; font-size: 12px; }
.chart-table summary { cursor: pointer; color: var(--muted); }
.chart-table table { margin-top: 6px; }
.bar-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bar-list li { display: grid; grid-template-columns: minmax(110px, 34%) 1fr 36px; align-items: center; gap: 10px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.bar-track { height: 10px; border-radius: 4px; background: var(--surface-2); }
.bar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--chart-1); }
.bar-value { text-align: right; font-weight: 700; }
.today-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.today-list li { display: grid; grid-template-columns: 48px 18px 1fr; align-items: center; gap: 8px; font-size: 14px; }
.today-list svg { width: 16px; height: 16px; color: var(--muted); }
.today-time { color: var(--muted); font-size: 12px; }
@media (max-width: 720px) { .chart-grid { grid-template-columns: 1fr; } }

/* Tabellen: sorteren en zoeken */
.table-block { display: grid; gap: 8px; }
.table-search { max-width: 280px; }
.th-sort { all: unset; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font: inherit; text-transform: inherit; letter-spacing: inherit; color: inherit; }
.th-sort svg { width: 12px; height: 12px; opacity: 0.45; }
th[aria-sort="ascending"] .th-sort, th[aria-sort="descending"] .th-sort { color: var(--primary); }
th[aria-sort="ascending"] .th-sort svg, th[aria-sort="descending"] .th-sort svg { opacity: 1; }
.th-sort:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }
.table-none { margin: 4px 0; }

/* Meldingencentrum */
.inbox { position: relative; }
.inbox-button { position: relative; }
.inbox-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand-primary); color: #ffffff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.inbox-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: min(380px, calc(100vw - 32px)); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-float); }
/* Phones: the bell sits on the left of the bar, so the panel spans the screen just below it. */
@media (max-width: 720px) {
  .inbox-panel { position: fixed; top: var(--inbox-top, 72px); left: 16px; right: 16px; width: auto; max-height: calc(100dvh - var(--inbox-top, 72px) - 16px); }
}
.inbox-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.inbox-list { list-style: none; margin: 0; padding: 4px; overflow-y: auto; }
.inbox-empty { padding: 18px; text-align: center; }
.inbox-item { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.inbox-item:hover, .inbox-item:focus-visible { background: var(--surface-2); }
.inbox-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.inbox-icon svg { width: 15px; height: 15px; }
.inbox-unread .inbox-icon { background: var(--primary-soft); color: var(--primary); }
.inbox-text { display: grid; gap: 2px; min-width: 0; font-size: 13px; }
.inbox-item:not(.inbox-unread) strong { font-weight: 600; color: var(--muted); }
.inbox-body { color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.inbox-time { font-size: 11px; color: var(--muted); }
.inbox-actions { display: flex; align-items: center; gap: 4px; }
.inbox-actions .btn-link { padding-inline: 6px; }
.inbox-clear { color: var(--muted); }
.inbox-clear:hover { color: var(--danger); }
.inbox-row { position: relative; }
.inbox-row .inbox-item { padding-right: 36px; }
.inbox-remove { position: absolute; top: 8px; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity 0.15s ease, background 0.15s ease; }
.inbox-row:hover .inbox-remove, .inbox-remove:focus-visible { opacity: 1; }
.inbox-remove:hover { background: var(--surface-2); color: var(--danger); }
.inbox-remove svg { width: 14px; height: 14px; }
@media (hover: none) {
  .inbox-remove { opacity: 0.7; }
}
