/* Cookie-consent — full-width bottom banner + "Customise Consent Preferences" modal.
   Whitelabel: tenant --fs-primary. CSP-safe (no inline). */

/* ── Consent banner (full-width, bottom) ─────────────────────────────────── */
.cc-box {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1080;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .75rem 1.5rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, .12);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .14);
    font-size: .9rem;
}
.cc-box[hidden] { display: none; }
.cc-copy { flex: 1 1 460px; display: flex; flex-direction: column; gap: .3rem; max-width: 80ch; }
.cc-title { margin: 0; font-size: 1.02rem; font-weight: 700; color: #1e293b; }
.cc-text { margin: 0; color: #475569; line-height: 1.5; }
.cc-link {
    color: var(--fs-primary, #001B5E);
    font-weight: 600;
    text-decoration: underline;
}
.cc-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: .5rem; }

.cc-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: .5rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--fs-primary, #001B5E);
    color: #fff;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    white-space: nowrap;
}
.cc-btn:hover { filter: brightness(1.08); }
.cc-btn-ghost {
    background: transparent;
    color: var(--fs-primary, #001B5E);
    border-color: color-mix(in srgb, var(--fs-primary, #001B5E) 40%, transparent);
}
.cc-btn-ghost:hover { background: color-mix(in srgb, var(--fs-primary, #001B5E) 8%, transparent); filter: none; }

/* ── Customise modal ─────────────────────────────────────────────────────── */
.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.cc-modal[hidden] { display: none; }
.cc-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.cc-modal-dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
    padding: 1.5rem 1.5rem 1.25rem;
}
.cc-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.cc-modal-title { margin: 0; font-size: 1.2rem; font-weight: 700; color: #1e293b; }
.cc-modal-x {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    border: 0; border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 1.5rem; line-height: 1;
    cursor: pointer;
}
.cc-modal-x:hover { background: #f1f5f9; }
.cc-modal-intro { margin: .6rem 0 1rem; color: #475569; font-size: .88rem; line-height: 1.55; }

.cc-cats { display: flex; flex-direction: column; gap: .25rem; }
.cc-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: .85rem .25rem;
    border-top: 1px solid #eef2f7;
    cursor: pointer;
}
.cc-cat-locked { cursor: default; }
.cc-cat-text { display: flex; flex-direction: column; }
.cc-cat-text strong { font-size: .92rem; color: #1e293b; }
.cc-cat-text small { font-size: .78rem; color: #64748b; margin-top: .1rem; }
.cc-always {
    flex: 0 0 auto;
    font-size: .72rem; font-weight: 700;
    color: var(--fs-primary, #001B5E);
    text-transform: uppercase; letter-spacing: .04em;
}
.cc-cat input[type="checkbox"] {
    flex: 0 0 auto;
    width: 22px; height: 22px;
    accent-color: var(--fs-primary, #001B5E);
    cursor: pointer;
}
.cc-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #eef2f7;
}
.cc-modal-actions .cc-btn { flex: 1 1 auto; }
/* Highlight the primary (Accept all) action in the modal footer */
.cc-modal-actions .cc-btn:not(.cc-btn-ghost) {
    box-shadow: 0 4px 14px color-mix(in srgb, var(--fs-primary, #001B5E) 35%, transparent);
}

/* Inline "Cookie settings" trigger usable inside body copy (e.g. Cookie Policy page) */
.cc-textlink {
    padding: 0; border: 0; background: none;
    color: var(--fs-primary, #001B5E);
    font: inherit; font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 575.98px) {
    .cc-box { flex-direction: column; align-items: stretch; text-align: center; }
    .cc-copy { flex: 1 1 auto; }
    .cc-actions { width: 100%; }
    .cc-actions .cc-btn { flex: 1 1 100%; }
}
