a.cc-btn.cc-allow, .cc-highlight .cc-btn:first-child {
    color: white;
    background-color: rgb(113, 152, 74);
    border-bottom: 1px solid transparent;
}

a.cc-btn.cc-allow:hover, a.cc-btn.cc-deny:hover {
    color: white !important;
    background-color: transparent !important;
    text-decoration: underline !important;
}

.cc-window {
    /*
     * Side inset: a roomy fixed value while the page content is still fluid, then the
     * content's own inset once it takes a fixed width, so the popup lines up with it.
     */
    --cc-page-gutter: 1.5em;
    --cc-padding-y: 1.75em;
    /* Softens the opaque background the colour palette sets, for either popup variant. */
    background-color: rgba(0, 0, 0, 0.85) !important;
    max-height: 100vh !important;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden !important;
}

@media only screen and (min-width: 768px) {
    .cc-window {
        --cc-page-gutter: calc((100% - 750px) / 2 + 15px);
        --cc-padding-y: 1.5em;
    }
}

@media only screen and (min-width: 992px) {
    .cc-window {
        --cc-page-gutter: calc((100% - 970px) / 2 + 15px);
    }
}

@media only screen and (min-width: 1200px) {
    .cc-window {
        --cc-page-gutter: calc((100% - 1170px) / 2 + 15px);
    }
}

/*
 * Two columns: the text takes the free width, the buttons keep their own.
 * Both popup variants are full-width bars here, so they share one layout - which
 * one is used depends on the device, not on the width, so neither can be treated
 * as the "mobile" case.
 */
.cc-window.cc-banner,
.cc-window.cc-floating {
    flex-direction: row;
    align-items: center;
    gap: 1.5em;
    padding: var(--cc-padding-y) var(--cc-page-gutter);
}

.cc-message {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    flex: 1 1 auto;
    min-height: 0;
}

/* The column gap above is the only spacing between the text and the buttons. */
.cc-banner .cc-message,
.cc-floating .cc-message {
    margin-right: 0;
    margin-bottom: 0;
}

/* The buttons stack, primary on top, and share the width of the widest one. */
.cc-compliance {
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    align-items: stretch;
    flex-shrink: 0;
    gap: 0.5em;
}

/*
 * Keep the second column sized by its buttons: it neither splits the bar in half nor
 * gets squashed when a long text has to scroll on a short screen.
 */
.cc-window.cc-banner .cc-compliance,
.cc-window.cc-floating .cc-compliance {
    flex: 0 0 auto;
}

.cc-bottom {
    bottom: 0 !important;
}

.cc-floating {
    max-width: 100% !important;
    width: 100% !important;
}

.cc-btn {
    margin: 0 !important;
}

@media only screen and (max-width: 768px) {
    /* Single column: the text sits above the buttons. */
    .cc-window.cc-banner,
    .cc-window.cc-floating {
        flex-direction: column;
        align-items: stretch;
    }

    .cc-window {
        max-height: 100vh !important;
    }

    .cc-revoke {
        left: unset !important;
        right: 3em;
    }
}

.cp-link, .cp-link:active,
.cp-link:visited, .cp-link:hover {
    color: rgb(255, 255, 255);
}

.cc-link {
    display: none !important;
}

.cp-link {
    opacity: .8;
    display: inline-block;
    padding: .2em;
    text-decoration: underline;
}
