Google Consent Mode v2 cookie consent plugin with session attribution preservation, custom script management, and gtag.js/GTM support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
273 lines
4.5 KiB
CSS
273 lines
4.5 KiB
CSS
/* ATT Consent - Banner & Modal Styles */
|
|
|
|
/* Reset box-sizing for our elements */
|
|
#att-cc-banner,
|
|
#att-cc-banner *,
|
|
#att-cc-modal,
|
|
#att-cc-modal * {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* --- Banner --- */
|
|
|
|
#att-cc-banner {
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 999999;
|
|
background: var(--att-cc-bg, #1a1a2e);
|
|
color: var(--att-cc-text, #ffffff);
|
|
padding: 20px;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
}
|
|
|
|
#att-cc-banner.att-cc-hidden {
|
|
display: none;
|
|
}
|
|
|
|
/* Position variants */
|
|
#att-cc-banner.att-cc-position-bottom {
|
|
bottom: 0;
|
|
}
|
|
|
|
#att-cc-banner.att-cc-position-top {
|
|
top: 0;
|
|
}
|
|
|
|
#att-cc-banner.att-cc-position-center {
|
|
top: 50%;
|
|
left: 50%;
|
|
right: auto;
|
|
transform: translate(-50%, -50%);
|
|
max-width: 600px;
|
|
border-radius: 12px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
.att-cc-banner__inner {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 24px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.att-cc-position-center .att-cc-banner__inner {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.att-cc-banner__content {
|
|
flex: 1;
|
|
min-width: 280px;
|
|
}
|
|
|
|
.att-cc-banner__heading {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
margin: 0 0 6px 0;
|
|
color: inherit;
|
|
}
|
|
|
|
.att-cc-banner__message {
|
|
margin: 0;
|
|
opacity: 0.9;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.att-cc-banner__message a {
|
|
color: inherit;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.att-cc-banner__actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.att-cc-position-center .att-cc-banner__actions {
|
|
justify-content: stretch;
|
|
}
|
|
|
|
.att-cc-position-center .att-cc-btn {
|
|
flex: 1;
|
|
}
|
|
|
|
/* --- Buttons --- */
|
|
|
|
.att-cc-btn {
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
transition: opacity 0.2s, box-shadow 0.2s;
|
|
line-height: 1.4;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.att-cc-btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.att-cc-btn:focus-visible {
|
|
outline: 2px solid #fff;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.att-cc-btn--accept {
|
|
background: var(--att-cc-accept-bg, #4CAF50);
|
|
color: var(--att-cc-accept-text, #ffffff);
|
|
}
|
|
|
|
.att-cc-btn--reject {
|
|
background: var(--att-cc-reject-bg, #555555);
|
|
color: var(--att-cc-reject-text, #ffffff);
|
|
}
|
|
|
|
.att-cc-btn--preferences {
|
|
background: var(--att-cc-pref-bg, transparent);
|
|
color: var(--att-cc-pref-text, #ffffff);
|
|
border: 1px solid currentColor;
|
|
}
|
|
|
|
/* --- Preferences Modal --- */
|
|
|
|
#att-cc-modal {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 1000000;
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
#att-cc-modal.att-cc-modal--open {
|
|
display: flex;
|
|
}
|
|
|
|
.att-cc-modal__overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.6);
|
|
}
|
|
|
|
.att-cc-modal__dialog {
|
|
position: relative;
|
|
background: var(--att-cc-bg, #1a1a2e);
|
|
color: var(--att-cc-text, #ffffff);
|
|
border-radius: 12px;
|
|
padding: 28px;
|
|
max-width: 540px;
|
|
width: 90%;
|
|
max-height: 85vh;
|
|
overflow-y: auto;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
.att-cc-modal__heading {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
margin: 0 0 20px 0;
|
|
color: inherit;
|
|
}
|
|
|
|
.att-cc-modal__category {
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
padding: 14px 0;
|
|
}
|
|
|
|
.att-cc-modal__category:last-of-type {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.att-cc-modal__cat-header {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.att-cc-modal__cat-header label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
color: inherit;
|
|
width: 100%;
|
|
}
|
|
|
|
.att-cc-modal__cat-header input[type="checkbox"] {
|
|
width: 18px;
|
|
height: 18px;
|
|
cursor: pointer;
|
|
accent-color: var(--att-cc-accept-bg, #4CAF50);
|
|
}
|
|
|
|
.att-cc-always-on {
|
|
margin-left: auto;
|
|
font-size: 11px;
|
|
opacity: 0.6;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.att-cc-modal__cat-desc {
|
|
margin: 6px 0 0 26px;
|
|
font-size: 12px;
|
|
opacity: 0.75;
|
|
}
|
|
|
|
.att-cc-modal__actions {
|
|
margin-top: 20px;
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.att-cc-modal__actions .att-cc-btn {
|
|
flex: 1;
|
|
}
|
|
|
|
/* Prevent body scroll when modal is open */
|
|
body.att-cc-modal-active {
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* --- Responsive --- */
|
|
|
|
@media (max-width: 600px) {
|
|
.att-cc-banner__inner {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.att-cc-banner__actions {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.att-cc-btn {
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
.att-cc-modal__dialog {
|
|
width: 95%;
|
|
padding: 20px;
|
|
}
|
|
}
|