/* ─── Feature Request / Bug Report Modal (standalone) ──────────────────
   Self-contained styles for the feedback modal so it can be loaded by
   both the trading dashboard and the /performance page. The trading
   dashboard already has matching .modal-overlay / .modal / .btn-ghost /
   .btn-ac / .muted rules in app.css, so this stylesheet's defaults are
   safely shadowed by the more specific app.css rules where present.

   On /performance, where those base classes don't exist, the rules
   below provide a working fallback that visually matches the rest of
   the page (uses the same CSS custom properties).
   ────────────────────────────────────────────────────────────────────── */

/* Base modal scaffold (only effective if the host page hasn't already
   defined .modal-overlay / .modal). */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center;z-index:10000}
.modal-overlay.hidden{display:none}
.modal{background:var(--sf);border:1px solid var(--bd);border-radius:12px;padding:20px;width:400px;max-width:95vw;max-height:90vh;overflow-y:auto;color:var(--tx)}
.modal h2{font-size:16px;margin:0 0 4px}
.modal textarea{width:100%;padding:8px;background:var(--bg);border:1px solid var(--bd);border-radius:6px;color:var(--tx);font-size:11px;font-family:monospace;resize:vertical;min-height:100px;outline:none;box-sizing:border-box}
.modal .muted{color:var(--mt)}

/* Generic button fallbacks used inside the modal — only matter on
   pages that don't already define .btn-ghost / .btn-ac. */
.feature-req-modal .btn{padding:5px 10px;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:all .1s}
.feature-req-modal .btn:hover{filter:brightness(1.1)}
.feature-req-modal .btn:disabled{opacity:.4;cursor:default}
.feature-req-modal .btn-ghost{background:transparent;border:1px solid var(--bd);color:var(--mt)}
.feature-req-modal .btn-ghost:hover{border-color:var(--mt);color:var(--tx)}
.feature-req-modal .btn-ac{background:var(--ac);color:#fff}
.feature-req-modal .btn-ac:hover{filter:brightness(1.1)}

/* Modal sizing + form layout (trading-dashboard-equivalent). */
.feature-req-modal{width:min(620px,95vw);padding:22px}
.feature-req-modal h2{font-size:18px;margin:0 0 4px}
.feature-req-modal textarea{font-family:inherit;font-size:13px;min-height:110px;line-height:1.5}
.fr-type-row{display:flex;gap:10px;margin-bottom:14px}
.fr-type-opt{flex:1;cursor:pointer;display:block}
.fr-type-opt input{position:absolute;opacity:0;width:0;height:0}
.fr-type-pill{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px;border:1px solid var(--bd);border-radius:8px;font-size:13px;font-weight:600;color:var(--mt);background:var(--bg);transition:border-color .12s,color .12s,background .12s}
.fr-type-opt input:checked + .fr-type-feature{border-color:rgba(99,102,241,.7);color:#a5b4fc;background:rgba(99,102,241,.08)}
.fr-type-opt input:checked + .fr-type-bug{border-color:rgba(239,68,68,.7);color:#fca5a5;background:rgba(239,68,68,.08)}
.fr-paste-hint{margin-top:10px;padding:14px;border:1px dashed var(--bd);border-radius:8px;text-align:center;font-size:12px;color:var(--mt);background:rgba(0,0,0,.15)}
.fr-paste-hint.dragover{border-color:var(--ac);color:var(--tx);background:rgba(99,102,241,.1)}
.fr-attachments{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;margin-top:10px}
.fr-attachments:empty{display:none}
.fr-thumb{position:relative;border:1px solid var(--bd);border-radius:6px;overflow:hidden;background:var(--bg);aspect-ratio:4/3;display:flex;align-items:center;justify-content:center}
.fr-thumb img{max-width:100%;max-height:100%;display:block}
.fr-thumb-rm{position:absolute;top:4px;right:4px;background:rgba(0,0,0,.7);color:#fff;border:none;border-radius:50%;width:22px;height:22px;font-size:14px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}
.fr-thumb-rm:hover{background:var(--rd)}
.fr-error{margin-top:10px;padding:8px 12px;border-radius:6px;background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.4);color:#fca5a5;font-size:12px}
.fr-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.fr-history{max-height:240px;overflow-y:auto;display:flex;flex-direction:column;gap:8px}
.fr-history-item{padding:10px 12px;border:1px solid var(--bd);border-radius:8px;background:var(--bg)}
.fr-history-item-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.fr-history-item-desc{font-size:12px;color:var(--tx);white-space:pre-wrap;word-break:break-word;line-height:1.4}
.fr-history-item-meta{font-size:10px;color:var(--mt);margin-top:4px}
.fr-history-item.fr-status-deleted .fr-history-item-desc{text-decoration:line-through;opacity:.6}
.fr-status-pill{font-size:10px;font-weight:700;padding:2px 7px;border-radius:10px;text-transform:uppercase;letter-spacing:.4px;white-space:nowrap}
.fr-status-pending{background:rgba(245,158,11,.18);color:#fbbf24;border:1px solid rgba(245,158,11,.4)}
.fr-status-implemented{background:rgba(16,185,129,.18);color:#34d399;border:1px solid rgba(16,185,129,.4)}
.fr-status-fixed{background:rgba(59,130,246,.18);color:#60a5fa;border:1px solid rgba(59,130,246,.4)}
.fr-status-deleted{background:rgba(239,68,68,.15);color:#fca5a5;border:1px solid rgba(239,68,68,.35)}
.fr-type-tag{font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;text-transform:uppercase;letter-spacing:.3px}
.fr-type-tag.feature{background:rgba(99,102,241,.18);color:#a5b4fc}
.fr-type-tag.bug{background:rgba(239,68,68,.15);color:#fca5a5}
