/* Bilddialog im Stil des bestehenden WhatsApp-Popups. */
.autohaus-gewaehrleistung-dialog {
    width: min(760px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: #1a1a2e;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .15);
    font-family: inherit;
    overflow: hidden;
}
.autohaus-gewaehrleistung-dialog:not([open]) { display: none; }
.autohaus-gewaehrleistung-dialog [hidden] { display: none !important; }
.autohaus-gewaehrleistung-error {
    margin: 12px 0;
    padding: 16px;
    border-radius: 8px;
    background: #f7f8fa;
    color: #5a6570;
    font-size: .95rem;
    line-height: 1.5;
}
.autohaus-gewaehrleistung-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.autohaus-gewaehrleistung-panel {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}
.autohaus-gewaehrleistung-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    flex-shrink: 0;
    border-bottom: 1px solid #e8ecf5;
}
.autohaus-gewaehrleistung-header h2 {
    flex: 1;
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
    font-weight: 700;
    color: #1a1a2e;
}
/* Die Überschrift ist das neutrale Leseziel beim Öffnen, kein Bedienelement. */
.autohaus-gewaehrleistung-header h2:focus { outline: none; }
.autohaus-gewaehrleistung-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e8ecf5;
    color: #3a4a5a;
    font: inherit;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}
.autohaus-gewaehrleistung-close svg {
    display: block;
    flex: none;
    width: 20px;
    height: 20px;
    pointer-events: none;
}
.autohaus-gewaehrleistung-content {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 16px 24px;
}
/* Vollständiges Textäquivalent, ohne die offizielle Grafik zu verändern. */
.autohaus-gewaehrleistung-text,
.autohaus-gewaehrleistung-new-tab {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.autohaus-gewaehrleistung-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
}
.autohaus-gewaehrleistung-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 24px;
    flex-shrink: 0;
    border-top: 1px solid #e8ecf5;
}
.autohaus-gewaehrleistung-eu-link {
    flex: 1 1 230px;
    color: var(--accent-color, #303090);
    font-size: .88rem;
    line-height: 1.5;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}
.autohaus-gewaehrleistung-close:hover { background: #dde2ef; }
.autohaus-gewaehrleistung-dialog :focus-visible {
    outline: 3px solid var(--accent-color, #303090);
    outline-offset: 3px;
}
.autohaus-gewaehrleistung-content:focus-visible { outline-offset: -3px; }
@media (max-width: 480px) {
    .autohaus-gewaehrleistung-header,
    .autohaus-gewaehrleistung-actions { padding: 12px 16px; }
    .autohaus-gewaehrleistung-content { padding: 12px; }
    .autohaus-gewaehrleistung-header h2 { font-size: 1rem; }
}

/* Desktop: Das Bild wird auf die verfügbare Dialoghöhe begrenzt, damit ohne Scrollen alles sichtbar ist. */
@media (min-width: 481px) {
    .autohaus-gewaehrleistung-image {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: calc(100vh - 220px);
        max-height: calc(100dvh - 220px);
        margin: 0 auto;
    }
}
