/**
 * Agentur Toolkit – Consent-Modul für externe Medien (seit 2.15.0)
 * Platzhalter für Google Maps, YouTube und Vimeo sowie der Widerruf-Bereich.
 * Farben bewusst neutral, damit es zu jeder Kundenseite passt.
 * Anpassungen bitte in der custom.css des Child-Themes.
 */

.joba-consent {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 220px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
    color: #222;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

/* Mitgelieferte Hintergrundbilder (seit 2.15.2) – lokal, keine Verbindung zu Google/Vimeo.
   Ein eigenes Kartenbild aus der Mediathek (Klasse joba-consent--image, Inline-Style) hat Vorrang. */
.joba-consent--maps:not(.joba-consent--image):not(.joba-consent--loaded) {
    background-image: url(../img/consent-map.svg);
}

.joba-consent--youtube:not(.joba-consent--loaded),
.joba-consent--vimeo:not(.joba-consent--loaded) {
    background-color: #1b1e23;
    background-image: url(../img/consent-video.svg);
}

/* Ohne Größenangabe im iframe: übliches 16:9 für Videos */
.joba-consent--youtube:not([style*="aspect-ratio"]):not([style*="height"]),
.joba-consent--vimeo:not([style*="aspect-ratio"]):not([style*="height"]) {
    aspect-ratio: 16 / 9;
}

.joba-consent--maps:not([style*="aspect-ratio"]):not([style*="height"]) {
    height: 400px;
}

.joba-consent__box {
    box-sizing: border-box;
    max-width: 520px;
    margin: 16px;
    padding: 20px 22px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.joba-consent__title {
    margin: 0 0 6px;
    padding: 0;
    font-weight: 700;
    font-size: 1.05em;
}

.joba-consent__text {
    margin: 0 0 14px;
    padding: 0;
    font-size: 0.92em;
}

.joba-consent__text a {
    color: inherit;
    text-decoration: underline;
}

.joba-consent__btn {
    display: inline-block;
    padding: 10px 22px;
    border: 0;
    border-radius: 4px;
    background: #222;
    color: #fff;
    font-size: 1em;
    line-height: 1.3;
    cursor: pointer;
}

.joba-consent__btn:hover,
.joba-consent__btn:focus {
    background: #000;
}

.joba-consent__btn:focus-visible,
.joba-revoke__btn:focus-visible {
    outline: 3px solid #2271b1;
    outline-offset: 2px;
}

.joba-consent__remember {
    display: block;
    margin-top: 12px;
    font-size: 0.88em;
    cursor: pointer;
}

.joba-consent__remember input {
    margin: 0 4px 0 0;
    vertical-align: middle;
}

.joba-consent__link {
    display: inline-block;
    margin-top: 10px;
    color: inherit;
}

/* Nach dem Laden: iframe füllt den Platzhalter */
.joba-consent--loaded {
    display: block;
    min-height: 0;
    background: none;
}

.joba-consent--loaded > iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.joba-consent--loaded:not([style*="aspect-ratio"]):not([style*="height"]) > iframe {
    min-height: 400px;
}

/* WordPress-Embed-Blöcke mit festem Seitenverhältnis (Wrapper mit padding-top) */
.wp-has-aspect-ratio .wp-block-embed__wrapper > .joba-consent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: auto;
    min-height: 0;
}

/* Divi-Kartenmodul */
.joba-consent-divimap .joba-consent {
    height: 440px;
}

/* Kleine Bildschirme */
@media (max-width: 480px) {
    .joba-consent__box {
        margin: 8px;
        padding: 14px;
    }

    .joba-consent {
        font-size: 14px;
    }
}

/* ---------- Widerruf [joba_consent_widerruf] ---------- */

.joba-revoke__list {
    margin: 0 0 12px;
    padding-left: 1.2em;
}

.joba-revoke__list li {
    margin-bottom: 6px;
}

.joba-revoke__btn {
    padding: 4px 12px;
    border: 1px solid currentColor;
    border-radius: 3px;
    background: transparent;
    color: inherit;
    font-size: 0.9em;
    cursor: pointer;
}

.joba-revoke__status:empty {
    display: none;
}
