/* Click Feedback — visual inspirado no Feedbucket */
.cfb-bar,.cfb-box,.cfb-panel,.cfb-toast,.cfb-hint{--cfb-ink:#1f2937;--cfb-muted:#6b7280;--cfb-line:#e5e7eb;--cfb-soft:#f3f4f6;--cfb-bg:#f8f9fb;--cfb-accent:#4f46e5;--cfb-accent-d:#4338ca;font:14px/1.45 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--cfb-ink);box-sizing:border-box;letter-spacing:normal;text-transform:none}
.cfb-bar *,.cfb-box *,.cfb-panel *{box-sizing:border-box}
.cfb-bar svg,.cfb-panel svg,.cfb-box svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}

/* Toolbar vertical */
.cfb-bar{position:fixed;right:12px;top:50%;transform:translateY(-50%);z-index:2147483000;background:#fff;border-radius:12px;box-shadow:0 4px 20px rgba(15,23,42,.14),0 0 0 1px rgba(15,23,42,.05);padding:6px;display:flex;flex-direction:column;align-items:center;gap:2px}
.cfb-tool{position:relative;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border:0;background:transparent;border-radius:9px;color:#374151;cursor:pointer;padding:0;margin:0}
.cfb-tool:hover{background:var(--cfb-soft);color:#111827}
.cfb-tool.is-on{background:var(--cfb-accent);color:#fff}
.cfb-tool::after{content:attr(data-tip);position:absolute;right:54px;top:50%;transform:translateY(-50%);white-space:nowrap;background:#111827;color:#fff;font-size:12px;font-weight:500;padding:5px 9px;border-radius:6px;opacity:0;pointer-events:none;transition:opacity .15s}
.cfb-tool:hover::after{opacity:1}
.cfb-badge:not(:empty){position:absolute;top:5px;right:4px;min-width:16px;height:16px;padding:0 4px;border-radius:99px;background:#ef4444;color:#fff;font:700 10px/16px system-ui,sans-serif;text-align:center}
.cfb-grip{display:grid;grid-template-columns:repeat(3,3px);gap:3px;padding:8px 0 4px}
.cfb-grip i{width:3px;height:3px;border-radius:50%;background:#d1d5db}

/* Modo comentário */
html.cfb-on,html.cfb-on *{cursor:crosshair!important}
html.cfb-on .cfb-bar,html.cfb-on .cfb-bar *,html.cfb-on .cfb-box,html.cfb-on .cfb-box *{cursor:auto!important}
html.cfb-on .cfb-tool,html.cfb-on .cfb-box button{cursor:pointer!important}
.cfb-hover{outline:2px solid var(--cfb-accent,#4f46e5)!important;outline-offset:2px;background-color:rgba(79,70,229,.04)!important}
.cfb-hint{position:fixed;top:16px;left:50%;transform:translate(-50%,-80px);z-index:2147483001;background:#111827;color:#fff;font-size:13px;padding:9px 16px;border-radius:99px;box-shadow:0 6px 20px rgba(0,0,0,.2);transition:transform .2s,opacity .2s,visibility .2s;pointer-events:none;opacity:0;visibility:hidden;max-width:calc(100vw - 32px);text-align:center}
html.cfb-on .cfb-hint{transform:translate(-50%,0);opacity:1;visibility:visible}

/* Alfinetes */
.cfb-layer{position:absolute;top:0;left:0;width:0;height:0;z-index:2147482999}
.cfb-pin{position:absolute;z-index:2147482999;transform:translate(-50%,-100%);width:30px;height:30px;border-radius:50% 50% 50% 4px;background:#4f46e5;color:#fff;font:700 12px/30px system-ui,sans-serif;text-align:center;box-shadow:0 3px 10px rgba(79,70,229,.45);border:2px solid #fff;cursor:pointer;rotate:0deg}
.cfb-pin.is-done{background:#16a34a;box-shadow:0 3px 10px rgba(22,163,74,.4)}
.cfb-pin-draft{background:#111827;box-shadow:0 3px 10px rgba(0,0,0,.35)}
.cfb-pin.is-focus{animation:cfb-pulse 1s ease-in-out 4}
@keyframes cfb-pulse{50%{transform:translate(-50%,-100%) scale(1.4)}}

/* Caixa de comentário */
.cfb-box{position:absolute;z-index:2147483001;width:300px;background:#fff;border-radius:12px;padding:12px;box-shadow:0 12px 40px rgba(15,23,42,.22),0 0 0 1px rgba(15,23,42,.06)}
.cfb-input{display:block;width:100%;border:1px solid var(--cfb-line,#e5e7eb);border-radius:8px;padding:9px 11px;font:14px/1.4 inherit;font-family:inherit;color:#111827;background:#fff;margin:0;outline:none;box-shadow:none}
.cfb-input:focus{border-color:#4f46e5;box-shadow:0 0 0 3px rgba(79,70,229,.15)}
.cfb-name{margin-bottom:8px}
textarea.cfb-input{min-height:84px;resize:vertical}
.cfb-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:10px}
.cfb-btn-primary,.cfb-btn-ghost{display:inline-flex;align-items:center;gap:6px;border:0;border-radius:8px;padding:8px 14px;font:600 13px/1.2 inherit;font-family:inherit;cursor:pointer;margin:0}
.cfb-btn-primary{background:#4f46e5;color:#fff}
.cfb-btn-primary:hover{background:#4338ca}
.cfb-btn-primary:disabled{opacity:.6}
.cfb-btn-ghost{background:transparent;color:#4b5563}
.cfb-btn-ghost:hover{background:#f3f4f6}
.cfb-btn-ghost svg{width:16px;height:16px}

/* Painel */
.cfb-panel{position:fixed;top:0;right:0;bottom:0;width:450px;max-width:100vw;z-index:2147483002;background:var(--cfb-bg);border-left:1px solid var(--cfb-line);box-shadow:-10px 0 30px rgba(15,23,42,.10);display:flex;flex-direction:column;transform:translateX(105%);transition:transform .25s ease}
.cfb-panel.cfb-open{transform:none}
.cfb-head{display:flex;justify-content:space-between;align-items:center;padding:18px 16px 12px 16px}
.cfb-head h2{margin:0;padding:0;font:600 17px/1.2 inherit;font-family:inherit;color:#111827;border:0}
.cfb-icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:0;background:transparent;border-radius:8px;color:#6b7280;cursor:pointer;padding:0}
.cfb-icon-btn:hover{background:#eceef2;color:#111827}
.cfb-icon-btn svg{width:20px;height:20px}
.cfb-tabs{display:flex;gap:6px;padding:4px 16px 8px}
.cfb-tabs button{display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;border-radius:8px;padding:8px 12px;font:500 13px/1 inherit;font-family:inherit;color:#374151;cursor:pointer;margin:0}
.cfb-tabs button.is-on{background:#eceef2;font-weight:600;color:#111827}
.cfb-tabs span{background:#e2e5ea;color:#374151;border-radius:99px;padding:3px 7px;font-size:11px;font-weight:600}
.cfb-body{flex:1;overflow-y:auto;padding:4px 16px 24px}

.cfb-divider{display:flex;align-items:center;gap:12px;margin:14px 0 10px;color:#6b7280;font-size:12px}
.cfb-divider::before,.cfb-divider::after{content:"";flex:1;height:1px;background:#e1e4e8}
.cfb-divider span{display:inline-flex;align-items:center;gap:6px}
.cfb-divider em{font-style:normal;background:#e2e5ea;color:#374151;border-radius:99px;padding:1px 7px;font-size:11px;font-weight:600}
.cfb-divider svg{width:14px;height:14px;transition:transform .15s}
.cfb-divider.is-toggle{cursor:pointer;margin-top:28px}
.cfb-divider.is-toggle:hover span{color:#111827}
.cfb-divider.is-open svg{transform:rotate(180deg)}

.cfb-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:48px 0 36px;color:#9ca3af}
.cfb-empty svg{width:44px;height:44px;stroke-width:1.5}
.cfb-empty strong{color:#111827;font-weight:600;font-size:14px}

.cfb-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:12px 14px;margin-bottom:8px;cursor:pointer;transition:border-color .15s,box-shadow .15s}
.cfb-card:hover{border-color:#d1d5db;box-shadow:0 2px 8px rgba(15,23,42,.06)}
.cfb-card.is-focus{border-color:#4f46e5;box-shadow:0 0 0 3px rgba(79,70,229,.15)}
.cfb-card-head{display:flex;align-items:center;gap:10px}
.cfb-avatar{width:30px;height:30px;border-radius:50%;background:#e0e7ff;color:#4338ca;font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:center;flex:none}
.cfb-who{display:flex;flex-direction:column;line-height:1.25;flex:1;min-width:0}
.cfb-who strong{font-weight:600;font-size:13px;color:#111827}
.cfb-who small,.cfb-msg small{font-size:11.5px;color:#6b7280}
.cfb-count{font-size:12px;color:#6b7280}
.cfb-text{margin:8px 0 0;white-space:pre-wrap;word-wrap:break-word;color:#1f2937}
.cfb-path{display:inline-flex;align-items:center;gap:4px;margin-top:8px;font-size:12px;color:#4f46e5;text-decoration:none}
.cfb-path svg{width:13px;height:13px}
.cfb-thread{display:none;margin-top:12px;padding-top:12px;border-top:1px solid #f0f1f3;cursor:auto}
.cfb-card.is-open .cfb-thread{display:block}
.cfb-msg{background:#f6f7f9;border-radius:8px;padding:8px 10px;margin-bottom:6px;white-space:pre-wrap;word-wrap:break-word}
.cfb-msg.is-team{background:#eef2ff;margin-left:20px}
.cfb-msg small{display:block;margin-bottom:2px}
.cfb-reply textarea.cfb-input{min-height:60px}

.cfb-toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:2147483003;background:#111827;color:#fff;padding:10px 16px;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.25);max-width:calc(100vw - 32px);font-size:13px}

@media (max-width:600px){
  .cfb-bar{right:8px;padding:4px}
  .cfb-tool{width:40px;height:40px}
  .cfb-tool::after{display:none}
  .cfb-box{width:calc(100vw - 16px)}
}

/* ===== Blindagem contra o CSS do tema =====
   Temas costumam estilizar button/input/textarea/h2 globalmente (cor, borda, raio, padding, fonte).
   Aqui zeramos tudo nos nossos elementos e reaplicamos o visual com !important. */
html body .cfb-bar button,html body .cfb-panel button,html body .cfb-box button,
html body .cfb-panel textarea,html body .cfb-box textarea,html body .cfb-panel h2,html body .cfb-panel a,html body .cfb-panel strong,html body .cfb-panel small{
  all:unset!important;box-sizing:border-box!important;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif!important;
}
html body .cfb-bar button::before,html body .cfb-panel button::before,html body .cfb-box button::before{content:none!important;display:none!important}

html body .cfb-bar .cfb-tool{position:relative!important;width:44px!important;height:44px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:9px!important;color:#374151!important;background:transparent!important;cursor:pointer!important}
html body .cfb-bar .cfb-tool:hover{background:#f3f4f6!important;color:#111827!important}
html body .cfb-bar .cfb-tool.is-on{background:#4f46e5!important;color:#fff!important}
html body .cfb-bar .cfb-tool::after{content:attr(data-tip)!important;display:block!important;position:absolute!important;right:54px!important;top:50%!important;transform:translateY(-50%)!important;white-space:nowrap!important;background:#111827!important;color:#fff!important;font:500 12px/1.3 Inter,system-ui,sans-serif!important;padding:5px 9px!important;border-radius:6px!important;opacity:0!important;pointer-events:none!important}
html body .cfb-bar .cfb-tool:hover::after{opacity:1!important}

html body .cfb-panel .cfb-head h2{display:block!important;font-size:17px!important;font-weight:600!important;line-height:1.2!important;color:#111827!important}
html body .cfb-panel .cfb-icon-btn{width:32px!important;height:32px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:8px!important;color:#6b7280!important;background:transparent!important;cursor:pointer!important}
html body .cfb-panel .cfb-icon-btn:hover{background:#eceef2!important;color:#111827!important}
html body .cfb-panel .cfb-tabs button{display:inline-flex!important;align-items:center!important;gap:8px!important;padding:8px 12px!important;border-radius:8px!important;font-size:13px!important;font-weight:500!important;line-height:1!important;color:#374151!important;background:transparent!important;cursor:pointer!important}
html body .cfb-panel .cfb-tabs button.is-on{background:#eceef2!important;font-weight:600!important;color:#111827!important}
html body .cfb-panel .cfb-tabs button span{background:#e2e5ea!important;color:#374151!important;border-radius:99px!important;padding:3px 7px!important;font-size:11px!important;font-weight:600!important}

html body .cfb-panel .cfb-who strong{display:block!important;font-size:13px!important;font-weight:600!important;color:#111827!important;line-height:1.25!important}
html body .cfb-panel .cfb-empty strong{display:block!important;font-size:14px!important;font-weight:600!important;color:#111827!important}
html body .cfb-panel .cfb-who small,html body .cfb-panel .cfb-msg small{display:block!important;font-size:11.5px!important;color:#6b7280!important;line-height:1.3!important}
html body .cfb-panel .cfb-path{display:inline-flex!important;align-items:center!important;gap:4px!important;margin-top:8px!important;font-size:12px!important;color:#4f46e5!important;cursor:pointer!important}

html body .cfb-panel textarea.cfb-input,html body .cfb-box textarea.cfb-input{display:block!important;width:100%!important;min-height:72px!important;border:1px solid #e5e7eb!important;border-radius:8px!important;padding:9px 11px!important;font-size:14px!important;line-height:1.4!important;color:#111827!important;background:#fff!important;white-space:pre-wrap!important;resize:vertical!important;cursor:text!important}
html body .cfb-box textarea.cfb-input{min-height:84px!important}
html body .cfb-panel textarea.cfb-input:focus,html body .cfb-box textarea.cfb-input:focus{border-color:#4f46e5!important;box-shadow:0 0 0 3px rgba(79,70,229,.15)!important}
html body .cfb-panel textarea.cfb-input::placeholder,html body .cfb-box textarea.cfb-input::placeholder{color:#9ca3af!important;opacity:1!important}

html body .cfb-panel .cfb-btn-primary,html body .cfb-box .cfb-btn-primary,html body .cfb-panel .cfb-btn-ghost,html body .cfb-box .cfb-btn-ghost{display:inline-flex!important;align-items:center!important;gap:6px!important;padding:8px 14px!important;border-radius:8px!important;font-size:13px!important;font-weight:600!important;line-height:1.2!important;cursor:pointer!important}
html body .cfb-panel .cfb-btn-primary,html body .cfb-box .cfb-btn-primary{background:#4f46e5!important;color:#fff!important}
html body .cfb-panel .cfb-btn-primary:hover,html body .cfb-box .cfb-btn-primary:hover{background:#4338ca!important}
html body .cfb-panel .cfb-btn-primary:disabled,html body .cfb-box .cfb-btn-primary:disabled{opacity:.6!important}
html body .cfb-panel .cfb-btn-ghost,html body .cfb-box .cfb-btn-ghost{background:transparent!important;color:#4b5563!important}
html body .cfb-panel .cfb-btn-ghost:hover,html body .cfb-box .cfb-btn-ghost:hover{background:#f3f4f6!important}
html body .cfb-panel .cfb-btn-ghost svg{width:16px!important;height:16px!important}
html body .cfb-bar svg,html body .cfb-panel svg,html body .cfb-box svg{fill:none!important;stroke:currentColor!important}html body .cfb-box input.cfb-input{all:unset!important;box-sizing:border-box!important;display:block!important;width:100%!important;margin:0 0 8px!important;border:1px solid #e5e7eb!important;border-radius:8px!important;padding:9px 11px!important;font:14px/1.4 Inter,system-ui,-apple-system,"Segoe UI",sans-serif!important;color:#111827!important;background:#fff!important;cursor:text!important}
html body .cfb-box input.cfb-input:focus{border-color:#4f46e5!important;box-shadow:0 0 0 3px rgba(79,70,229,.15)!important}
html body .cfb-box input.cfb-input::placeholder{color:#9ca3af!important;opacity:1!important}
