Add consent reopener: floating widget + anchor link trigger
Allow visitors to reopen the cookie preferences modal after making their choice via a configurable floating button (bottom-right or right-side vertical) or any anchor link with href="#att-cc-preferences". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -248,6 +248,55 @@ body.att-cc-modal-active {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* --- Floating Widget --- */
|
||||
|
||||
.att-cc-widget {
|
||||
position: fixed;
|
||||
z-index: 999998;
|
||||
padding: 8px 14px;
|
||||
border: none;
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
background: var(--att-cc-bg, #1a1a2e);
|
||||
color: var(--att-cc-text, #fff);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
||||
transition: opacity 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.att-cc-widget:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.att-cc-widget:focus-visible {
|
||||
outline: 2px solid #fff;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.att-cc-widget--bottom-right {
|
||||
bottom: 16px;
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
.att-cc-widget--right {
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: rotate(-90deg) translateX(50%);
|
||||
transform-origin: right center;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
|
||||
.att-cc-widget svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
/* --- Responsive --- */
|
||||
|
||||
@media (max-width: 600px) {
|
||||
|
||||
Reference in New Issue
Block a user