/* public/assets/css/feedback.css
   Stili per la feature Feedback (beta tester).
   Estende il pattern editoriale di mentor.css con primitive specifiche:
   - .feedback-cats: gruppo di radio chip per la categoria (custom styled, niente radio nativo)
   - .feedback-cat:  badge categoria (display-only, varianti per bug/suggestion/opinion/other)
   - .feedback-status: badge stato thread (open/answered/closed)
*/

/* ─────────────────────────────────────────────────────
   Category radio chip group
   Nativo invisibile, chip stilato che reagisce a :checked / :hover / :focus-visible.
   ───────────────────────────────────────────────────── */
.feedback-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.feedback-cat-option {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    user-select: none;
}

.feedback-cat-option input[type="radio"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.feedback-cat-option .feedback-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--wardrobe-surface-2);
    border: 1px solid var(--wardrobe-border-strong);
    color: var(--wardrobe-ink-muted);
    font-family: var(--font-inter, inherit);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
    transition: background 200ms ease-out, border-color 200ms ease-out, color 200ms ease-out;
}

.feedback-cat-option:hover .feedback-cat-chip {
    color: var(--wardrobe-ink);
    border-color: var(--wardrobe-ink-muted);
}

.feedback-cat-option input[type="radio"]:focus-visible + .feedback-cat-chip {
    outline: 2px solid hsl(var(--gold));
    outline-offset: 2px;
}

.feedback-cat-option input[type="radio"]:checked + .feedback-cat-chip {
    background: hsla(var(--gold) / 0.14);
    border-color: hsl(var(--gold));
    color: hsl(var(--gold));
}

/* ─────────────────────────────────────────────────────
   Category badge (display-only, used in lists and threads)
   ───────────────────────────────────────────────────── */
.feedback-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--wardrobe-border-strong);
    background: var(--wardrobe-surface-2);
    color: var(--wardrobe-ink-muted);
    font-family: var(--font-inter, inherit);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.feedback-cat--bug {
    color: hsl(0 60% 72%);
    border-color: hsla(0 60% 60% / 0.4);
    background: hsla(0 60% 50% / 0.06);
}

.feedback-cat--suggestion {
    color: hsl(var(--gold));
    border-color: hsla(var(--gold) / 0.42);
    background: hsla(var(--gold) / 0.08);
}

.feedback-cat--opinion {
    color: hsl(210 35% 78%);
    border-color: hsla(210 30% 60% / 0.32);
    background: hsla(210 30% 50% / 0.05);
}

.feedback-cat--other {
    color: var(--wardrobe-ink-muted);
    border-color: var(--wardrobe-border-strong);
    background: var(--wardrobe-surface-2);
}

/* ─────────────────────────────────────────────────────
   Status badge (open / answered / closed)
   ───────────────────────────────────────────────────── */
.feedback-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-inter, inherit);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.feedback-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.feedback-status--open {
    color: hsl(var(--gold));
    background: hsla(var(--gold) / 0.1);
    border-color: hsla(var(--gold) / 0.3);
}

.feedback-status--answered {
    color: hsl(145 45% 72%);
    background: hsla(145 50% 45% / 0.08);
    border-color: hsla(145 45% 50% / 0.32);
}

.feedback-status--closed {
    color: var(--wardrobe-ink-muted);
    background: var(--wardrobe-surface-2);
    border-color: var(--wardrobe-border-strong);
}

/* ─────────────────────────────────────────────────────
   Inline "Team" badge for admin replies in user thread
   ───────────────────────────────────────────────────── */
.feedback-team-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: hsla(var(--gold) / 0.16);
    color: hsl(var(--gold));
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.4;
}

/* ─────────────────────────────────────────────────────
   List item: unread admin count pill
   ───────────────────────────────────────────────────── */
.feedback-list__unread {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: hsla(var(--gold) / 0.16);
    color: hsl(var(--gold));
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.feedback-list__unread::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: hsl(var(--gold));
}

/* ─────────────────────────────────────────────────────
   Closed-thread notice
   ───────────────────────────────────────────────────── */
.feedback-closed-notice {
    margin: 32px 0 0;
    padding: 20px 24px;
    border: 1px dashed var(--wardrobe-border-strong);
    border-radius: var(--wardrobe-radius, 10px);
    background: var(--wardrobe-surface-2);
    color: var(--wardrobe-ink-muted);
    font-size: 14px;
    text-align: center;
}

/* ─────────────────────────────────────────────────────
   Reduced motion
   ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .feedback-cat-option .feedback-cat-chip { transition: none; }
}
