/* Cookiebot: hide branding + keep the floating widget beside the accessiBe button */

/* Branding on the banner */
a#CybotCookiebotDialogPoweredbyCybot,
div#CybotCookiebotDialogPoweredByText {
    display: none;
}

/* Branding on the Privacy trigger (floating widget) */
#CookiebotWidget .CookiebotWidget-body .CookiebotWidget-main-logo {
    display: none !important;
}

/* At <=1023px accessiBe switches to its compact trigger (45px at left/bottom 3px), which
   overlaps Cookiebot (left:10px below 600px) or sits off-level with it (left:80px/bottom:20px above).
   Put the collapsed Cookiebot button beside it, centered on the same line. */
@media screen and (max-width: 1023.98px) {
    #CookiebotWidget:not(.CookiebotWidget-open) {
        left: 58px !important;   /* trigger left 3 + width 45 + 10px gap */
        bottom: 2px !important;  /* trigger centre 3 + 45/2 = 25.5px; 25.5 - 48/2 ~ 2px */
    }
}

@media screen and (max-width: 600px) {
    /* Open panel spans the screen; lift it so the accessiBe trigger doesn't cover its buttons */
    #CookiebotWidget.CookiebotWidget-open {
        bottom: 56px !important;
    }
}

/* Cookie Declaration modal: sit above other fixed, high z-index widgets (accessiBe, Cookiebot widget) */
#cookieDeclarationModal { z-index: 2147483647; }
/* Only raise the backdrop while the cookie modal is open, so other modals stay above theirs (BS3 uses .in) */
body:has(#cookieDeclarationModal.in) .modal-backdrop { z-index: 2147483646; }
#cookieDeclarationModal .modal-dialog { max-width: 760px; }
#cookieDeclarationModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 25px 30px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    text-align: left;
}
/* Theme gives .modal-header the red #8c0000 background: white title/close (~9.6:1) */
#cookieDeclarationModal .modal-title { color: #fff; margin: 0; }
#cookieDeclarationModal .modal-header .close { color: #fff; opacity: .9; text-shadow: none; }
#cookieDeclarationModal .modal-header .close:hover,
#cookieDeclarationModal .modal-header .close:focus { opacity: 1; }
#CookieDeclarationContainer { max-width: 100%; word-wrap: break-word; overflow-wrap: break-word; }
#CookieDeclarationContainer .cookie-declaration-loading { margin: 0; color: #666; }
#CookieDeclarationContainer h2,
#CookieDeclarationContainer h3 { font-size: 17px; margin: 20px 0 8px; color: #222; text-transform: none; }
#CookieDeclarationContainer h2:first-child,
#CookieDeclarationContainer h3:first-child { margin-top: 0; }
#CookieDeclarationContainer p { font-size: 14px; margin-bottom: 10px; }
#CookieDeclarationContainer a { color: #8c0000; text-decoration: underline; word-break: break-word; }
#CookieDeclarationContainer table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin: 10px 0 20px;
    font-size: 13px;
}
#CookieDeclarationContainer table thead,
#CookieDeclarationContainer table tbody,
#CookieDeclarationContainer table tr { display: table; width: 100%; table-layout: fixed; }
#CookieDeclarationContainer table th,
#CookieDeclarationContainer table td {
    padding: 8px 10px;
    border: 1px solid #e5e5e5;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}
#CookieDeclarationContainer table th { background: #f7f2f2; }

/* Footer "Cookie Declaration" link.
   Desktop pages: white on the dark subfooter (#373737, ~11.9:1).
   Mobile page: keeps the theme link colour of the neighbouring "View Full Website" link. */
a.footer-cookie-link {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 1px;
    transition: text-underline-offset .15s ease, text-decoration-thickness .15s ease;
}
a.footer-cookie-link:hover,
a.footer-cookie-link:focus {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
a.footer-cookie-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}
.subfooter a.footer-cookie-link,
.subfooter a.footer-cookie-link:visited,
.subfooter a.footer-cookie-link:hover,
.subfooter a.footer-cookie-link:focus { color: #fff; }

/* Copyright text beside the link: theme #999 on #373737 was ~4.2:1 (fails AA); #ccc is ~7.4:1 */
.dark .subfooter { color: #ccc; }
