Spaces:
Running
Running
Ryan Christian D. Deniega
Fix: Overhaul Facebook post detection to filtered comments using [role='feed'] strategy and improve button positioning
7e55328 | /** | |
| * PhilVerify β Content Script Styles | |
| * Floating verify button + inline report overlay. | |
| * All selectors namespaced under .pv-* to avoid collisions. | |
| */ | |
| /* ββ Floating "Verify this post" button βββββββββββββββββββββββββββββββββββββββ */ | |
| /* Wrapper container: sits at the end of the post, flex-end alignment */ | |
| .pv-verify-btn-wrapper { | |
| display: flex; | |
| justify-content: flex-end; | |
| padding: 4px 12px 8px; | |
| pointer-events: none; | |
| /* Let clicks pass through the wrapper */ | |
| } | |
| .pv-verify-btn { | |
| position: relative; | |
| z-index: 100; | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 6px; | |
| padding: 6px 12px; | |
| border: 1px solid rgba(220, 38, 38, 0.3); | |
| border-radius: 20px; | |
| background: rgba(20, 20, 20, 0.92); | |
| backdrop-filter: blur(8px); | |
| -webkit-backdrop-filter: blur(8px); | |
| color: #f5f0e8; | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; | |
| font-size: 11px; | |
| font-weight: 600; | |
| letter-spacing: 0.03em; | |
| cursor: pointer; | |
| touch-action: manipulation; | |
| -webkit-tap-highlight-color: transparent; | |
| transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; | |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); | |
| pointer-events: auto; | |
| /* Re-enable clicks on the button itself */ | |
| } | |
| .pv-verify-btn:hover { | |
| transform: translateY(-1px); | |
| border-color: rgba(220, 38, 38, 0.6); | |
| box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2); | |
| } | |
| .pv-verify-btn:active { | |
| transform: scale(0.97); | |
| } | |
| .pv-verify-btn:focus-visible { | |
| outline: 2px solid #06b6d4; | |
| outline-offset: 2px; | |
| } | |
| .pv-verify-btn-icon { | |
| font-size: 13px; | |
| line-height: 1; | |
| } | |
| .pv-verify-btn-label { | |
| white-space: nowrap; | |
| } | |
| /* ββ Loading state (on the button) ββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .pv-verify-btn--loading { | |
| cursor: wait; | |
| border-color: rgba(168, 159, 148, 0.3); | |
| color: #a89f94; | |
| } | |
| .pv-verify-btn--loading:hover { | |
| transform: none; | |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); | |
| } | |
| /* ββ Error state (on the button) ββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .pv-verify-btn--error { | |
| border-color: rgba(248, 113, 113, 0.4); | |
| color: #f87171; | |
| animation: pv-shake 0.4s ease-in-out; | |
| } | |
| @keyframes pv-shake { | |
| 0%, | |
| 100% { | |
| transform: translateX(0); | |
| } | |
| 20% { | |
| transform: translateX(-3px); | |
| } | |
| 40% { | |
| transform: translateX(3px); | |
| } | |
| 60% { | |
| transform: translateX(-2px); | |
| } | |
| 80% { | |
| transform: translateX(2px); | |
| } | |
| } | |
| /* ββ Spinner ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .pv-spinner { | |
| display: inline-block; | |
| width: 12px; | |
| height: 12px; | |
| border: 2px solid rgba(168, 159, 148, 0.3); | |
| border-top-color: #a89f94; | |
| border-radius: 50%; | |
| animation: pv-spin 0.7s linear infinite; | |
| flex-shrink: 0; | |
| } | |
| @media (prefers-reduced-motion: reduce) { | |
| .pv-spinner { | |
| animation: none; | |
| } | |
| .pv-verify-btn--error { | |
| animation: none; | |
| } | |
| .pv-verify-btn { | |
| transition: none; | |
| } | |
| } | |
| @keyframes pv-spin { | |
| to { | |
| transform: rotate(360deg); | |
| } | |
| } | |
| /* ββ Inline verification report βββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .pv-report { | |
| display: block; | |
| margin: 8px 12px 12px; | |
| padding: 14px 16px; | |
| background: #141414; | |
| border: 1px solid rgba(245, 240, 232, 0.1); | |
| border-radius: 8px; | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; | |
| font-size: 11px; | |
| color: #f5f0e8; | |
| max-width: 480px; | |
| box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5); | |
| position: relative; | |
| z-index: 50; | |
| } | |
| /* β Header */ | |
| .pv-report-header { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| margin-bottom: 12px; | |
| padding-bottom: 8px; | |
| border-bottom: 1px solid rgba(245, 240, 232, 0.07); | |
| } | |
| .pv-report-logo { | |
| font-weight: 800; | |
| font-size: 13px; | |
| letter-spacing: 0.12em; | |
| color: #f5f0e8; | |
| } | |
| .pv-report-close { | |
| background: none; | |
| border: none; | |
| cursor: pointer; | |
| color: #5c554e; | |
| font-size: 14px; | |
| padding: 2px 6px; | |
| border-radius: 4px; | |
| touch-action: manipulation; | |
| transition: color 0.15s ease; | |
| } | |
| .pv-report-close:hover { | |
| color: #f5f0e8; | |
| background: rgba(245, 240, 232, 0.05); | |
| } | |
| .pv-report-close:focus-visible { | |
| outline: 2px solid #06b6d4; | |
| } | |
| /* β Verdict row */ | |
| .pv-report-verdict-row { | |
| padding: 10px 12px; | |
| margin-bottom: 12px; | |
| border-left: 3px solid #5c554e; | |
| border-radius: 0 4px 4px 0; | |
| background: rgba(245, 240, 232, 0.03); | |
| } | |
| .pv-report-verdict { | |
| font-size: 18px; | |
| font-weight: 800; | |
| letter-spacing: -0.01em; | |
| margin-bottom: 2px; | |
| } | |
| .pv-report-score-text { | |
| font-size: 10px; | |
| color: #a89f94; | |
| font-family: 'SF Mono', 'Menlo', monospace; | |
| } | |
| /* β Confidence bar */ | |
| .pv-confidence-bar-wrap { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| padding: 8px 0; | |
| border-bottom: 1px solid rgba(245, 240, 232, 0.05); | |
| } | |
| .pv-confidence-bar-track { | |
| flex: 1; | |
| height: 6px; | |
| background: rgba(245, 240, 232, 0.07); | |
| border-radius: 3px; | |
| overflow: hidden; | |
| } | |
| .pv-confidence-bar-fill { | |
| height: 100%; | |
| border-radius: 3px; | |
| transition: width 0.5s ease-out; | |
| } | |
| .pv-confidence-bar-value { | |
| font-size: 10px; | |
| font-weight: 700; | |
| color: #a89f94; | |
| font-family: 'SF Mono', 'Menlo', monospace; | |
| min-width: 36px; | |
| text-align: right; | |
| } | |
| /* β Info rows */ | |
| .pv-report-row { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 6px 0; | |
| border-bottom: 1px solid rgba(245, 240, 232, 0.05); | |
| } | |
| .pv-report-label { | |
| font-size: 9px; | |
| font-weight: 700; | |
| letter-spacing: 0.12em; | |
| color: #5c554e; | |
| text-transform: uppercase; | |
| flex-shrink: 0; | |
| } | |
| .pv-report-value { | |
| font-size: 11px; | |
| font-weight: 500; | |
| color: #a89f94; | |
| } | |
| /* β Suspicious signals tags */ | |
| .pv-report-signals { | |
| padding: 8px 0; | |
| border-bottom: 1px solid rgba(245, 240, 232, 0.05); | |
| } | |
| .pv-report-tags { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 4px; | |
| margin-top: 6px; | |
| } | |
| .pv-report-tag { | |
| padding: 3px 8px; | |
| background: rgba(220, 38, 38, 0.12); | |
| color: #f87171; | |
| border: 1px solid rgba(220, 38, 38, 0.25); | |
| border-radius: 3px; | |
| font-size: 9px; | |
| letter-spacing: 0.04em; | |
| font-weight: 600; | |
| } | |
| /* β Evidence sources */ | |
| .pv-report-sources { | |
| padding: 8px 0; | |
| border-bottom: 1px solid rgba(245, 240, 232, 0.05); | |
| } | |
| .pv-report-sources-list { | |
| list-style: none; | |
| padding: 0; | |
| margin: 6px 0 0 0; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 4px; | |
| } | |
| .pv-report-source-item { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| gap: 8px; | |
| padding: 4px 0; | |
| } | |
| .pv-report-source-link { | |
| color: #06b6d4; | |
| font-size: 10px; | |
| text-decoration: none; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| white-space: nowrap; | |
| flex: 1; | |
| } | |
| .pv-report-source-link:hover { | |
| text-decoration: underline; | |
| } | |
| .pv-report-source-stance { | |
| font-size: 9px; | |
| font-weight: 700; | |
| letter-spacing: 0.06em; | |
| color: #5c554e; | |
| flex-shrink: 0; | |
| } | |
| /* β Explanation / Claim */ | |
| .pv-report-explanation { | |
| padding: 8px 0; | |
| border-bottom: 1px solid rgba(245, 240, 232, 0.05); | |
| } | |
| .pv-report-explanation-text { | |
| margin: 6px 0 0; | |
| font-size: 10px; | |
| color: #a89f94; | |
| line-height: 1.5; | |
| font-style: italic; | |
| } | |
| /* β Full analysis link */ | |
| .pv-report-full-link { | |
| display: block; | |
| margin-top: 10px; | |
| text-align: center; | |
| color: #dc2626; | |
| font-size: 10px; | |
| font-weight: 700; | |
| letter-spacing: 0.08em; | |
| text-decoration: none; | |
| text-transform: uppercase; | |
| padding: 6px; | |
| border: 1px solid rgba(220, 38, 38, 0.3); | |
| border-radius: 4px; | |
| transition: background 0.15s ease; | |
| } | |
| .pv-report-full-link:hover { | |
| background: rgba(220, 38, 38, 0.08); | |
| } |