/* [cbtt_wishlist] + [cbtt_roadmap] — feature wishlist / roadmap voting.
   Card look mirrors cbtt-pricing's .cbtt-pricing-card (border, radius,
   shadow) so it feels consistent with the rest of the site, but under its
   own namespace since this isn't a pricing card.

   Colours: every value below goes through var(--cbtt-x, <original literal>)
   — never a bare hex. The literal is the exact colour this rule used before
   this pass, kept as the fallback for the two places tokens are not
   guaranteed to be defined: the notice bar renders on every admin screen
   (not just cbtt-scoped ones, see core/wishlist/wishlist-notice-bar.php),
   and the [cbtt_wishlist]/[cbtt_roadmap] frontend shortcodes are not in
   cbtt_suite_design_frontend_scope()'s trigger list, so cbtt-suite-tokens
   may simply not be enqueued on the page that shows them. With tokens
   present the whole file re-skins with the chosen design preset; without
   them it renders exactly as it always did.

   Left deliberately UNMAPPED (no var()): the five-state wishlist/roadmap
   status colours (.cbtt-wishlist-filter/-status, lines further down) and
   the disabled-vote grey are a fixed categorical palette, not brand
   colours — "new" is sky blue, "planned" is purple, "in progress" is
   amber, "done" is green, "rejected" is red, so the states stay visually
   distinct regardless of which design preset is active (same reasoning as
   --cbtt-available/--cbtt-preferred in design_tokens.php: deliberately its
   own tokens, not reused from success/warning). Green/amber/red already
   have a matching family and are tokenized below; sky-blue routes through
   --cbtt-info (the same blue in every preset since 2026-10-13, so "new" never
   turns orange or green with the brand); purple ("planned") has no equivalent token anywhere in the
   design system and stays literal. */

.cbtt-wishlist-form-collapsible {
    margin-bottom: 20px;
}

