/* Präsenza card design adapted to AdSimple's local bottom banner. */
#ascm-banner-root > .cc-window.cc-banner[data-position="bottom"] {
    --hl-consent-primary: #a3203d;
    --hl-consent-text: #3f3034;
    --hl-consent-muted: #645156;
    --hl-consent-surface: #fff;
    --hl-consent-soft: #fcf1f3;
    --hl-consent-border: #ecd2d8;
    --hl-consent-padding: 22px;

    position: fixed;
    inset: auto 22px 22px auto;
    width: min(460px, calc(100% - 44px));
    max-width: none;
    max-height: calc(100vh - 44px);
    max-height: calc(100dvh - 44px);
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    box-sizing: border-box;
    padding: 0;
    overflow: hidden auto;
    overscroll-behavior-y: contain;
    background: var(--hl-consent-surface) !important;
    border: 1px solid var(--hl-consent-border);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgb(88 26 44 / 19%), 0 5px 16px rgb(88 26 44 / 8%);
    color: var(--hl-consent-text) !important;
    font: 400 14px/1.5 var(--hldesign-body-family, system-ui), sans-serif;
    text-align: left;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-message {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 var(--hl-consent-padding) 14px;
    color: var(--hl-consent-text) !important;
    box-sizing: border-box;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-message::before {
    content: "";
    display: block;
    height: 78px;
    margin: 0 calc(-1 * var(--hl-consent-padding)) 17px;
    background:
        url("heartlines-logo.png") left var(--hl-consent-padding) center / 172px auto no-repeat,
        linear-gradient(112deg, #fff7f3, #fff8fa 60%, #fff);
    border-bottom: 1px solid var(--hl-consent-border);
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-modal__heading {
    margin: 0 0 13px;
    padding: 0;
    color: var(--hl-consent-primary);
    font-size: 24px;
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -.02em;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-modal__text {
    margin: 0;
    padding: 0;
    color: var(--hl-consent-muted);
    font-size: 14px;
    line-height: 1.5;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-modal__tab-panel p {
    margin: 0;
    color: inherit;
    font: inherit;
    overflow-wrap: anywhere;
}

#ascm-banner-root [data-position="bottom"].cc-banner :is(.cc-modal__text a, .cc-modal__text .cc-btn, .cc-settings-link) {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: var(--hl-consent-primary) !important;
    font-size: inherit;
    font-weight: 650;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: .14em;
    white-space: normal;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-modal__main-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 12px;
    padding: 4px;
    border: 1px solid var(--hl-consent-border);
    border-radius: 12px;
    background: var(--hl-consent-soft);
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-modal__tabs-heading_item {
    display: grid;
    min-height: 40px;
    place-items: center;
    margin: 0;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--hl-consent-muted);
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-modal__tabs-heading_item.active {
    background: var(--hl-consent-surface);
    border-color: var(--hl-consent-border);
    color: var(--hl-consent-primary);
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-details {
    order: 1;
    width: auto;
    min-width: 0;
    margin: 0 var(--hl-consent-padding) 14px;
    padding: 0;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-details-body {
    height: auto;
    padding: 5px 10px;
    overflow: visible;
    border: 1px solid var(--hl-consent-border);
    border-radius: 12px;
    background: var(--hl-consent-soft);
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-details-wrapper {
    padding: 0;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-details-menu-item {
    margin: 5px 0;
    padding: 0;
    border: 1px solid var(--hl-consent-border);
    border-radius: 9px;
    background: var(--hl-consent-surface);
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-details-menu-item > label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 43px;
    margin: 0;
    padding: 7px 10px;
    color: var(--hl-consent-text);
    font: 620 13px/1.4 var(--hldesign-body-family, system-ui), sans-serif;
    overflow-wrap: anywhere;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-details-menu-item .summary-arrow {
    position: static;
    flex: 0 0 auto;
    border-left-color: var(--hl-consent-primary);
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-modal__checkbox-mark {
    position: relative;
    flex: 0 0 22px;
    height: 22px;
    margin: 0 0 0 auto;
    overflow: hidden;
    border: 1px solid #b88691;
    border-radius: 5px;
    background: var(--hl-consent-surface);
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-modal__checkbox-mark-bg {
    background: var(--hl-consent-primary);
    opacity: 0;
}

#ascm-banner-root [data-position="bottom"].cc-banner input:checked + .cc-modal__checkbox-mark .cc-modal__checkbox-mark-bg {
    opacity: 1;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-modal__checkbox-mark-tick {
    top: 4px;
    left: 4px;
    border-color: #fff;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-details-content {
    margin: 0 0 6px;
    padding: 8px;
    overflow-x: auto;
    color: var(--hl-consent-text);
    overflow-wrap: anywhere;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-compliance {
    position: static;
    display: flex;
    order: 2;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 var(--hl-consent-padding) 16px;
    box-sizing: border-box;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-button_wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin: 0;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-button_wrapper .cc-btn {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 9px 8px;
    box-sizing: border-box;
    border: 1px solid #bd536b !important;
    border-radius: 10px;
    background: var(--hl-consent-surface) !important;
    color: var(--hl-consent-primary) !important;
    font: 720 13px/1.25 var(--hldesign-body-family, system-ui), sans-serif;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-button_wrapper .cc-btn:hover {
    background: var(--hl-consent-soft) !important;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-button_wrapper .cc-btn--fullwidth {
    grid-column: 1 / -1;
    border-color: var(--hl-consent-primary) !important;
    background: var(--hl-consent-primary) !important;
    color: #fff !important;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-button_wrapper .cc-btn--fullwidth:hover {
    background: #85192f !important;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 13px;
    margin: 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--hl-consent-border);
    color: var(--hl-consent-muted);
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
}

#ascm-banner-root [data-position="bottom"].cc-banner .cc-footer__links a {
    margin: 0;
    color: var(--hl-consent-primary) !important;
    text-decoration: underline !important;
    text-underline-offset: .14em;
}

#ascm-banner-root [data-position="bottom"].cc-banner :focus-visible,
.cc-body .cc-revoke[class*="cc-scope-"]:focus-visible {
    outline: 2px solid #a3203d;
    outline-offset: 2px;
}

/* AdSimple creates the reopen control outside the banner container. */
.cc-body .cc-revoke[class*="cc-scope-"] {
    left: 10px !important;
    bottom: 10px !important;
    border-radius: 50%;
}

.cc-body .cc-revoke[class*="cc-scope-"] .cc-revoke-icon {
    background-color: transparent !important;
}

.cc-body .cc-revoke[class*="cc-scope-"] .cc-revoke-icon svg {
    display: block;
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 3px 8px rgb(88 26 44 / 22%));
}

.cc-body .cc-revoke[class*="cc-scope-"] .cc-revoke-icon svg rect {
    fill: #a3203d;
}

.cc-body .cc-revoke[class*="cc-scope-"] .cc-revoke-text {
    border-radius: 10px;
    background: #a3203d !important;
    color: #fff !important;
}

@media (max-width: 620px) {
    #ascm-banner-root > .cc-window.cc-banner[data-position="bottom"] {
        --hl-consent-padding: 16px;
        right: max(9px, env(safe-area-inset-right));
        bottom: max(9px, env(safe-area-inset-bottom));
        width: calc(100% - 18px);
        max-height: calc(100vh - 18px);
        max-height: calc(100dvh - 18px - env(safe-area-inset-bottom));
        border-radius: 17px;
    }

    #ascm-banner-root [data-position="bottom"].cc-banner .cc-message::before {
        height: 64px;
        margin-bottom: 14px;
        background-size: 146px auto, auto;
    }

    #ascm-banner-root [data-position="bottom"].cc-banner .cc-modal__heading {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ascm-banner-root [data-position="bottom"].cc-banner,
    .cc-body .cc-revoke[class*="cc-scope-"] {
        transition: none;
        animation: none;
    }
}
