/* Cookie consent banner and the map placeholder that stands in for the
   embedded map until it is allowed.

   Ships with the site scaffold, not with a template, and is loaded by
   js/config.js rather than by a <link> in the page — a template cannot forget
   it, and a template author never has to know it exists.

   Every colour falls back to a literal, because this file has to look right on
   a template it has never seen. The custom properties below are the five that
   every template defines; a template that names its palette differently still
   gets a legible banner rather than an invisible one. */

.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: 1.15rem 1.5rem;
    background: var(--color-dark, #14181f);
    color: var(--color-light, #ffffff);
    box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.28);
    font-size: 0.9rem;
    line-height: 1.55;
}

.cookie-consent__text {
    margin: 0;
    max-width: 62ch;
}

.cookie-consent__link {
    color: inherit;
    text-decoration: underline;
    white-space: nowrap;
}

.cookie-consent__actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Same size, same shape, same prominence. The only difference is fill, and
   that is so the pair reads as a pair rather than as a button and a hint. */
.cookie-consent__btn {
    font: inherit;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--color-light, #ffffff);
    transition: opacity 0.15s ease;
}

.cookie-consent__btn:hover {
    opacity: 0.85;
}

.cookie-consent__btn:focus-visible {
    outline: 2px solid var(--color-primary, #ffffff);
    outline-offset: 2px;
}

.cookie-consent__btn--decline {
    background: transparent;
    color: var(--color-light, #ffffff);
}

.cookie-consent__btn--accept {
    background: var(--color-light, #ffffff);
    color: var(--color-dark, #14181f);
}

/* On a phone the bar becomes a stack and the buttons go full width, so neither
   is the one your thumb happens to reach first. */
@media (max-width: 640px) {
    .cookie-consent {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        padding: 1.1rem 1.15rem;
    }

    .cookie-consent__actions {
        width: 100%;
    }

    .cookie-consent__btn {
        flex: 1;
    }
}


/* --- map placeholder ---------------------------------------------------
   The template gives .map-band its height and its place in the layout; this
   only fills it. Sized at 100% so it matches whatever the template chose,
   including at its own breakpoints. */

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    height: 100%;
    min-height: 220px;
    padding: 1.5rem;
    text-align: center;
    background: var(--color-tint, #eef1f4);
    color: var(--color-text, #1f2937);
}

.map-placeholder__text {
    margin: 0;
    max-width: 42ch;
    font-size: 0.95rem;
    color: var(--color-text-muted, #5e6470);
}

.map-placeholder__btn {
    font: inherit;
    font-weight: 600;
    padding: 0.65rem 1.6rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid currentColor;
    background: transparent;
    color: var(--color-text, #1f2937);
    transition: opacity 0.15s ease;
}

.map-placeholder__btn:hover {
    opacity: 0.75;
}

.map-placeholder__btn:focus-visible {
    outline: 2px solid var(--color-primary, #1f2937);
    outline-offset: 2px;
}

/* --- marketing-site additions (not in the client-template original) ------ */

/* The live choice control on /privacy */
.consent-choice {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    margin: 16px 0 28px 0;
    background: #f8fafc;
}

.consent-choice__status {
    margin: 0 0 12px 0;
    font-weight: 600;
}

/* The same two buttons, re-dressed for a LIGHT surface.

   .cookie-consent__btn and its two modifiers above are built for the banner,
   which is a dark bar: white border, white text on the decline, white fill on
   the accept. This panel reuses those classes on #f8fafc — so Decline rendered
   white-on-near-white with a white border and was, in practice, invisible, and
   Allow lost its edge entirely (white fill, white border, white-ish panel).

   The pair keeps the property the banner comment calls for — same size, same
   shape, differing only in fill — just inverted: outline vs filled, both with a
   border you can see. Fallbacks are stated because this file is also loaded by
   index.html, which does not define these variables. */
.consent-choice .cookie-consent__btn {
    border-color: #cbd5e1;
}

.consent-choice .cookie-consent__btn--decline {
    background: #ffffff;
    color: var(--text-dark, #1a202c);
}

.consent-choice .cookie-consent__btn--accept {
    background: var(--primary-color, #0066cc);
    border-color: var(--primary-color, #0066cc);
    color: #ffffff;
}
