/* =========================================================
   HGS - MAP CONSENT PLACEHOLDER
   ---------------------------------------------------------
   Shown in place of an external map until the visitor asks for it.
   Loaded only by the two pages that embed a map (contact.html and
   verkehrssicherung-stuttgart.html).

   This is a MAP PLACEHOLDER, not a cookie banner: it sits inside the
   space the map itself occupies and uses the site's own design tokens.

     yellow      #f7d34f (hover #e6c845)  - .btn-yellow
     ink         #111
     muted text  #6b7280
     surface     #f3f4f6 / #fafafa
     the radius and border come from the surrounding
     .location-map / .coverage-map container, which is unchanged
   ========================================================= */

.map-consent {
    width: 100%;
    height: 100%;
    min-height: inherit;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 32px 28px;
    background-color: #f3f4f6;
    /* a faint grid, so the area reads as "a map goes here" rather than
       as an empty box - pure CSS, no image request */
    background-image:
        linear-gradient(rgba(17, 17, 17, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 17, 17, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
}

.map-consent__icon {
    width: 44px;
    height: 44px;
    flex: none;
    color: #111;
    opacity: 0.55;
}

.map-consent__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.map-consent__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: #111;
}

.map-consent__text {
    max-width: 46ch;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #6b7280;
}

.map-consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    margin-top: 4px;
}

/* `.btn-yellow` comes from header.css, which both pages already load;
   only the button reset is needed here. */
.map-consent__btn {
    border: none;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
}

.map-consent__btn:focus-visible {
    outline: 3px solid #111;
    outline-offset: 3px;
}

/* ---------- "remember this choice" ----------
   Carries the `hidden` attribute in the markup and is revealed by
   JS/mapConsent.js only when the choice can actually be stored, so the
   [hidden] rule must win over the display above it. A real checkbox
   with a real <label>: the accent colour and the focus ring come from
   the site's yellow, nothing is reimplemented as a div. */
.map-consent__remember {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    max-width: 46ch;
    margin: 0;
    text-align: left;
}

.map-consent__remember[hidden] {
    display: none;
}

.map-consent__checkbox {
    flex: none;
    width: 17px;
    height: 17px;
    margin: 1px 0 0 0;
    accent-color: #f7d34f;
    cursor: pointer;
}

.map-consent__checkbox:focus-visible {
    outline: 3px solid #111;
    outline-offset: 2px;
}

.map-consent__remember-label {
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
    cursor: pointer;
}

.map-consent__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    margin: 2px 0 0 0;
    font-size: 14px;
    color: #6b7280;
}

.map-consent__links a {
    color: #6b7280;
    text-decoration: underline;
    text-decoration-color: #d1d5db;
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.map-consent__links a:hover {
    color: #111;
    text-decoration-color: #f7d34f;
}

.map-consent__sep {
    color: #d1d5db;
}

/* ---------- no JavaScript ----------
   The button cannot work without JS, so it is hidden and the
   alternative text is revealed instead. The <noscript> element in the
   page carries the <style> that flips these two. */
.map-consent__noscript {
    display: none;
    max-width: 46ch;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #6b7280;
}

/* ---------- small screens ---------- */
@media (max-width: 520px) {
    .map-consent {
        padding: 24px 18px;
        gap: 12px;
    }

    .map-consent__icon {
        width: 36px;
        height: 36px;
    }

    .map-consent__title {
        font-size: 18px;
    }

    .map-consent__text,
    .map-consent__noscript {
        font-size: 14px;
    }

    .map-consent__actions {
        /* full-width tap target rather than a cramped row */
        flex-direction: column;
        align-items: stretch;
        align-self: stretch;
    }

    .map-consent__btn {
        text-align: center;
    }

    .map-consent__remember {
        align-self: stretch;
        justify-content: flex-start;
    }

    .map-consent__remember-label {
        font-size: 13px;
    }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .map-consent__links a {
        transition: none;
    }
}
