/* Shared cookie consent banner (tags/shared/cookieConsentBar.tag).
   Selectors are anchored on #cookie_modal so they beat the legacy .cookie_modal/.cookie_btn
   rules bundled in the brand themes regardless of stylesheet load order. */

#cookie_modal {
    position: fixed;
    top: auto;
    width: auto;
    height: auto;
    overflow: visible;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    background-color: #fff;
    /* Self-contained colors: brand themes (e.g. dark sites) must not bleed into the banner via inheritance. */
    color: #333;
    box-shadow: 0 -2px 12px 0 rgba(0, 0, 0, 0.18);
}

/* Some brand themes paint every element via a universal selector (e.g. luxurymotors:
   `* { color: var(--white) }`). Re-establish inheritance inside the banner with id-level
   specificity so the banner keeps its own text color; more specific rules below still win. */
#cookie_modal * {
    color: inherit;
}

#cookie_modal .modal-content-cookie {
    display: grid;
    grid-template-rows: none;
    grid-gap: 0.75rem;
    gap: 0.75rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    text-align: left;
}

#cookie_modal .cookie_info {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

#cookie_modal .cookie_info a {
    font-weight: bold;
    -webkit-text-decoration: underline;
    text-decoration: underline;
}

#cookie_modal .cookie_categories {
    display: grid;
    grid-gap: 0.5rem;
    gap: 0.5rem;
    padding: 0.25rem 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

#cookie_modal .cookie_categories[hidden] {
    display: none;
}

#cookie_modal .cookie_category {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    cursor: pointer;
}

#cookie_modal .cookie_category input {
    margin-top: 2px;
    flex-shrink: 0;
}

#cookie_modal .cookie_category input:disabled {
    cursor: not-allowed;
}

#cookie_modal .cookie_category strong {
    display: block;
}

#cookie_modal .cookie_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
}

/* Light blue chosen to stay readable on both light and dark banner backgrounds. */
#cookie_modal .cookie_branding {
    margin-right: auto;
    font-size: 14px;
    color: #2e86e0;
    -webkit-text-decoration: none;
    text-decoration: none;
}

#cookie_modal .cookie_branding:hover {
    -webkit-text-decoration: underline;
    text-decoration: underline;
}

/* Accept and reject are deliberately equal in size and weight — required by GDPR guidance. */
#cookie_modal .cookie_btn {
    width: auto;
    height: auto;
    padding: 0.55rem 1.25rem;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background-color: #484848;
    border: 1px solid #484848;
    border-radius: 4px;
    margin: 0;
    cursor: pointer;
}

#cookie_modal .cookie_btn[hidden] {
    display: none;
}

#cookie_modal .cookie_btn:hover,
#cookie_modal .cookie_btn:active {
    font-weight: 600;
    opacity: 0.85;
}

#cookie_modal .cookie_btn--secondary {
    background-color: #6d6d6d;
    border-color: #6d6d6d;
}

#cookie_modal .cookie_btn--ghost {
    background-color: transparent;
    border-color: #484848;
    color: #484848;
}

/* Floating "cookie settings" badge — the GDPR withdrawal entry point, shown after a choice was made. */
.cookie_manage_badge {
    position: fixed;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 9999;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border: 1px solid #c9c9c9;
    border-radius: 50%;
    box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.cookie_manage_badge svg {
    display: block;
}

.cookie_manage_badge[hidden] {
    display: none;
}

.cookie_manage_badge:hover {
    background-color: #f2f2f2;
}

@media (max-width: 575px) {
    #cookie_modal .cookie_actions {
        justify-content: stretch;
    }

    #cookie_modal .cookie_btn {
        flex: 1 1 100%;
    }
}
