.cookie-consent [hidden] {
    display: none !important;
}

.cookie-consent__banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1200;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #111;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.14);
}

.cookie-consent__banner-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.cookie-consent__content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.cookie-consent__icon {
    display: grid;
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border: 1px solid #111;
    border-radius: 50%;
    background: #fff;
}

.cookie-consent__icon img,
.cookie-consent__close img {
    width: 1.25rem;
    height: 1.25rem;
    filter: brightness(0);
}

.cookie-consent h2,
.cookie-consent p {
    margin-top: 0;
}

.cookie-consent h2 {
    margin-bottom: 0.4rem;
    color: #111;
    font-size: 1.05rem;
    line-height: 1.3;
}

.cookie-consent p {
    margin-bottom: 0.55rem;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-consent__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.cookie-consent a {
    color: #111;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.cookie-consent button {
    min-height: 2.8rem;
    border-radius: 0.65rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cookie-consent button:focus-visible,
.cookie-consent a:focus-visible,
.cookie-consent input:focus-visible {
    outline: 3px solid #111;
    outline-offset: 3px;
}

.cookie-consent button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.cookie-consent__decision {
    border: 2px solid #111;
    background: #fff;
    color: #111;
}

.cookie-consent__decision:hover {
    background: #f1f1f1;
}

.cookie-consent__customise {
    grid-column: 1 / -1;
    border: 0;
    background: transparent;
    color: #111;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.cookie-consent__dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    align-items: end;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.58);
}

.cookie-consent__dialog {
    width: min(680px, 100%);
    max-height: calc(100vh - 1.5rem);
    margin: 0 auto;
    overflow-y: auto;
    border: 1px solid #111;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.cookie-consent__dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0;
}

.cookie-consent__eyebrow {
    margin-bottom: 0.2rem !important;
    color: #555 !important;
    font-size: 0.75rem !important;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cookie-consent__close {
    display: grid;
    flex: 0 0 2.7rem;
    width: 2.7rem;
    min-height: 2.7rem !important;
    place-items: center;
    border: 1px solid #111;
    background: #fff;
}

.cookie-consent__dialog-intro {
    padding: 0 1rem;
}

.cookie-consent__categories {
    display: grid;
    gap: 0.65rem;
    padding: 0 1rem 1rem;
}

.cookie-consent__category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem;
    border: 1px solid #b8b8b8;
    border-radius: 0.8rem;
    background: #fff;
}

.cookie-consent__category--locked {
    background: #f5f5f5;
}

.cookie-consent__category span {
    display: grid;
    gap: 0.22rem;
}

.cookie-consent__category strong {
    color: #111;
}

.cookie-consent__category small {
    color: #444;
    line-height: 1.4;
}

.cookie-consent__category input {
    width: 1.35rem;
    height: 1.35rem;
    accent-color: #111;
}

.cookie-consent__status {
    min-height: 1.35rem;
    margin: 0 !important;
    padding: 0 1rem;
    color: #7a1a1a !important;
    font-weight: 700;
}

.cookie-consent__dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 1rem;
    border-top: 1px solid #d4d4d4;
}

.cookie-consent__secondary-action,
.cookie-consent__save-action {
    border: 2px solid #111;
}

.cookie-consent__secondary-action {
    background: #fff;
    color: #111;
}

.cookie-consent__save-action {
    background: #111;
    color: #fff;
}

body.cookie-consent-open {
    overflow: hidden;
}

.site-footer__cookie-button {
    cursor: pointer;
}

@media (min-width: 760px) {
    .cookie-consent__banner {
        padding: 1rem;
    }

    .cookie-consent__banner-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(330px, 0.55fr);
        align-items: center;
        gap: 1.5rem;
    }

    .cookie-consent__actions {
        margin-top: 0;
    }

    .cookie-consent__dialog-backdrop {
        align-items: center;
        padding: 1.5rem;
    }

    .cookie-consent__dialog-actions {
        grid-template-columns: 1fr 1fr;
    }
}


/* RoomUpItalia Professional v1 - v302: Gestisci cookie nel workspace privato. */
body.owner-workspace-sidebar-active .cookie-consent__dialog {
    border: 1px solid #dce2ea;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(17, 24, 39, 0.16);
}

