.wise-legal-bar {
    border-top: 1px solid var(--brand-border, #374151);
    background: color-mix(in srgb, var(--brand-bg, #191919) 92%, black);
    color: var(--brand-muted, #d7d7d7);
    font-size: 0.8125rem;
}
.wise-legal-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem 0.7rem;
    padding: 0.85rem 0 1.1rem;
}
.wise-legal-bar a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}
.wise-legal-bar a:hover,
.wise-legal-bar a:focus-visible {
    color: var(--brand-primary, #b28b42);
    outline: none;
}
.wise-legal-bar span {
    opacity: 0.45;
}

.wise-legal-page .wise-legal-page__body {
    max-width: 42rem;
    margin-top: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--brand-fg, #fff);
}
.wise-legal-page .wise-legal-page__body :is(h2, h3) {
    font-family: var(--wise-font-heading, inherit);
    margin: 1.75rem 0 0.6rem;
    letter-spacing: -0.03em;
}
.wise-legal-page .wise-legal-page__body p,
.wise-legal-page .wise-legal-page__body li {
    color: color-mix(in srgb, var(--brand-fg, #fff) 82%, var(--brand-muted, #d7d7d7));
}
.wise-legal-page .wise-legal-page__body a {
    color: var(--brand-primary, #b28b42);
}
.wise-legal-page .wise-legal-page__body em {
    color: var(--brand-muted, #d7d7d7);
}
.wise-legal-page .wise-legal-page__body .wise-legal-sitemap {
    list-style: none;
    margin: 0.35rem 0 1.5rem;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}
.wise-legal-page .wise-legal-page__body .wise-legal-sitemap li {
    margin: 0;
}
.wise-legal-page .wise-legal-page__body .wise-legal-sitemap a {
    display: inline-block;
    text-decoration: none;
}
.wise-legal-page .wise-legal-page__body .wise-legal-sitemap a:hover,
.wise-legal-page .wise-legal-page__body .wise-legal-sitemap a:focus-visible {
    text-decoration: underline;
}
/* Fallback when imported sitemap anchors remain jammed in a single <p>. */
.wise-legal-page .wise-legal-page__body p:has(> a:nth-of-type(2)) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.wise-consent {
    /* Prefer practice tokens; when --brand-card etc. are unset (landing pages),
       derive from --brand-bg / --brand-fg so light Care and dark Fresh both work. */
    --wise-consent-bg: var(--brand-card, var(--brand-bg, #202020));
    --wise-consent-fg: var(--brand-fg, #fff);
    --wise-consent-muted: var(--brand-muted, color-mix(in srgb, var(--brand-fg, #fff) 68%, var(--brand-bg, #000)));
    --wise-consent-line: var(--brand-border, color-mix(in srgb, var(--brand-fg, #fff) 16%, var(--brand-bg, #000)));
    --wise-consent-brand: var(--brand-primary, #b28b42);
    --wise-consent-on-brand: var(--brand-fg, #111);
    --wise-consent-heading: var(--wise-font-heading, inherit);
    --wise-consent-body: var(--wise-font-body, inherit);
    position: relative;
    z-index: 99980;
    font-family: var(--wise-consent-body);
    color: var(--wise-consent-fg);
    pointer-events: none;
}
.wise-consent[hidden] {
    display: none !important;
}
.wise-consent__overlay {
    position: fixed;
    inset: 0;
    z-index: 99979;
    pointer-events: auto;
    background: color-mix(in srgb, #000 55%, var(--brand-bg, #000));
}
.wise-consent__overlay[hidden] {
    display: none !important;
}
.wise-consent__panel {
    position: fixed;
    z-index: 99981;
    pointer-events: auto;
    box-sizing: border-box;
    background: var(--wise-consent-bg);
    color: var(--wise-consent-fg);
    border: 1px solid var(--wise-consent-line);
    box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.55);
}
.wise-consent__brand {
    margin-bottom: 0.65rem;
}
.wise-consent__logo,
.wise-consent__logo.wise-logo {
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    max-width: 9rem;
}
.wise-consent__logo img,
.wise-consent__logo .custom-logo,
.wise-consent__logo .wise-logo__main {
    display: block;
    height: 28px !important;
    max-height: 28px !important;
    width: auto !important;
    max-width: 9rem !important;
    object-fit: contain;
}
.wise-consent__title {
    margin: 0 0 0.45rem;
    font-family: var(--wise-consent-heading);
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.25;
}
.wise-consent__body,
.wise-consent__privacy {
    margin: 0 0 0.75rem;
    color: var(--wise-consent-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}
.wise-consent__body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    overflow: hidden;
    max-height: 7.5em;
}
.wise-consent__privacy a {
    color: var(--wise-consent-brand);
    font-weight: 650;
    text-decoration: none;
}
.wise-consent__privacy a:hover,
.wise-consent__privacy a:focus-visible {
    text-decoration: underline;
}
.wise-consent__prefs {
    display: grid;
    gap: 0.55rem;
    margin: 0 0 0.9rem;
}
.wise-consent__prefs[hidden] {
    display: none !important;
}
.wise-consent__opt {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--wise-consent-muted);
}
.wise-consent__opt strong {
    color: var(--wise-consent-fg);
    font-weight: 650;
}
.wise-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.wise-consent__btn {
    appearance: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 650;
    line-height: 1.2;
}
.wise-consent__btn--accept {
    border: 0;
    background: var(--wise-consent-brand);
    color: var(--wise-consent-on-brand);
}
.wise-consent__btn--reject,
.wise-consent__btn--manage {
    border: 1px solid var(--wise-consent-line);
    background: transparent;
    color: var(--wise-consent-fg);
}
.wise-consent__btn:hover,
.wise-consent__btn:focus-visible {
    opacity: 0.92;
    outline: 2px solid var(--wise-consent-brand);
    outline-offset: 2px;
}

.wise-consent[data-layout="bottom-bar"] .wise-consent__panel {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    display: grid;
    gap: 0.35rem 1.25rem;
    /* Align inner content with LP / site column when --lp-max is set */
    padding: 0.85rem max(1.25rem, calc((100vw - min(100vw, var(--lp-max, 72rem))) / 2 + 1.25rem)) 1rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    max-height: min(42vh, 18rem);
    overflow: auto;
}
.wise-consent[data-layout="bottom-bar"] .wise-consent__brand {
    margin-bottom: 0;
    align-self: center;
}
@media (min-width: 880px) {
    .wise-consent[data-layout="bottom-bar"] .wise-consent__panel {
        grid-template-columns: auto minmax(0, 1.4fr) auto;
        align-items: center;
    }
    .wise-consent[data-layout="bottom-bar"] .wise-consent__brand { grid-row: 1 / span 3; }
    .wise-consent[data-layout="bottom-bar"] .wise-consent__actions { justify-content: flex-end; }
    .wise-consent[data-layout="bottom-bar"] .wise-consent__prefs { grid-column: 2; }
}

.wise-consent[data-layout="top-bar"] .wise-consent__panel {
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}
.admin-bar .wise-consent[data-layout="top-bar"] .wise-consent__panel {
    top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
    .admin-bar .wise-consent[data-layout="top-bar"] .wise-consent__panel {
        top: var(--wp-admin--admin-bar--height, 46px);
    }
}

.wise-consent[data-layout="corner-left"] .wise-consent__panel,
.wise-consent[data-layout="corner-right"] .wise-consent__panel,
.wise-consent[data-layout="floating"] .wise-consent__panel {
    display: flex;
    flex-direction: column;
    width: min(24rem, calc(100vw - 1.5rem));
    max-height: min(85dvh, calc(100dvh - 1.5rem));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.15rem 1.2rem 0;
    border-radius: 1.25rem;
}
.wise-consent[data-layout="corner-left"] .wise-consent__panel {
    left: max(0.85rem, env(safe-area-inset-left, 0px));
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
}
.wise-consent[data-layout="corner-right"] .wise-consent__panel {
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
}
.wise-consent[data-layout="floating"] .wise-consent__panel {
    left: 50%;
    bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
}
.wise-consent[data-layout="corner-left"] .wise-consent__actions,
.wise-consent[data-layout="corner-right"] .wise-consent__actions,
.wise-consent[data-layout="floating"] .wise-consent__actions {
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
    margin-top: 0.35rem;
    padding: 0.75rem 0 1.15rem;
    background: linear-gradient(
        to top,
        var(--wise-consent-bg) 72%,
        color-mix(in srgb, var(--wise-consent-bg) 70%, transparent)
    );
}

.wise-consent[data-layout="modal"] .wise-consent__panel {
    left: 50%;
    top: 50%;
    width: min(28rem, calc(100vw - 1.75rem));
    padding: 1.4rem 1.35rem 1.3rem;
    border-radius: 1.4rem;
    transform: translate(-50%, -50%);
}
body.wise-consent-lock {
    overflow: hidden;
}
body:has(.wise-consent[data-layout="bottom-bar"]:not([hidden])) {
    padding-bottom: 7.5rem;
}
body:has(.wise-consent[data-layout="top-bar"]:not([hidden])) {
    padding-top: 6.5rem;
}

@media (max-width: 639px) {
    .wise-consent[data-layout="corner-left"] .wise-consent__panel,
    .wise-consent[data-layout="corner-right"] .wise-consent__panel {
        left: 0.65rem;
        right: 0.65rem;
        width: auto;
        bottom: 0.65rem;
    }
    .wise-consent[data-layout="bottom-bar"] .wise-consent__panel {
        padding: 0.9rem 1rem 1rem;
    }
}
