/* Stijlen van module content (zie SPEC.md 0.2). Bouwt voort op de variabelen uit app.css. */

/* ---------- Lijst ---------- */

.ct-counter { display: inline-flex; align-items: center; gap: 8px; margin: -6px 0 16px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.ct-counter .icon { width: 16px; height: 16px; color: var(--accent-bright); }

.ct-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.grid-head.ct-row { display: none; }
.ct-c-product { grid-column: 1 / -1; min-width: 0; }
.ct-c-product .row-link { overflow-wrap: anywhere; }
.ct-c-platform { display: flex; gap: 8px; align-items: center; }
.ct-c-taal { justify-self: end; color: var(--muted); font-size: 13px; }
.ct-c-tijd { justify-self: end; color: var(--muted); font-size: 13px; white-space: nowrap; }

.ct-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--p-grijs); color: var(--i-grijs); }
.ct-chip-bol { background: var(--p-blauw); color: var(--i-blauw); }
.ct-chip-amazon-de, .ct-chip-amazon-fr { background: var(--p-oranje); color: var(--i-oranje); }
.ct-chip-kaufland-de { background: var(--p-rood); color: var(--i-rood); }

/* Voorbeeld in de lege toestand */
.ct-example { margin-top: 16px; }
.ct-example-kop { font-size: 18px; margin-bottom: 16px; }
.ct-howto { list-style: none; display: grid; gap: 16px; }
.ct-howto li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.ct-howto p { margin-top: 2px; }
.ct-before-after { display: grid; gap: 10px; margin-top: 20px; padding: 16px; border-radius: var(--radius); background: var(--panel); align-items: center; }
.ct-ba { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.ct-ba-out { border-color: var(--accent-bright); }
.ct-ba-text { color: var(--ink-2); overflow-wrap: anywhere; }
.ct-ba-arrow { justify-self: center; color: var(--accent-bright); transform: rotate(90deg); }

/* ---------- Nieuw ---------- */

.ct-wide { grid-column: 1 / -1; }
.ct-one { grid-template-columns: minmax(0, 1fr) !important; }
.ct-editor textarea, form[data-schrijft] textarea { resize: vertical; line-height: 1.5; }
.ct-submit { display: grid; gap: 12px; justify-items: start; padding-top: 4px; }
.ct-busy { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; }
/* Terwijl de AI schrijft: een rustige glans over de melding (schimmer), en de melding schuift in. */
@media (prefers-reduced-motion: no-preference) {
  .ct-busy:not([hidden]) { animation: nxt-in-klein var(--t-2) var(--ease) both; }
  .ct-busy::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.6) 50%, transparent 80%); transform: translateX(-100%); animation: ct-glans 1.8s var(--ease-in-out) infinite; }
}
@keyframes ct-glans { to { transform: translateX(100%); } }
.ct-busy[hidden] { display: none; }
.ct-busy .spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; flex: none; }

.ct-side-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.ct-side-head h2 { font-size: 16px; }
.ct-side-head .muted { font-size: 13px; margin-top: 2px; }
.ct-rules { list-style: none; display: grid; gap: 10px; }
.ct-rules li { position: relative; padding-left: 22px; color: var(--ink-2); }
.ct-rules li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-dot); }
.ct-quiet { background: var(--panel); border-color: var(--panel); }
.ct-quiet p { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.ct-quiet .icon { width: 17px; height: 17px; margin-top: 1px; color: var(--faint); }

/* ---------- Bewerken ---------- */

.ct-meta { margin-left: 12px; color: var(--muted); }
.ct-notice { align-items: flex-start; }
.ct-editor { display: grid; gap: 28px; }
.ct-field { display: grid; gap: 8px; min-width: 0; }
.ct-field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.ct-label { font-weight: 600; color: var(--ink-2); }
.ct-copy.is-copied { border-color: var(--ok-dot); color: var(--ok); }
@media (prefers-reduced-motion: no-preference) {
  .ct-copy.is-copied .icon { animation: nxt-punt 240ms var(--ease) both; }
}
#ct-title { font-weight: 600; font-size: 15px; }
.ct-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ct-count.is-over { color: var(--warn); font-weight: 600; }
.ct-count-warn[hidden] { display: none; }
.ct-field:has(.ct-count.is-over) #ct-title { border-color: var(--warn-dot); }
.ct-bullets { list-style: none; display: grid; gap: 10px; counter-reset: bullet; }
.ct-bullets li { position: relative; padding-left: 34px; counter-increment: bullet; }
.ct-bullets li::before { content: counter(bullet); position: absolute; left: 0; top: 11px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.ct-bullets textarea { min-height: var(--field-h); }
.ct-bullets textarea.is-over { border-color: var(--warn-dot); }
.ct-actions { gap: 8px; flex-wrap: wrap; margin-top: 0; }

.ct-checks { list-style: none; display: grid; }
.ct-check { display: grid; grid-template-columns: 12px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ct-check:first-child { border-top: 0; padding-top: 0; }
.ct-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--faint); }
.ct-check.is-ok .ct-dot { background: var(--ok-dot); box-shadow: 0 0 0 3px var(--ok-soft); }
.ct-check.is-warn .ct-dot { background: var(--warn-dot); box-shadow: 0 0 0 3px var(--warn-soft); }
.ct-check-label { color: var(--heading); font-weight: 600; }
.ct-check-detail { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ct-check.is-warn .ct-check-detail { color: var(--warn); }

.ct-versions { list-style: none; display: grid; gap: 8px; }
.ct-versions form { margin: 0; }
.ct-version-btn { justify-content: flex-start; gap: 10px; }
.ct-version-name { color: var(--heading); font-weight: 700; }
.ct-version-lang { color: var(--muted); font-weight: 500; }
.ct-version-btn .icon { margin-left: auto; color: var(--muted); }
.ct-version-link { display: inline-block; margin: 6px 0 2px 2px; font-size: 13px; font-weight: 600; }
.ct-versions + .ct-busy { margin-top: 12px; }

.ct-more { display: grid; gap: 14px; }
.ct-more form { margin: 0; display: grid; gap: 10px; }
.ct-delete { justify-items: center; }
.ct-delete .btn-text { border: 0; background: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }

.ct-input > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.ct-input > summary::-webkit-details-marker { display: none; }
.ct-input > summary .icon { margin-left: auto; width: 18px; height: 18px; color: var(--muted); transition: transform var(--t); }
.ct-input[open] > summary .icon { transform: rotate(180deg); }
.ct-input[open] > summary { margin-bottom: 14px; }
.ct-input .facts dd { overflow-wrap: anywhere; }
.ct-input-kop { margin-top: 14px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ct-input-list { margin: 6px 0 0 18px; color: var(--ink-2); display: grid; gap: 2px; }
.ct-input-text { margin-top: 6px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; max-height: 240px; overflow-y: auto; }

.ct-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ---------- Breder ---------- */

@media (min-width: 640px) {
  .ct-row { grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 16px; }
  .ct-before-after { grid-template-columns: 1fr auto 1fr; }
  .ct-ba-arrow { transform: none; }
}

@media (min-width: 1200px) {
  .ct-row { grid-template-columns: minmax(0, 2.4fr) 140px 110px 150px 150px; gap: 16px; }
  .grid-head.ct-row { display: grid; gap: 16px; }
  .ct-c-product { grid-column: auto; }
  .ct-c-taal { justify-self: start; font-size: 14px; }
  .ct-c-tijd { justify-self: start; font-size: 14px; }
}
