/*
 * Consent placeholders for YouTube videos (consent-embeds.js) and route maps (consent-map.js).
 * Shared by the themes Main, Balance and Schwimmen.
 */

/* --- Videos ------------------------------------------------------------- */
.consent-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #f2f2f2;
}

/* inside the HTML content element the frame already is a responsive box (see main.less .frame-type-html) */
.frame-type-html .consent-embed {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    aspect-ratio: auto;
}

.consent-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.consent-embed__placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    height: 100%;
    padding: 1.5em;
    overflow: auto;
    font-size: 0.9em;
    line-height: 1.5;
    color: #333;
}

.consent-embed__placeholder p {
    margin: 0 0 0.8em;
}

.consent-embed__actions,
.map-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    align-items: center;
}

.consent-embed__settings,
.map-consent__settings {
    padding: 0.5em 0.7em;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 100%;
    cursor: pointer;
}

/* links in running text must not rely on colour alone (WCAG 1.4.1) */
.consent-embed__placeholder a,
.map-consent__overlay a {
    text-decoration: underline;
}

/* --- Maps --------------------------------------------------------------- */
.map-consent {
    position: relative;
    width: 100%;
    margin-bottom: 2.8em;
}

.map-consent__map {
    width: 100%;
    height: 550px;
}

.map-consent__overlay {
    box-sizing: border-box;
    padding: 1.5em;
    background-color: #f2f2f2;
    font-size: 0.9em;
    line-height: 1.5;
    color: #333;
}

.map-consent__overlay p {
    margin: 0 0 0.8em;
}

.map-consent__address {
    padding: 1em 1.5em 0;
}

.map-consent.is-loaded .map-consent__address,
.map-consent.is-loaded .map-consent__overlay {
    display: none;
}

/* small map (former #map2 of the Schwimmen theme): fixed height on all devices, no bottom margin */
.map-consent--small {
    margin-bottom: 0;
}

.map-consent--small .map-consent__map {
    height: 250px;
}

@media only screen and (max-width: 740px) and (orientation: landscape) {
    .map-consent__map {
        height: 250px;
    }
}

@media only screen and (max-width: 480px) and (orientation: portrait) {
    .map-consent__map {
        height: 380px;
    }
}

/* --- Footer: "Cookie-Einstellungen" (w52_consent shows the button and reopens the banner) ------------ */
/* the list floats right (main.css): the entry is the first item in the DOM and therefore shown rightmost */
#footer-menu .footer-consent:has(> [hidden]) {
    display: none;
}

/* without the entry, its neighbour must not show the separator of main.css (li:not(:first-child):after) */
#footer-menu .footer-consent:has(> [hidden]) + li {
    padding-right: 0;
    margin-right: 0;
}

#footer-menu .footer-consent:has(> [hidden]) + li::after {
    content: none;
}

/* one more entry: main.css limits the list to 300px, which would wrap it */
footer #footer-menu ul {
    max-width: none;
}

#footer-menu .footer-consent__button {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: var(--sp-farbe, #C31924);
    font: inherit;
    cursor: pointer;
}

#footer-menu .footer-consent__button:hover,
#footer-menu .footer-consent__button:focus-visible {
    text-decoration: underline;
}

/* --- Privacy pages: "Cookie-Einstellungen" button in an HTML content element ------------------------ */
/* formerly a <style> block inside the content element (blocked by the Content-Security-Policy) */
.frame-type-html:has(> [data-consent-open]) {
    padding-bottom: 10% !important;
    padding-top: 0 !important;
}