body.owner-workspace-sidebar-active .cookie-consent__close {
    border-color: #dce2ea;
    border-radius: 8px;
}

body.owner-workspace-sidebar-active .cookie-consent__eyebrow {
    color: #0b57d0 !important;
}

body.owner-workspace-sidebar-active .cookie-consent__category {
    border-color: #dce2ea;
    border-radius: 8px;
}

body.owner-workspace-sidebar-active .cookie-consent__category--locked {
    background: #f6f8fb;
}

body.owner-workspace-sidebar-active .cookie-consent__category input {
    accent-color: #0b57d0;
}

body.owner-workspace-sidebar-active .cookie-consent__secondary-action,
body.owner-workspace-sidebar-active .cookie-consent__save-action {
    border-color: #0b57d0;
    border-radius: 8px;
}

body.owner-workspace-sidebar-active .cookie-consent__secondary-action {
    background: #ffffff;
    color: #0b57d0;
}

body.owner-workspace-sidebar-active .cookie-consent__save-action {
    background: #0b57d0;
    color: #ffffff;
}

body.owner-workspace-sidebar-active .cookie-consent__secondary-action:hover {
    background: #eef4ff;
}

body.owner-workspace-sidebar-active .cookie-consent__save-action:hover {
    background: #0847ad;
}

body.owner-workspace-sidebar-active .cookie-consent button:focus-visible,
body.owner-workspace-sidebar-active .cookie-consent a:focus-visible,
body.owner-workspace-sidebar-active .cookie-consent input:focus-visible {
    outline-color: #0b57d0;
}

/* RoomUpItalia Professional v1 - v303: switch ON/OFF per le preferenze cookie. */
.cookie-consent__switch {
    position: relative;
    display: inline-flex !important;
    flex: 0 0 auto;
    width: 76px;
    height: 36px;
    align-items: center;
}

.cookie-consent__switch input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100% !important;
    height: 100% !important;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.cookie-consent__switch input:disabled {
    cursor: not-allowed;
}

.cookie-consent__switch-track {
    position: relative;
    display: block !important;
    width: 76px;
    height: 36px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #e5e7eb;
    box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.08);
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.cookie-consent__switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 1;
    display: block !important;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(17, 24, 39, 0.24);
    transition: transform 180ms ease;
}

.cookie-consent__switch-label {
    position: absolute;
    top: 50%;
    z-index: 0;
    display: block !important;
    transform: translateY(-50%);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    transition: opacity 140ms ease;
}

.cookie-consent__switch-label--on {
    left: 11px;
    color: #ffffff;
    opacity: 0;
}

.cookie-consent__switch-label--off {
    right: 9px;
    color: #475569;
    opacity: 1;
}

.cookie-consent__switch input:checked + .cookie-consent__switch-track {
    border-color: #0b57d0;
    background: #0b57d0;
    box-shadow: inset 0 1px 2px rgba(8, 71, 173, 0.22);
}

.cookie-consent__switch input:checked + .cookie-consent__switch-track .cookie-consent__switch-thumb {
    transform: translateX(40px);
}

.cookie-consent__switch input:checked + .cookie-consent__switch-track .cookie-consent__switch-label--on {
    opacity: 1;
}

.cookie-consent__switch input:checked + .cookie-consent__switch-track .cookie-consent__switch-label--off {
    opacity: 0;
}

.cookie-consent__switch input:focus-visible + .cookie-consent__switch-track {
    outline: 3px solid rgba(11, 87, 208, 0.28);
    outline-offset: 3px;
}

.cookie-consent__switch--locked {
    opacity: 0.72;
}

.cookie-consent__switch--locked .cookie-consent__switch-track {
    cursor: not-allowed;
}

body.owner-workspace-sidebar-active .cookie-consent__switch-track {
    border-color: #cbd5e1;
}

body.owner-workspace-sidebar-active .cookie-consent__switch input:checked + .cookie-consent__switch-track {
    border-color: #0b57d0;
    background: #0b57d0;
}

@media (max-width: 520px) {
    .cookie-consent__category {
        gap: 0.75rem;
    }

    .cookie-consent__switch,
    .cookie-consent__switch-track {
        width: 70px;
    }

    .cookie-consent__switch input:checked + .cookie-consent__switch-track .cookie-consent__switch-thumb {
        transform: translateX(34px);
    }
}