.cbtt-wishlist-form-collapsible > summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 16px 20px;
    background: var(--cbtt-primary, #003f86);
    color: var(--cbtt-on-primary, #ffffff);
    border: none;
    border-radius: 8px;
    list-style: none;
    transition: background 0.15s ease, transform 0.1s ease;
}

.cbtt-wishlist-form-collapsible > summary:hover {
    background: var(--cbtt-primary-hover, #002b57);
    transform: translateY(-1px);
}

.cbtt-wishlist-form-collapsible > summary::-webkit-details-marker {
    display: none;
}

.cbtt-wishlist-form-collapsible__icon {
    margin-right: 8px;
}

.cbtt-wishlist-form-collapsible > summary::after {
    content: '▶';
    display: inline-block;
    float: right;
    font-size: 0.75em;
    margin-top: 5px;
    transition: transform 0.15s ease;
}

.cbtt-wishlist-form-collapsible[open] > summary::after {
    transform: rotate(90deg);
}

.cbtt-wishlist-form {
    background: var(--cbtt-surface, #fff);
    border: 1px solid var(--cbtt-border, #e0e0e0);
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
}

.cbtt-wishlist-form textarea.is-placeholder {
    color: var(--cbtt-muted, #94a3b8);
    font-style: italic;
}

.cbtt-wishlist-form label {
    display: block;
    font-weight: 600;
    margin: 10px 0 4px;
}

.cbtt-wishlist-form input[type="text"],
.cbtt-wishlist-form input[type="email"],
.cbtt-wishlist-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--cbtt-border, #ccc);
    border-radius: 6px;
    box-sizing: border-box;
}

/* Product dropdown at the top of the form (Solver / Student Manager). */
.cbtt-wishlist-form select.cbtt-wishlist-product-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--cbtt-border, #ccc);
    border-radius: 6px;
    box-sizing: border-box;
    background: var(--cbtt-surface, #fff);
    margin-bottom: 4px;
}

/* Client-side validation: a required field left empty/unchosen on submit —
   marked red and scrolled into view (see validateForm in wishlist.js). */
.cbtt-wishlist-form input.cbtt-wishlist-invalid,
.cbtt-wishlist-form textarea.cbtt-wishlist-invalid,
.cbtt-wishlist-form select.cbtt-wishlist-invalid {
    border-color: var(--cbtt-error, #d63638) !important;
    box-shadow: 0 0 0 1px var(--cbtt-error, #d63638);
}

.cbtt-wishlist-char-counter {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--cbtt-muted, #94a3b8);
    margin-top: 2px;
}

/*
 * .cbtt-wishlist-bugbutton-notice's own styling moved to an inline <style>
 * printed alongside the markup itself (core/wishlist/bugreport-button.php,
 * cbtt_bugreport_button_admin_notice()) on 2026-08-23, when this stopped
 * being part of the [cbtt_wishlist] form (loaded via wp_enqueue_style() from
 * inside the shortcode callback) and became a real admin_notices callback --
 * which fires before the page body that used to enqueue this stylesheet, so
 * an external <link> here could lose the race on a slow load. See that
 * function for the current rules.
 */

.cbtt-wishlist-ai-consent-notice {
    font-size: 0.9rem;
    color: var(--cbtt-muted, #64748b);
    background: var(--cbtt-surface-alt, #f8fafc);
    border-radius: 6px;
    padding: 10px 12px;
    margin: 8px 0;
}

.cbtt-wishlist-ai-consent-toggle {
    display: block;
    font-weight: 600;
    margin: 4px 0 8px;
}

.cbtt-wishlist-privacy-notice {
    font-size: 0.85rem;
    color: var(--cbtt-muted, #64748b);
    background: var(--cbtt-surface-alt, #f8fafc);
    border-radius: 6px;
    padding: 10px 12px;
    margin: 10px 0;
}

.cbtt-wishlist-duplicate-notice {
    display: none;
    background: var(--cbtt-warning-tint, #fffbeb);
    border: 1px solid var(--cbtt-warning-tint, #fde68a);
    border-radius: 10px;
    padding: 16px;
    margin: 10px 0;
}

.cbtt-wishlist-duplicate-notice__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--cbtt-warning-ink, #92400e);
    margin-bottom: 10px;
}

.cbtt-wishlist-duplicate-notice__icon {
    font-size: 1.1rem;
}

.cbtt-wishlist-duplicate-notice__existing {
    background: var(--cbtt-surface, #fff);
    border: 1px solid var(--cbtt-warning-tint, #fde68a);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.cbtt-wishlist-duplicate-notice__title {
    font-weight: 600;
    margin-bottom: 4px;
}

.cbtt-wishlist-duplicate-notice__desc {
    font-size: 0.9rem;
    color: var(--cbtt-body, #555);
}

.cbtt-wishlist-duplicate-notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* "Already known" for a bug report also says "The developer has been
   notified." when the report was flagged as security-relevant. */
.cbtt-wishlist-duplicate-notice__note {
    margin: 0 0 10px;
}

/* A bug report taken in as a supplement to a known one (duplicate_merged)
   is a confirmation, not a "look here first": success colours instead of
   amber. Set and cleared by wishlist.js. */
.cbtt-wishlist-duplicate-notice--merged {
    background: var(--cbtt-success-tint, #ecfdf5);
    border-color: var(--cbtt-success, #a7f3d0);
}

.cbtt-wishlist-duplicate-notice--merged .cbtt-wishlist-duplicate-notice__header {
    color: var(--cbtt-success-ink, #065f46);
}

.cbtt-wishlist-btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cbtt-wishlist-btn--primary {
    border: 1px solid var(--cbtt-primary, #003f86);
    background: var(--cbtt-primary, #003f86);
    color: var(--cbtt-on-primary, #ffffff);
}

.cbtt-wishlist-btn--primary:hover {
    background: var(--cbtt-primary-hover, #002b57);
    border-color: var(--cbtt-primary-hover, #002b57);
}

.cbtt-wishlist-btn--secondary {
    border: 1px solid var(--cbtt-border, #d0d5dd);
    background: var(--cbtt-surface, #fff);
    color: var(--cbtt-body, #475569);
}

.cbtt-wishlist-btn--secondary:hover {
    background: var(--cbtt-surface-alt, #f1f5f9);
    border-color: var(--cbtt-border, #94a3b8);
}

.cbtt-wishlist-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.cbtt-wishlist-filter {
    border: 1px solid var(--cbtt-border, #d0d5dd);
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--cbtt-surface-alt, #f1f5f9);
    color: var(--cbtt-muted, #94a3b8);
}

/* Fixed categorical palette, not brand colours — see the file header. */
.cbtt-wishlist-filter.is-active.cbtt-wishlist-filter--neu        { background: var(--cbtt-info-tint, #e0f2fe); color: var(--cbtt-info-ink, #0369a1); border-color: var(--cbtt-info-tint, #bae6fd); }
.cbtt-wishlist-filter.is-active.cbtt-wishlist-filter--geplant    { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.cbtt-wishlist-filter.is-active.cbtt-wishlist-filter--in_arbeit  { background: var(--cbtt-warning-tint, #fef3c7); color: var(--cbtt-warning-ink, #b45309); border-color: var(--cbtt-warning-tint, #fde68a); }
.cbtt-wishlist-filter.is-active.cbtt-wishlist-filter--erledigt   { background: var(--cbtt-success-tint, #dcfce7); color: var(--cbtt-success-ink, #15803d); border-color: var(--cbtt-success, #bbf7d0); }
.cbtt-wishlist-filter.is-active.cbtt-wishlist-filter--abgelehnt  { background: var(--cbtt-error-tint, #fee2e2); color: var(--cbtt-error-ink, #b91c1c); border-color: var(--cbtt-error, #fecaca); }

/* Product filter (select) that leads the status filter row. */
.cbtt-wishlist-product-filter-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cbtt-muted, #64748b);
    margin-right: 4px;
}
.cbtt-wishlist-product-filter {
    border: 1px solid var(--cbtt-border, #d0d5dd);
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--cbtt-surface-alt, #f1f5f9);
    color: var(--cbtt-body, #334155);
    cursor: pointer;
}

/* Product badge on each list card, so the product is visible when the filter
   is on "all products". */
.cbtt-wishlist-card__product {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cbtt-body, #475569);
    background: var(--cbtt-surface-alt, #f1f5f9);
    border-radius: 10px;
    padding: 1px 8px;
}

.cbtt-wishlist-group-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cbtt-ink, #555);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 24px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--cbtt-border, #e0e0e0);
}

.cbtt-wishlist-group-heading:first-child {
    margin-top: 0;
}

.cbtt-wishlist-group-heading--done {
    color: var(--cbtt-success-ink, #15803d);
    border-bottom-color: var(--cbtt-success, #bbf7d0);
}

.cbtt-wishlist-group-heading--rejected {
    color: var(--cbtt-error-ink, #b91c1c);
    border-bottom-color: var(--cbtt-error, #fecaca);
}

/* Flat card per the suite's card recipe: surface + 1px border + radius-md,
   no shadow (see CLAUDE.md's Corporate-Design rules). */
.cbtt-wishlist-card,
.cbtt-roadmap-card {
    display: flex;
    gap: 12px;
    background: var(--cbtt-surface, #fff);
    border: 1px solid var(--cbtt-border, #e0e0e0);
    border-radius: var(--cbtt-radius-md, 8px);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.cbtt-wishlist-card__votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.cbtt-wishlist-vote {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 2px;
    color: var(--cbtt-muted, #64748b);
}

.cbtt-wishlist-vote:hover {
    color: var(--cbtt-primary, #003f86);
}

.cbtt-wishlist-vote--disabled,
.cbtt-wishlist-vote--disabled:hover {
    color: var(--cbtt-muted, #d1d5db);
    cursor: default;
}

.cbtt-wishlist-card__score,
.cbtt-roadmap-card__score {
    font-weight: 700;
    font-size: 1rem;
}

.cbtt-wishlist-card__title,
.cbtt-roadmap-card__title {
    font-weight: 600;
    margin-bottom: 4px;
}

.cbtt-wishlist-card__desc,
.cbtt-roadmap-card__desc {
    color: var(--cbtt-body, #444);
    font-size: 0.9rem;
}

.cbtt-wishlist-card__meta,
.cbtt-roadmap-card__meta {
    font-size: 0.8rem;
    color: var(--cbtt-muted, #94a3b8);
    margin-top: 6px;
}

.cbtt-wishlist-card__status,
.cbtt-roadmap-card__status {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cbtt-wishlist-comments {
    margin-top: 8px;
}

.cbtt-wishlist-comment {
    font-size: 0.85rem;
    background: var(--cbtt-surface-alt, #f8fafc);
    border-left: 3px solid var(--cbtt-primary, #003f86);
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 6px;
}

.cbtt-wishlist-comment__author {
    font-weight: 700;
    color: var(--cbtt-primary, #003f86);
}

.cbtt-wishlist-comment__date {
    color: var(--cbtt-muted, #94a3b8);
    font-size: 0.75rem;
}

.cbtt-wishlist-comment-form {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.cbtt-wishlist-comment-form input[type="text"] {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid var(--cbtt-border, #ccc);
    border-radius: 6px;
    font-size: 0.85rem;
}

.cbtt-wishlist-comment-form button {
    border: 1px solid var(--cbtt-primary, #003f86);
    background: var(--cbtt-surface, #fff);
    color: var(--cbtt-primary, #003f86);
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 0.85rem;
}

.cbtt-wishlist-comment-form button:hover {
    background: var(--cbtt-primary, #003f86);
    color: var(--cbtt-on-primary, #ffffff);
}

/* Fixed categorical palette, not brand colours — see the file header. */
.cbtt-wishlist-status--neu,        .cbtt-roadmap-status--neu        { background: var(--cbtt-info-tint, #e0f2fe); color: var(--cbtt-info-ink, #0369a1); }
.cbtt-wishlist-status--geplant,    .cbtt-roadmap-status--geplant    { background: #ede9fe; color: #6d28d9; }
.cbtt-wishlist-status--in_arbeit,  .cbtt-roadmap-status--in_arbeit  { background: var(--cbtt-warning-tint, #fef3c7); color: var(--cbtt-warning-ink, #b45309); }
.cbtt-wishlist-status--erledigt,   .cbtt-roadmap-status--erledigt   { background: var(--cbtt-success-tint, #dcfce7); color: var(--cbtt-success-ink, #15803d); }
.cbtt-wishlist-status--abgelehnt,  .cbtt-roadmap-status--abgelehnt  { background: var(--cbtt-error-tint, #fee2e2); color: var(--cbtt-error-ink, #b91c1c); }

.cbtt-wishlist-status-select {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    display: inline-block;
    padding: 1px 22px 1px 8px;
    border-radius: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 12px;
}

.cbtt-wishlist-status-select:focus {
    outline: 2px solid var(--cbtt-primary, #003f86);
    outline-offset: 1px;
}

.cbtt-roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.cbtt-roadmap-section h3 {
    margin-top: 24px;
}

/* Rendered via admin_notices, so it flows inline with the rest of the
   Solver's own admin screens like a normal WP admin notice — no fixed
   positioning, no pushing #wpadminbar/#adminmenuwrap/#wpcontent around.
   That avoids fighting other plugins' own sticky-chrome JS, which is what
   made the old fixed bar drift on non-Solver screens. */
.cbtt-wishlist-notice-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--cbtt-primary, #003f86);
    color: var(--cbtt-on-primary, #ffffff);
    padding: 10px 20px;
    box-sizing: border-box;
    border-left-color: var(--cbtt-primary, #003f86);
}

.cbtt-wishlist-notice-bar__main {
    flex: 1;
    min-width: 220px;
}

.cbtt-wishlist-notice-bar__heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-bottom: 2px;
}

.cbtt-wishlist-notice-bar__prompt {
    font-size: 0.85rem;
    opacity: 0.95;
}

.cbtt-wishlist-notice-bar__suggestion {
    font-weight: 600;
    font-size: 1rem;
    margin-top: 2px;
}

.cbtt-wishlist-notice-bar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cbtt-wishlist-notice-bar .cbtt-wishlist-btn--primary {
    border-color: var(--cbtt-on-primary, #fff);
    background: var(--cbtt-on-primary, #fff);
    color: var(--cbtt-primary, #003f86);
}

.cbtt-wishlist-notice-bar .cbtt-wishlist-btn--primary:hover {
    background: var(--cbtt-primary-tint, #e0f2fe);
}

.cbtt-wishlist-notice-bar .cbtt-wishlist-btn--secondary {
    border-color: rgba(255, 255, 255, 0.6);
    background: transparent;
    color: var(--cbtt-on-primary, #ffffff);
}

.cbtt-wishlist-notice-bar .cbtt-wishlist-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--cbtt-on-primary, #fff);
}

/* ── Kind selector: feature suggestion vs bug report ──────────────────────
   Two big click targets rather than a <select>, because the choice decides
   whether the entry becomes public — it should be obvious what is selected,
   not hidden in a collapsed dropdown. */

.cbtt-wishlist-kind {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.cbtt-wishlist-kind__option {
    flex: 1 1 200px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid var(--cbtt-border, #e0e0e0);
    border-radius: 8px;
    cursor: pointer;
    background: var(--cbtt-surface, #fff);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.cbtt-wishlist-kind__option:hover {
    border-color: var(--cbtt-muted, #b8b8b8);
    background: var(--cbtt-surface-alt, #fafafa);
}

.cbtt-wishlist-kind__option:has(input:checked) {
    border-color: var(--cbtt-primary, #003f86);
    background: var(--cbtt-primary-tint, #f0f8fc);
}

/* The bug tab reads red once selected — a different destination for the
   data (private, straight to the developer), not just a different form. */
.cbtt-wishlist-kind__option:has(input[value="bug"]:checked) {
    border-color: var(--cbtt-error, #d63638);
    background: var(--cbtt-error-tint, #fdf3f3);
}

/* :has() is unsupported on older browsers; .is-checked is set by no JS here,
   so fall back to outlining the focused radio instead of leaving no cue. */
.cbtt-wishlist-kind__option:focus-within {
    outline: 2px solid var(--cbtt-primary, #003f86);
    outline-offset: 2px;
}

.cbtt-wishlist-kind__option input {
    margin: 3px 0 0 0;
    flex-shrink: 0;
}

.cbtt-wishlist-kind__icon {
    font-size: 1.3rem;
    line-height: 1.2;
}

.cbtt-wishlist-kind__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cbtt-wishlist-kind__title {
    font-weight: 600;
}

.cbtt-wishlist-kind__hint {
    font-size: 0.8rem;
    color: var(--cbtt-muted, #666);
}

/* ── Bug report: log attachment + preview ─────────────────────────────── */

.cbtt-wishlist-log {
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid var(--cbtt-border, #e0e0e0);
    border-left: 3px solid var(--cbtt-error, #d63638);
    border-radius: 6px;
    background: var(--cbtt-surface-alt, #fafafa);
}

.cbtt-wishlist-log__toggle {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}

.cbtt-wishlist-log__note {
    margin: 8px 0 10px 24px;
    font-size: 0.85rem;
    color: var(--cbtt-muted, #666);
    line-height: 1.5;
}

/* Beide Vorschauen teilen sich eine Regel: die im Formular und die im
   Klaerungs-Chat zeigen denselben Text (gleicher AJAX-Handler, gleicher
   serverseitiger Bauplatz), also sollen sie auch gleich aussehen. Dark
   "console" look kept literal on purpose — a fixed code/log theme, not a
   place the brand palette should reach into. */
.cbtt-wishlist-log__preview,
.cbtt-wishlist-chat__log-preview {
    margin-top: 10px;
    padding: 10px;
    max-height: 320px;
    overflow: auto;
    background: #1d2327;
    color: #e2e4e7;
    border-radius: 6px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.75rem;
    line-height: 1.45;
    /* Log lines are long and must not stretch the form — scroll inside the
       box instead of wrapping mid-token, which makes them unreadable. */
    white-space: pre;
    tab-size: 4;
}

.cbtt-wishlist-privacy-notice__bug {
    display: block;
}

/* ── Bounty section + security pointer ────────────────────────────────────
   Both sit above the kind selector. The bounty block is a plain <details>
   like the form collapsible; the security note underneath is deliberately
   set apart (red accent, own box) so it does not read as a footnote to the
   figures above it — it is the one paragraph on this form that must not be
   skimmed. */

.cbtt-wishlist-bounty {
    margin: 10px 0;
    padding: 10px 12px;
    background: var(--cbtt-success-tint, #f0fdf4);
    border: 1px solid var(--cbtt-success, #bbf7d0);
    border-radius: 8px;
    font-size: 0.9rem;
}

.cbtt-wishlist-bounty > summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.cbtt-wishlist-bounty > summary::-webkit-details-marker {
    display: none;
}

.cbtt-wishlist-bounty__icon {
    margin-right: 4px;
}

.cbtt-wishlist-bounty p {
    margin: 8px 0 0;
    line-height: 1.5;
    color: var(--cbtt-body, #334155);
}

.cbtt-wishlist-security-note {
    margin: 10px 0 14px;
    padding: 10px 12px;
    background: var(--cbtt-error-tint, #fef2f2);
    border-left: 3px solid var(--cbtt-error, #d63638);
    border-radius: 6px;
    font-size: 0.9rem;
}

.cbtt-wishlist-security-note p {
    margin: 0 0 6px;
    line-height: 1.5;
}

.cbtt-wishlist-security-note p:last-child {
    margin-bottom: 0;
}

/* ── Hall of Fame opt-in + withdrawal ─────────────────────────────────── */

.cbtt-wishlist-hof {
    margin: 12px 0;
    padding: 10px 12px;
    background: var(--cbtt-surface-alt, #f8fafc);
    border-radius: 6px;
}

.cbtt-wishlist-hof__toggle {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}

.cbtt-wishlist-hof__name-label {
    display: block;
    margin: 10px 0 4px;
}

/* Disabled while the box is unticked — greyed out so the dependency is
   visible, not just described. */
.cbtt-wishlist-hof__name:disabled {
    background: var(--cbtt-border-soft, #e2e8f0);
    color: var(--cbtt-muted, #94a3b8);
    cursor: not-allowed;
}

.cbtt-wishlist-hof__note {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--cbtt-muted, #64748b);
    line-height: 1.5;
}

.cbtt-wishlist-hof-optout {
    margin: 24px 0 0;
    padding: 10px 12px;
    border-top: 1px solid var(--cbtt-border-soft, #e2e8f0);
    font-size: 0.85rem;
    color: var(--cbtt-muted, #64748b);
}

.cbtt-wishlist-hof-optout p {
    margin: 0 0 8px;
    line-height: 1.5;
}

.cbtt-wishlist-hof-optout__status {
    margin-left: 8px;
}

/* ── AI clarification chat ──────────────────────────────────────────────────
   The assistant that helps someone turn "somehow cancelling a lesson didn't
   work" into a report a developer can act on. It proposes text for the form
   above; it never submits anything.

   Palette matches the rest of this file (slate greys, #2271b1 WP blue) — the
   chat is a part of the form, not a widget bolted onto it. */

.cbtt-wishlist-chat {
    margin: 16px 0;
    border: 1px solid var(--cbtt-border, #cbd5e1);
    border-radius: 6px;
    background: var(--cbtt-surface-alt, #f8fafc);
}

.cbtt-wishlist-chat > summary {
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cbtt-wishlist-chat__icon {
    font-size: 1.1rem;
}

/* The disclosure. Required by AI Act Art. 50(1), so it is styled to be read,
   not to be skipped: full contrast, never collapsed, never "show more". */
.cbtt-wishlist-chat__disclosure {
    margin: 0 12px 12px;
    padding: 10px 12px;
    border-left: 3px solid var(--cbtt-primary, #2271b1);
    background: var(--cbtt-surface, #fff);
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--cbtt-body, #334155);
}

.cbtt-wishlist-chat__disclosure-title {
    margin: 0 0 6px;
    font-weight: 600;
    color: var(--cbtt-ink, #0f172a);
}

.cbtt-wishlist-chat__disclosure ul {
    margin: 0;
    padding-left: 18px;
}

.cbtt-wishlist-chat__disclosure li {
    margin: 3px 0;
}

.cbtt-wishlist-chat__skip,
.cbtt-wishlist-chat__consent,
.cbtt-wishlist-chat__panel {
    margin: 0 12px 12px;
}

.cbtt-wishlist-chat__consent-toggle {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 600;
    line-height: 1.4;
}

.cbtt-wishlist-chat__consent-note {
    margin: 6px 0 0 24px;
    font-size: 0.85rem;
    color: var(--cbtt-muted, #64748b);
    line-height: 1.5;
}

/* Messenger layout, on purpose. Reported from a phone 2026-08-17: the reply
   arrived ABOVE the visible screen, so the conversation looked dead. Two
   causes, both fixed here — the transcript grew instead of scrolling, and it
   had no shape that told anyone where to look.

   The chosen shape is the one nobody has to learn: own message right and
   tinted, assistant left and white, newest at the bottom, input underneath.
   That is WhatsApp's arrangement, and it is what people already read fluently.
   What is NOT copied is the labelling: every bubble keeps its written role
   ("You" / "Assistant (AI)"). A messenger can rely on you knowing who you
   wrote to; here the whole point is that the other side is a machine, and
   AI Act Art. 50 wants that stated, not implied by a colour. */
.cbtt-wishlist-chat__transcript {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* min() so the box shrinks on a phone instead of pushing the composer off
       screen — the failure being fixed. 55vh leaves room for the on-screen
       keyboard, which eats roughly the lower third. */
    min-height: 9rem;
    max-height: min(26rem, 55vh);
    overflow-y: auto;
    /* Scrolling to the newest message must not drag the whole page with it. */
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    padding: 12px;
    border: 1px solid var(--cbtt-border-soft, #e2e8f0);
    border-radius: 8px;
    background: var(--cbtt-surface-alt, #f6f7f9);
}

.cbtt-wishlist-chat__transcript:empty {
    display: none;
}

.cbtt-wishlist-chat__msg {
    max-width: 85%;
    margin: 0;
    padding: 8px 12px;
    border-radius: 12px;
}

/* The square corner on the side the bubble "comes from" — the messenger tail,
   minus the pointer. Cheap, and it is most of what makes the direction read at
   a glance. */
.cbtt-wishlist-chat__msg--user {
    align-self: flex-end;
    background: var(--cbtt-primary-tint, #dbeafe);
    border-bottom-right-radius: 4px;
}

.cbtt-wishlist-chat__msg--assistant {
    align-self: flex-start;
    background: var(--cbtt-surface, #fff);
    border-bottom-left-radius: 4px;
}

/* Waiting state as a bubble in the assistant's place, not as a line of text
   somewhere else: the answer will appear exactly here, and the eye is already
   there when it does. The status text next to the composer stays as well —
   it is what a screen reader announces. */
.cbtt-wishlist-chat__typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    background: var(--cbtt-surface, #fff);
}

.cbtt-wishlist-chat__typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cbtt-muted, #94a3b8);
    animation: cbtt-wishlist-typing 1.2s infinite ease-in-out;
}

.cbtt-wishlist-chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.cbtt-wishlist-chat__typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes cbtt-wishlist-typing {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30%           { opacity: 1;   transform: translateY(-3px); }
}

/* Motion is decoration here; the dots stay visible without it. */
@media (prefers-reduced-motion: reduce) {
    .cbtt-wishlist-chat__typing span { animation: none; opacity: 0.6; }
    .cbtt-wishlist-chat__transcript { scroll-behavior: auto; }
}

/* The role label is TEXT and always rendered — colour alone is not a label
   every reader receives, and AI Act Art. 50 is about people knowing, not
   about the interface hinting. */
.cbtt-wishlist-chat__msg-role {
    display: block;
    margin-bottom: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--cbtt-muted, #64748b);
}

.cbtt-wishlist-chat__msg-body {
    white-space: pre-wrap;
    line-height: 1.5;
}

/* The plugin's own voice in the conversation: full width, centred, no bubble
   tail and no role label — the messenger convention for "this is the app
   talking". It must not read as something the assistant said, which is why it
   looks different from both bubbles rather than like a third speaker. */
.cbtt-wishlist-chat__notice {
    align-self: stretch;
    margin: 4px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--cbtt-success-tint, #ecfdf5);
    border: 1px solid var(--cbtt-success, #a7f3d0);
    text-align: center;
}

.cbtt-wishlist-chat__notice-main {
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
    color: var(--cbtt-success-ink, #065f46);
}

.cbtt-wishlist-chat__notice-hint {
    margin: 4px 0 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--cbtt-success-ink, #047857);
}

/* Survives scrolling and screenshots, which a one-off notice at the top of
   the conversation does not. */
.cbtt-wishlist-chat__ai-footnote {
    margin: 6px 0 10px;
    font-size: 0.78rem;
    color: var(--cbtt-muted, #64748b);
    font-style: italic;
}

.cbtt-wishlist-chat__error {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-left: 3px solid var(--cbtt-error, #b32d2e);
    background: var(--cbtt-error-tint, #fef2f2);
    line-height: 1.5;
}

.cbtt-wishlist-chat__error p {
    margin: 0 0 6px;
}

.cbtt-wishlist-chat__fallback {
    font-size: 0.85rem;
    color: var(--cbtt-muted, #64748b);
}

.cbtt-wishlist-chat__composer {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    margin-top: 10px;
}

/* min-width small enough that field and button stay on ONE row down to a
   320px screen. At 14rem the button wrapped underneath on a phone, which put
   the thing you press next after typing one more scroll-length away. */
.cbtt-wishlist-chat__input {
    flex: 1 1 8rem;
    min-width: 8rem;
    resize: vertical;
    border-radius: 8px;
    /* iOS Safari zooms the page when a focused field is under 16px, and the
       zoom does not come back — the conversation would then sit half off
       screen for the rest of the visit. */
    font-size: 16px;
}

.cbtt-wishlist-chat__send {
    flex: 0 0 auto;
}

.cbtt-wishlist-chat__status {
    flex-basis: 100%;
    font-size: 0.85rem;
    color: var(--cbtt-muted, #64748b);
}

.cbtt-wishlist-chat__log {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px dashed var(--cbtt-border, #cbd5e1);
    border-radius: 4px;
    background: var(--cbtt-surface, #fff);
}

.cbtt-wishlist-chat__log-toggle {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.cbtt-wishlist-chat__log-note {
    margin: 6px 0 0 24px;
    font-size: 0.82rem;
    color: var(--cbtt-muted, #64748b);
    line-height: 1.5;
}

.cbtt-wishlist-chat__draft {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--cbtt-primary, #2271b1);
    border-radius: 4px;
    background: var(--cbtt-surface, #fff);
}

.cbtt-wishlist-chat__draft-title {
    margin: 0 0 4px;
    font-weight: 700;
    color: var(--cbtt-ink, #0f172a);
}

.cbtt-wishlist-chat__draft-note {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: var(--cbtt-muted, #64748b);
    line-height: 1.5;
}

.cbtt-wishlist-chat__draft-preview {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 4px;
    background: var(--cbtt-surface-alt, #f8fafc);
    white-space: pre-wrap;
    line-height: 1.5;
}

.cbtt-wishlist-chat__draft-preview strong {
    display: block;
    margin-bottom: 4px;
}

.cbtt-wishlist-chat__draft-confirm {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--cbtt-border-soft, #e2e8f0);
}

.cbtt-wishlist-chat__draft-confirm p {
    margin: 0 0 6px;
}

.cbtt-wishlist-chat__draft-confirm .button {
    margin-right: 6px;
}

/* Provenance badge under the title and description. Deliberately NOT removed
   when the user edits the text — the wording changes instead. Where a report
   came from is not a question of word-for-word sameness, and the operator
   reading it needs to know. */
.cbtt-wishlist-ai-badge {
    margin: 4px 0 10px;
    font-size: 0.82rem;
    color: var(--cbtt-warning-ink, #7c5800);
    background: var(--cbtt-warning-tint, #fffbeb);
    border-left: 3px solid var(--cbtt-warning, #d97706);
    padding: 5px 8px;
    line-height: 1.45;
}

.cbtt-wishlist-chat-consent-centre {
    margin: 24px 0 0;
    padding: 10px 12px;
    border-top: 1px solid var(--cbtt-border-soft, #e2e8f0);
    font-size: 0.85rem;
    color: var(--cbtt-muted, #64748b);
}

.cbtt-wishlist-chat-consent-centre .cbtt-wishlist-chat__consent-note {
    margin-left: 24px;
}

.cbtt-wishlist-chat__consent-status {
    margin-left: 8px;
}

.cbtt-wishlist-chat__log-reveal {
    margin: 8px 0 0 24px;
}
