/**
 * CMS cookie consent — isolated from Bootstrap .btn / .btn-primary overrides.
 */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1065;
    background: #f8fafc;
    color: #334155;
    font-family: var(--body-font-family, system-ui, sans-serif);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.12);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.cookie-consent-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cookie-accent, #405189);
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-banner .cookie-consent-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    box-sizing: border-box;
}

body.layout-boxed .cookie-consent-banner .cookie-consent-inner {
    max-width: 1400px;
}

@media (max-width: 1200px) {
    body.layout-boxed .cookie-consent-banner .cookie-consent-inner {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    body.layout-boxed .cookie-consent-banner .cookie-consent-inner {
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    body.layout-boxed .cookie-consent-banner .cookie-consent-inner {
        max-width: 540px;
    }
}

.cookie-consent-body {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

.cookie-consent-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    background: var(--cookie-accent, #405189);
    border: none;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--cookie-accent, #405189) 32%, transparent);
}

.cookie-consent-icon-svg {
    width: 1.375rem;
    height: 1.375rem;
    display: block;
    flex-shrink: 0;
}

.cookie-consent-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #475569;
    font-weight: 400;
}

.cookie-consent-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.625rem;
    flex-shrink: 0;
}

/* Isolated buttons — do not use .btn / .btn-primary */
.cookie-consent-banner .cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.5rem;
    min-width: 6.75rem;
    padding: 0 1.125rem;
    margin: 0;
    border-radius: 0.5rem;
    font-family: var(--body-font-family, system-ui, sans-serif);
    font-size: 0.875rem !important;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
    vertical-align: middle;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cookie-consent-banner .cookie-btn--decline {
    background-color: var(--cookie-decline-bg, #ffffff);
    color: var(--cookie-decline-text, #475569);
    border: 1px solid var(--cookie-decline-border, #cbd5e1);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cookie-consent-banner .cookie-btn--decline:hover,
.cookie-consent-banner .cookie-btn--decline:focus {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
    outline: none;
}

.cookie-consent-banner .cookie-btn--accept {
    background-color: var(--cookie-accept-bg, #405189) !important;
    color: var(--cookie-accept-text, #ffffff) !important;
    border: 1px solid var(--cookie-accept-bg, #405189) !important;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--cookie-accept-bg, #405189) 35%, transparent);
}

.cookie-consent-banner .cookie-btn--accept:hover,
.cookie-consent-banner .cookie-btn--accept:focus {
    background-color: color-mix(in srgb, var(--cookie-accept-bg, #405189) 88%, #000) !important;
    border-color: color-mix(in srgb, var(--cookie-accept-bg, #405189) 88%, #000) !important;
    color: #ffffff !important;
    outline: none;
}

body.cookie-banner-open .fab-container {
    bottom: calc(20px + var(--cookie-banner-offset, 5.5rem));
}

body.cookie-banner-open .btn-back-to-top {
    bottom: calc(24px + var(--cookie-banner-offset, 5.5rem));
}

@media (max-width: 768px) {
    .cookie-consent-banner .cookie-consent-inner {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .cookie-consent-body {
        align-items: flex-start;
    }

    .cookie-consent-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .cookie-consent-banner .cookie-btn {
        width: 100%;
        min-width: 0;
    }
}

@media print {
    .cookie-consent-banner {
        display: none !important;
    }
}
