/* Feedback board (/feedback).
   Same light system as the chat: one white panel on the #e9e9e9 page, the
   .ddg-box border stack, #eba133 for anything interactive. */

.fb {
    --fb-accent: #eba133;
    --fb-accent-dark: #c9821a;
    --fb-rule: #e5e6e9;
    --fb-soft: #f2f2f4;
    --fb-ink: #3f3f45;
    --fb-dim: #8b8b90;
    --fb-faint: #b0b0b6;

    max-width: 900px;
    /* Clear of the site header, matching the chat. */
    margin: 18px auto 40px;
    color: var(--fb-ink);
}

/* The header, tabs and list live inside one card. Floating separately on the
   page background they read as three unrelated things rather than one board. */
.fb-panel {
    background: #fff;
    border: 1px solid;
    border-color: var(--fb-rule) #dfe0e4 #d0d1d5;
    border-radius: 8px;
    overflow: hidden;
}

/* ── Header bar ───────────────────────────────────────────── */

.fb-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--fb-rule);
    background: linear-gradient(180deg, #fffdfa 0%, #fff 100%);
}
.fb-bar-text { min-width: 0; }

/* text-align is explicit because the theme centres headings further up. */
.fb-h1 {
    margin: 0 0 2px;
    color: #2f2f34;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}
.fb-sub { margin: 0; color: var(--fb-dim); font-size: 12.5px; text-align: left; }

.fb-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 8px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--fb-accent);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
}
.fb-new-btn:hover, .fb-new-btn:focus { background: #d99327; color: #fff; text-decoration: none; }
.fb-new-btn .fa { font-size: 11px; }

/* ── Filing form ──────────────────────────────────────────── */

.fb-form {
    padding: 16px 20px;
    border-bottom: 1px solid var(--fb-rule);
    background: #fcfcfd;
}
.fb-form[hidden] { display: none !important; }

.fb-form-row { display: flex; gap: 10px; margin-bottom: 9px; }

.fb-kind { display: flex; gap: 6px; flex: 0 0 auto; }

/* The native radio is hidden and the label is the control. Left visible it
   shows a stray OS dot inside a pill that is already saying the same thing. */
.fb-kind input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.fb-kind label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid #d8d8dd;
    border-radius: 8px;
    background: #fff;
    color: var(--fb-dim);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.fb-kind label:hover { border-color: #c9c9ce; color: var(--fb-ink); }
.fb-kind label .fa { font-size: 12px; }

/* :has() plus a class the form's own change handler sets, so the selected
   state never depends on selector support alone. */
.fb-kind label:has(input:checked),
.fb-kind label.is-checked {
    border-color: var(--fb-accent);
    background: #fdf8f0;
    color: var(--fb-accent-dark);
}

.fb-input {
    flex: 1 1 auto;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d8d8dd;
    border-radius: 8px;
    background: #fff;
    color: var(--fb-ink);
    font-size: 14px;
}
.fb-input:focus {
    outline: none;
    border-color: var(--fb-accent);
    box-shadow: 0 0 0 3px rgba(235, 161, 51, 0.14);
}
.fb-textarea { resize: vertical; line-height: 1.55; min-height: 74px; }

.fb-form-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* The file input is replaced by its own label; `hidden` alone loses to any
   theme rule that gives inputs a display, and the browser's "Choose File —
   no file chosen" then sits next to the styled control saying the same thing
   twice. */
.fb-form input[type="file"],
.fb-attach input[type="file"] {
    display: none !important;
}
.fb-attach {
    display: inline-flex;
    align-items: center;
    margin: 0;
    color: var(--fb-dim);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.fb-attach span { display: inline-flex; align-items: center; gap: 6px; }
.fb-attach:hover { color: var(--fb-accent-dark); }

.fb-thumbs { display: flex; gap: 6px; flex: 1 1 auto; }
.fb-thumb {
    width: 38px; height: 38px;
    border: 1px solid var(--fb-rule);
    border-radius: 6px;
    overflow: hidden;
}
.fb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-thumb.is-working { opacity: 0.5; }

.fb-form-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.fb-cancel {
    padding: 8px 12px;
    border: 0;
    background: none;
    color: var(--fb-dim);
    font-size: 13.5px;
    cursor: pointer;
}
.fb-cancel:hover { color: var(--fb-ink); }
.fb-submit {
    padding: 8px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--fb-accent);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}
.fb-submit:hover:not(:disabled) { background: #d99327; }
.fb-submit:disabled { opacity: 0.5; cursor: default; }

.fb-error {
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #fdf1ef;
    color: #b4503a;
    font-size: 13.5px;
}
.fb-error[hidden] { display: none !important; }

/* ── Tabs ─────────────────────────────────────────────────── */

.fb-tabs {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--fb-rule);
    background: #fcfcfd;
    flex-wrap: wrap;
}
.fb-tabs-spacer { flex: 1 1 auto; }

.fb-tab, .fb-filter {
    padding: 5px 11px;
    border-radius: 14px;
    color: var(--fb-dim);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.fb-tab:hover, .fb-filter:hover { background: var(--fb-soft); color: var(--fb-ink); text-decoration: none; }
.fb-tab.is-active, .fb-filter.is-active {
    background: #fdf8f0;
    color: var(--fb-accent-dark);
    text-decoration: none;
}
.fb-tab-count {
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 9px;
    background: var(--fb-soft);
    color: var(--fb-dim);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}
.fb-tab.is-active .fb-tab-count { background: #f6e6cc; color: var(--fb-accent-dark); }
.fb-filter { font-size: 12.5px; font-weight: 500; }

/* ── Items ────────────────────────────────────────────────── */

/* Rows separated by hairlines, not a stack of floating cards: inside a panel
   the cards-in-a-card look is what makes a board feel cluttered. */
.fb-item {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--fb-soft);
    transition: background 0.12s;
}
.fb-item:last-child { border-bottom: 0; }
.fb-item:hover { background: #fcfcfd; }
.fb-item:target { background: #fffcf6; box-shadow: inset 3px 0 0 var(--fb-accent); }

.fb-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 34px;
}
.fb-vote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 20px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: none;
    color: var(--fb-faint);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.fb-vote .fa { line-height: 1; }
.fb-vote:hover:not(:disabled) { background: var(--fb-soft); color: var(--fb-ink); }
.fb-vote:disabled { cursor: default; opacity: 0.35; }
.fb-up.is-mine { color: #3f8b62; background: #e4f3ea; }
.fb-down.is-mine { color: #b4503a; background: #fbe6e1; }

.fb-score {
    padding: 1px 0;
    color: var(--fb-ink);
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}
.fb-score.is-positive { color: #3f8b62; }
.fb-score.is-negative { color: #b4503a; }

.fb-body { flex: 1 1 auto; min-width: 0; }
.fb-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fb-title {
    margin: 0;
    color: #2f2f34;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
}

.fb-type {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.fb-type.is-bug { background: #fbe6e1; color: #b4503a; }
.fb-type.is-feature { background: #e6eef8; color: #4169e1; }

.fb-text {
    margin: 5px 0 0;
    color: var(--fb-dim);
    font-size: 13.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.fb-shots { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.fb-shots img {
    width: 80px; height: 58px;
    object-fit: cover;
    border: 1px solid var(--fb-rule);
    border-radius: 6px;
    display: block;
}
.fb-shots a:hover img { border-color: var(--fb-accent); }

.fb-note {
    margin: 9px 0 0;
    padding: 8px 11px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.55;
}
.fb-note.is-resolved { background: #e4f3ea; color: #34694e; }
.fb-note.is-declined { background: var(--fb-soft); color: var(--fb-dim); }

.fb-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--fb-faint);
    font-size: 12px;
    flex-wrap: wrap;
}
.fb-from-chat { color: var(--fb-accent-dark); }

.fb-admin { display: flex; gap: 4px; margin-left: auto; }
.fb-settle {
    padding: 3px 9px;
    border: 1px solid var(--fb-rule);
    border-radius: 12px;
    background: #fff;
    color: var(--fb-dim);
    font-size: 11.5px;
    cursor: pointer;
}
.fb-settle:hover { border-color: var(--fb-accent); color: var(--fb-accent-dark); }
.fb-settle.is-hide:hover { border-color: #d9705c; color: #b4503a; }

/* ── Empty state ──────────────────────────────────────────── */

/* Compact. The previous version was a 200px white void with two lines of
   small text floating in the middle of it. */
.fb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 44px 20px 48px;
    color: var(--fb-dim);
    font-size: 13.5px;
    text-align: center;
}
.fb-empty .fa { margin-bottom: 6px; color: #d8d8dd; font-size: 30px; }
.fb-empty strong { color: var(--fb-ink); font-size: 15.5px; font-weight: 600; }
.fb-empty-btn {
    margin-top: 12px;
    padding: 8px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--fb-accent);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}
.fb-empty-btn:hover { background: #d99327; }

.fb-pager { margin-top: 14px; text-align: center; }

@media (max-width: 640px) {
    .fb { margin-top: 10px; }
    .fb-bar { flex-direction: column; align-items: stretch; gap: 10px; }
    .fb-new-btn { justify-content: center; }
    .fb-form-row { flex-direction: column; }
    .fb-item { padding: 12px 14px; gap: 10px; }
    .fb-tabs { padding: 8px 10px; }
}
