UNPKG

@truconsent/consent-banner-react

Version:

React consent-banner components (in-page & modal)

336 lines (333 loc) 5.97 kB
.pc-container { max-width: 56rem; margin: 0 auto; padding: 1.5rem; font-family: system-ui, sans-serif; } .pc-icon-btn { background: none; border: none; padding: 0; cursor: pointer; color: #6b7280; } /* Modal Overlay */ .pc-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 100; } .pc-modal { background: #ffffff; border-radius: 0.5rem; max-width: 36rem; width: 100%; padding: 1.5rem; box-shadow: 0 4px 16px rgba(0,0,0,0.2); } .pc-modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.5rem; margin-bottom: 1rem; } .pc-modal-header h2 { font-size: 1.25rem; font-weight: 600; } .pc-modal-close { background: none; border: none; cursor: pointer; color: #6b7280; } .pc-modal-subtitle { color: #4b5563; margin-bottom: 1rem; } .pc-modal-section { margin-bottom: 1.5rem; } .pc-detail-row { display: flex; justify-content: space-between; margin-bottom: 0.75rem; } .pc-detail-row.align-center { align-items: center; } .pc-elements-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; margin-top: 0.5rem; } .pc-element-card { border: 1px solid #e5e7eb; border-radius: 0.375rem; padding: 0.75rem; } .pc-pill-yes, .pc-pill-no { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 500; margin-left: 0.5rem; } .pc-pill-yes { background: #d1fae5; color: #065f46; border: 1px solid #10b981; } .pc-pill-no { background: #fee2e2; color: #991b1b; border: 1px solid #ef4444; } .pc-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; } .pc-header p { color: #6b7280; margin-bottom: 1rem; } .pc-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; } .pc-tab, .pc-tab-active { padding: 0.5rem 1rem; border-radius: 0.375rem; font-weight: 500; border: 1px solid #e5e7eb; cursor: pointer; background: #ffffff; color: #374151; transition: background 0.2s; } .pc-tab-active { background: #2563eb; color: #ffffff; border-color: #2563eb; } .pc-tab:hover { background: #f9fafb; } .pc-principal { background: #eff6ff; padding: 1rem; border-radius: 0.375rem; display: flex; align-items: center; color: #1e40af; font-weight: 500; margin-bottom: 1rem; } .pc-principal-icon { width: 1.25rem; height: 1.25rem; margin-right: 0.5rem; background: #3b82f6; border-radius: 50%; } .pc-consent-list { display: flex; flex-direction: column; gap: 1rem; } .pc-consent-item { display: flex; justify-content: space-between; align-items: flex-start; border: 1px solid #e5e7eb; border-radius: 0.375rem; padding: 1rem; } .pc-consent-header { display: flex; align-items: center; gap: 0.5rem; } .pc-consent-header h3 { font-size: 1.125rem; font-weight: 600; } .pc-badge-mandatory { background: #ef4444; color: #ffffff; font-size: 0.625rem; font-weight: 500; border-radius: 0.25rem; padding: 0.125rem 0.5rem; } .pc-consent-meta { color: #4b5563; font-size: 0.875rem; display: flex; gap: 1rem; margin-top: 0.5rem; } .pc-consent-status { font-size: 0.875rem; display: flex; gap: 1rem; margin-top: 0.25rem; } .pc-switch { position: relative; display: inline-block; width: 2.75rem; height: 1.5rem; } .pc-switch input { opacity: 0; width: 0; height: 0; } .pc-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #e5e7eb; border-radius: 9999px; transition: background 0.2s; } .pc-slider:before { position: absolute; content: ''; height: 1.25rem; width: 1.25rem; left: 0.125rem; bottom: 0.125rem; background: #ffffff; border-radius: 9999px; transition: transform 0.2s; } .pc-switch input:checked + .pc-slider { background: #2563eb; } .pc-switch input:checked + .pc-slider:before { transform: translateX(1.25rem); } .pc-rights { border: 1px solid #e5e7eb; border-radius: 0.375rem; padding: 1.5rem; background: #ffffff; margin-bottom: 1rem; } .pc-rights h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; } .pc-rights p { color: #4b5563; margin-bottom: 1rem; } .pc-rights-actions { display: flex; gap: 1rem; } .pc-btn-primary { background: #2563eb; color: #ffffff; padding: 0.5rem 1.5rem; border: none; border-radius: 0.375rem; font-weight: 500; cursor: pointer; } .pc-btn-danger { background: #ffffff; color: #dc2626; padding: 0.5rem 1.5rem; border: 1px solid #dc2626; border-radius: 0.375rem; font-weight: 500; cursor: pointer; } .pc-btn-primary:hover { background: #1e40af; } .pc-btn-danger:hover { background: #fef2f2; } .pc-transparency, .pc-dpo-contact, .pc-nominee { border: 1px solid #e5e7eb; border-radius: 0.375rem; padding: 1.5rem; background: #ffffff; margin-bottom: 1rem; } .pc-transparency h2, .pc-nominee h2, .pc-dpo-contact h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; } .pc-transparency p, .pc-nominee p { color: #4b5563; } .pc-dpo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; } .pc-dpo-info div { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; } .pc-icon { width: 1rem; height: 1rem; color: #6b7280; } .pc-response-box { background: #eff6ff; padding: 0.75rem; border-radius: 0.375rem; color: #1e40af; } .pc-ticket-list { list-style: none; padding: 0; margin: 0 0 1rem 0; } .pc-ticket-list li { padding: 0.75rem; border: 1px solid #f3f4f6; border-radius: 0.375rem; margin-bottom: 0.5rem; } .pc-nominee { display: flex; justify-content: space-between; align-items: center; }