/* Cookie-/Consent-Banner — Werner Rumler GmbH */
#consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #ffffff;
    border-top: 3px solid var(--color-orange, #FF6A00);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
    font-family: var(--font-body, 'Lato', system-ui, sans-serif);
    color: #222;
    padding: 18px 20px;
    animation: consent-in 0.3s ease-out;
}
@keyframes consent-in {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.consent__inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}
.consent__text {
    flex: 1;
    min-width: 280px;
    font-size: 14px;
    line-height: 1.6;
}
.consent__text strong { display: block; margin-bottom: 4px; }
.consent__text a {
    color: var(--color-orange, #FF6A00);
    text-decoration: underline;
}
.consent__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.consent__btn {
    border: 1.5px solid #c8c8c8;
    background: #fff;
    color: #222;
    padding: 12px 22px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.consent__btn--accept {
    background: var(--color-orange, #FF6A00);
    border-color: var(--color-orange, #FF6A00);
    color: #fff;
}
.consent__btn--accept:hover { filter: brightness(0.92); }
.consent__btn--ghost:hover { border-color: var(--color-orange, #FF6A00); color: var(--color-orange, #FF6A00); }

@media (max-width: 720px) {
    #consent-banner { padding: 14px 16px; }
    .consent__inner { flex-direction: column; align-items: stretch; gap: 14px; }
    .consent__actions { width: 100%; flex-wrap: wrap; }
    .consent__btn { flex: 1 0 auto; padding: 12px; min-width: 0; }
}

/* ── Einstellungs-Modal ───────────────────────────────────── */
#consent-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body, 'Lato', system-ui, sans-serif);
    color: #222;
    padding: 20px;
}
.consent-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
.consent-modal__box {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 32px 32px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: consent-in 0.2s ease-out;
}
.consent-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #777;
    cursor: pointer;
    padding: 0;
}
.consent-modal__close:hover { color: var(--color-orange, #FF6A00); }
.consent-modal__title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
}
.consent-modal__intro {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}
.consent-modal__services {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
}
.consent-modal__service {
    padding: 16px 18px;
    background: #f7f7f8;
    border-left: 3px solid var(--color-orange, #FF6A00);
}
.consent-modal__service-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}
.consent-modal__service-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}
.consent-modal__service-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #555;
}
.consent-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Toggle-Switch */
.consent-toggle {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    cursor: pointer;
}
.consent-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.consent-toggle__slider {
    position: absolute;
    inset: 0;
    background: #c8c8c8;
    border-radius: 24px;
    transition: background 0.2s;
}
.consent-toggle__slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.consent-toggle input:checked + .consent-toggle__slider {
    background: var(--color-orange, #FF6A00);
}
.consent-toggle input:checked + .consent-toggle__slider::before {
    transform: translateX(20px);
}
.consent-toggle input:disabled + .consent-toggle__slider {
    background: var(--color-orange, #FF6A00);
    opacity: 0.55;
    cursor: not-allowed;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 560px) {
    .consent-modal__box { padding: 24px 20px 20px; }
    .consent-modal__actions { flex-direction: column-reverse; }
    .consent-modal__actions .consent__btn { width: 100%; }
}

/* Map-Platzhalter, wenn kein Consent erteilt wurde */
.map-consent-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: #f3f3f3 center / cover no-repeat
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><circle cx="40" cy="32" r="10" fill="none" stroke="%23999" stroke-width="3"/><path d="M40 12c-11 0-20 9-20 20 0 14 20 36 20 36s20-22 20-36c0-11-9-20-20-20z" fill="none" stroke="%23999" stroke-width="3"/></svg>');
    background-size: 60px 60px;
    background-position: center 28%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 24px;
    text-align: center;
    font-family: var(--font-body, 'Lato', sans-serif);
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #e0e0e0;
}
.map-consent-placeholder a {
    color: var(--color-orange, #FF6A00);
    font-weight: 600;
    text-decoration: underline;
}
