#csp-collector-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2147483647;
    font-family: system-ui, -apple-system, sans-serif;
    pointer-events: auto;
}
#csp-collector-widget .csp-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.2s;
    position: relative;
    pointer-events: auto;
}
#csp-collector-widget .csp-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}
#csp-collector-widget .csp-fab.has-violations { background: #ef4444; }
#csp-collector-widget .csp-fab.no-violations { background: #3b82f6; }
#csp-collector-widget .csp-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: white;
    color: #ef4444;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
#csp-collector-widget .csp-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 90vw;
    max-width: 500px;
    max-height: 70vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#csp-collector-widget .csp-panel-header {
    background: #1f2937;
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#csp-collector-widget .csp-panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}
#csp-collector-widget .csp-panel-header .count {
    font-size: 14px;
    font-weight: normal;
    color: #9ca3af;
}
#csp-collector-widget .csp-close-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
}
#csp-collector-widget .csp-close-btn:hover { color: white; }
#csp-collector-widget .csp-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
#csp-collector-widget .csp-empty {
    text-align: center;
    padding: 32px 16px;
    color: #6b7280;
}
#csp-collector-widget .csp-empty svg { margin: 0 auto 12px; }
#csp-collector-widget .csp-empty .csp-empty-title {
    font-weight: 500;
    margin: 0 0 4px 0;
}
#csp-collector-widget .csp-empty .csp-empty-subtitle {
    font-size: 14px;
    margin: 0;
}
#csp-collector-widget .csp-summary {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}
#csp-collector-widget .csp-summary h3 {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin: 0 0 8px 0;
}
#csp-collector-widget .csp-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
#csp-collector-widget .csp-summary-item {
    display: flex;
    justify-content: space-between;
    background: white;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
}
#csp-collector-widget .csp-summary-item .directive {
    font-family: monospace;
    color: #4b5563;
}
#csp-collector-widget .csp-summary-item .count {
    font-weight: bold;
    color: #2563eb;
}
#csp-collector-widget .csp-violation {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}
#csp-collector-widget .csp-violation:hover { background: #f9fafb; }
#csp-collector-widget .csp-violation-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
#csp-collector-widget .csp-violation-info {
    flex: 1;
    min-width: 0;
}
#csp-collector-widget .csp-violation-domain {
    font-family: monospace;
    font-size: 13px;
    color: #1f2937;
    word-break: break-all;
}
#csp-collector-widget .csp-violation-meta {
    margin-top: 6px;
    font-size: 12px;
}
#csp-collector-widget .csp-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 11px;
}
#csp-collector-widget .csp-tag-directive {
    background: #dbeafe;
    color: #1d4ed8;
}
#csp-collector-widget .csp-tag-wildcard {
    background: #fef3c7;
    color: #92400e;
    margin-left: 4px;
}
#csp-collector-widget .csp-remove-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}
#csp-collector-widget .csp-remove-btn:hover { color: #ef4444; }
#csp-collector-widget .csp-panel-footer {
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    background: #f9fafb;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#csp-collector-widget .csp-btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
#csp-collector-widget .csp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#csp-collector-widget .csp-btn-primary {
    background: #2563eb;
    color: white;
}
#csp-collector-widget .csp-btn-primary:hover:not(:disabled) { background: #1d4ed8; }
#csp-collector-widget .csp-btn-secondary {
    background: #4b5563;
    color: white;
}
#csp-collector-widget .csp-btn-secondary:hover:not(:disabled) { background: #374151; }
#csp-collector-widget .csp-btn-danger {
    background: #fee2e2;
    color: #dc2626;
    flex: 0;
}
#csp-collector-widget .csp-btn-danger:hover:not(:disabled) { background: #fecaca; }
