/* Veilborn — GDPR cookie consent banner */

.vb-cookie-banner {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    z-index: 99990 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0.75rem clamp(0.75rem, 3vw, 1.25rem) calc(0.75rem + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}

.vb-cookie-banner.is-visible {
    pointer-events: auto;
}

.vb-cookie-banner__panel {
    max-width: 920px;
    margin: 0 auto;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    background: rgba(12, 8, 24, 0.96);
    border: 1px solid rgba(167, 139, 250, 0.35);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45), 0 0 32px rgba(124, 58, 237, 0.18);
    backdrop-filter: blur(12px);
    color: #ede9fe;
}

.vb-cookie-banner__title {
    margin: 0 0 0.35rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #f5f3ff;
}

.vb-cookie-banner__body {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(237, 233, 254, 0.9);
}

.vb-cookie-banner__body a {
    color: #c4b5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.vb-cookie-banner__body a:hover {
    color: #fff;
}

.vb-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vb-cookie-open body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 540px) {
    .vb-cookie-banner__actions .btn {
        flex: 1 1 auto;
    }
}

#accessibilityIcon,
button#accessibilityIcon,
._access-icon {
    position: fixed !important;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
    right: 16px !important;
    left: auto !important;
    top: auto !important;
    z-index: 99991 !important;
    margin: 0 !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45) !important;
    background: linear-gradient(135deg, #5b21b6, #7c3aed) !important;
    color: #fff !important;
}

html[dir="rtl"] #accessibilityIcon,
html[dir="rtl"] button#accessibilityIcon,
html[dir="rtl"] ._access-icon {
    right: auto !important;
    left: 16px !important;
}

#accessibilityMenu,
._access-menu {
    z-index: 99992 !important;
}

.vb-cookie-open #accessibilityIcon,
.vb-cookie-open button#accessibilityIcon {
    bottom: calc(168px + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 640px) {
    .vb-cookie-open #accessibilityIcon,
    .vb-cookie-open button#accessibilityIcon {
        bottom: calc(210px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Fettuccia per riaprire preferenze cookie dopo il consenso — bordo sinistro */
.vb-cookie-tab {
    position: fixed !important;
    left: 0 !important;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    right: auto !important;
    top: auto !important;
    z-index: 99989 !important;
    margin: 0 !important;
    padding: 0.55rem 0.85rem 0.55rem 0.65rem;
    border: 1px solid rgba(167, 139, 250, 0.45);
    border-left: none;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.96), rgba(124, 58, 237, 0.92));
    color: #f5f3ff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(0deg);
    cursor: pointer;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(124, 58, 237, 0.25);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.vb-cookie-tab:hover,
.vb-cookie-tab:focus-visible {
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.98), rgba(139, 92, 246, 0.95));
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.4), 0 0 28px rgba(167, 139, 250, 0.35);
    color: #fff;
    outline: none;
}

.vb-cookie-open .vb-cookie-tab {
    display: none !important;
}

html[dir="rtl"] .vb-cookie-tab {
    left: auto !important;
    right: 0 !important;
    border-left: 1px solid rgba(167, 139, 250, 0.45);
    border-right: none;
    border-radius: 10px 0 0 10px;
    transform: rotate(180deg);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35);
}

@media (max-width: 640px) {
    .vb-cookie-tab {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
        font-size: 0.65rem;
        padding: 0.45rem 0.5rem 0.45rem 0.7rem;
    }
}
