/* ═══════════════════════════════════════════════════════════════════════════
   SmallGDPR v2.0.3 — CÓPIA DO CSS DO PLUGIN PARA O TEMA (kit smallrgpd-outros-websites)
   Original: plugins/janvince/smallgdpr/assets/css/smallgdpr.css (cópia em original-plugin-2.0.3/).
   Entra no bundle do tema DEPOIS do Bootstrap e ANTES do smallgdpr-tema.css.
   NÃO mexer nas cores aqui: as cores vêm do :root do smallgdpr-tema.css.
   Alterações ao original (marcadas com "tema:"):
     1. @keyframes sg-bar-in e sg-bar-in-desktop só com transform, sem opacity
        (os scanners de acessibilidade mediam o contraste a meio do fade).
     2. Largura do .sg-dialog: calc(100vw - 2rem), máx. 840px (o plugin tem 540px).
     3. Scrollbar fina no .sg-dialog / .sg-dialog__content.
   Ao atualizar o plugin: copiar o ficheiro novo e repetir estas 3 alterações.
   ═══════════════════════════════════════════════════════════════════════════ */

/**
 * Small GDPR v2 — cookie bar (floating pill) + settings dialog.
 *
 * Bez závislosti na Bootstrapu. Vše laditelné přes CSS custom properties
 * na :root (nebo #cookies-bar / .sg-dialog) — pro přebarvení v projektu
 * stačí přepsat proměnné --sg-*.
 */

:root {
    --sg-bg: #1a2842;
    --sg-text: #ffffff;
    --sg-text-muted: rgba(255, 255, 255, 0.62);
    --sg-primary: #0d6efd;
    --sg-primary-hover: #3185fe;
    --sg-primary-text: #ffffff;
    --sg-border: rgba(255, 255, 255, 0.10);
    --sg-border-hover: rgba(255, 255, 255, 0.18);
    --sg-glyph-bg: rgba(13, 110, 253, 0.18);
    --sg-radius: 1.25rem;
    --sg-radius-pill: 999px;
    --sg-shadow: 0 0.625rem 2rem -0.5rem rgba(0, 0, 0, 0.35);
    --sg-z-index: 1080;

    /* Cookie list — neutral defaults so the standalone /gdpr manage page reads
       on a normal (light) background. The dialog overrides these to its dark theme. */
    --sg-list-label: inherit;
    --sg-list-muted: currentColor;
    --sg-list-border: rgba(0, 0, 0, 0.12);
    --sg-list-input-bg: transparent;
}

/* ============================== Bar (pill) ============================== */

#cookies-bar.cookies-bar {
    position: fixed;
    z-index: var(--sg-z-index);
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;

    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "glyph title"
        "glyph content"
        "buttons buttons";
    column-gap: 0.625rem;
    row-gap: 0.125rem;
    align-items: center;

    padding: 1rem;
    background-color: var(--sg-bg);
    color: var(--sg-text);
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);

    animation: sg-bar-in 300ms ease-out both;
}

/* tema: só o transform (sem opacity) — scanners de acessibilidade liam o contraste a meio do fade */
@keyframes sg-bar-in {
    from { transform: translateY(0.75rem); }
    to   { transform: translateY(0); }
}

#cookies-bar.cookies-bar::before {
    content: "";
    grid-area: glyph;
    align-self: start;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--sg-glyph-bg);
    flex-shrink: 0;
    background-image: linear-gradient(var(--sg-primary), var(--sg-primary));
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.125rem 1.125rem;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 0c-.176 0-.35.006-.523.017l.064.998a7 7 0 1 1-6.487 7.929l-.999.06A8 8 0 1 0 8 0Z'/><path d='M8 4a.5.5 0 0 1 .5.5c0 1.06.43 1.93 1.05 2.5.62.57 1.45.93 2.45.93a.5.5 0 0 1 0 1c-1.18 0-2.27-.43-3.13-1.2A4.4 4.4 0 0 1 7.5 4.5.5.5 0 0 1 8 4Z'/><circle cx='4.5' cy='6.5' r='.75'/><circle cx='6' cy='10.5' r='.75'/><circle cx='9' cy='10.5' r='.75'/><circle cx='11.5' cy='8' r='.75'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 0c-.176 0-.35.006-.523.017l.064.998a7 7 0 1 1-6.487 7.929l-.999.06A8 8 0 1 0 8 0Z'/><path d='M8 4a.5.5 0 0 1 .5.5c0 1.06.43 1.93 1.05 2.5.62.57 1.45.93 2.45.93a.5.5 0 0 1 0 1c-1.18 0-2.27-.43-3.13-1.2A4.4 4.4 0 0 1 7.5 4.5.5.5 0 0 1 8 4Z'/><circle cx='4.5' cy='6.5' r='.75'/><circle cx='6' cy='10.5' r='.75'/><circle cx='9' cy='10.5' r='.75'/><circle cx='11.5' cy='8' r='.75'/></svg>");
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 1.125rem 1.125rem;
    mask-size: 1.125rem 1.125rem;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

#cookies-bar.cookies-bar .title {
    grid-area: title;
    align-self: end;
    margin: 0;
    color: var(--sg-text);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

#cookies-bar.cookies-bar .content {
    grid-area: content;
    align-self: start;
    color: var(--sg-text-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

#cookies-bar.cookies-bar .content p { margin: 0; }
#cookies-bar.cookies-bar .content p + p { margin-top: 0.25rem; }

#cookies-bar.cookies-bar .buttons {
    grid-area: buttons;
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

#cookies-bar.cookies-bar .buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    border-radius: var(--sg-radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

#cookies-bar.cookies-bar .buttons a:focus-visible {
    outline: 2px solid var(--sg-primary);
    outline-offset: 2px;
}

.btn-accept-all {
    background-color: var(--sg-primary);
    color: var(--sg-primary-text);
    border: 1.5px solid var(--sg-primary);
}
.btn-accept-all:hover {
    background-color: var(--sg-primary-hover);
    border-color: var(--sg-primary-hover);
    color: var(--sg-primary-text);
}

#cookies-bar.cookies-bar .btn-disable-all {
    background-color: transparent;
    color: var(--sg-text);
    border: 1.5px solid var(--sg-border);
}
#cookies-bar.cookies-bar .btn-disable-all:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--sg-border-hover);
    color: var(--sg-text);
}

/* "Settings" — text link, full width below the other two on mobile */
#cookies-bar.cookies-bar .btn-settings {
    grid-column: 1 / -1;
    padding: 0.5rem 0.625rem;
    background-color: transparent;
    color: var(--sg-text-muted);
    border: 1.5px solid transparent;
    font-weight: 500;
}
#cookies-bar.cookies-bar .btn-settings:hover { color: var(--sg-text); }

/* Desktop pill (≥ 1200px) */
@media (min-width: 1200px) {
    #cookies-bar.cookies-bar {
        left: 50%;
        right: auto;
        bottom: 1.5rem;
        width: calc(100% - 1.5rem);
        max-width: 1200px;
        transform: translateX(-50%);

        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        grid-template-areas:
            "glyph title   buttons"
            "glyph content buttons";
        column-gap: 1.5rem;
        row-gap: 0;
        padding: 0.875rem 1rem 0.875rem 1.625rem;
        border-radius: var(--sg-radius-pill);

        animation: sg-bar-in-desktop 300ms ease-out both;
    }

    /* tema: só o transform (sem opacity), como no sg-bar-in */
    @keyframes sg-bar-in-desktop {
        from { transform: translateX(-50%) translateY(0.75rem); }
        to   { transform: translateX(-50%) translateY(0); }
    }

    #cookies-bar.cookies-bar::before { align-self: center; width: 2.125rem; height: 2.125rem; }
    #cookies-bar.cookies-bar .title,
    #cookies-bar.cookies-bar .content { padding-right: 0.5rem; }

    #cookies-bar.cookies-bar .buttons {
        margin-top: 0;
        margin-left: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.625rem;
    }
    #cookies-bar.cookies-bar .btn-accept-all { order: 3; }
    #cookies-bar.cookies-bar .btn-disable-all { order: 2; }
    #cookies-bar.cookies-bar .btn-settings {
        order: 1;
        grid-column: auto;
        padding: 0.5rem 0.875rem;
    }
}

@media (min-width: 1400px) {
    #cookies-bar.cookies-bar {
        width: auto;
        max-width: calc(100% - 3rem);
        grid-template-columns: auto auto auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    #cookies-bar.cookies-bar { animation: none; }
}

/* tema: scrollbar fina em vez da grossa por defeito (sobretudo no Firefox), como na ABB.
   O <dialog> é sempre a área com scroll (top layer): isto é só o aspeto.
   Cor = --sg-border (vem de --ck-border no smallgdpr-tema.css). */
.sg-dialog,
.sg-dialog__content {
    scrollbar-width: thin;
    scrollbar-color: var(--sg-border) transparent;
}

/* ============================== Dialog ============================== */

.sg-dialog {
    /* tema: mais largo que o original (min(540px, calc(100vw - 2rem)); max-width: 540px) */
    width: calc(100vw - 2rem);
    max-width: 840px;
    padding: 0;
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    background-color: var(--sg-bg);
    color: var(--sg-text);
    box-shadow: var(--sg-shadow);

    /* Dark theme for the cookie list inside the dialog */
    --sg-list-label: var(--sg-text);
    --sg-list-muted: var(--sg-text-muted);
    --sg-list-border: var(--sg-border);
    --sg-list-input-bg: rgba(255, 255, 255, 0.05);
}

.sg-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.sg-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--sg-border);
}

.sg-dialog__title {
    margin: 0;
    color: var(--sg-text);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.sg-dialog__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--sg-text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease;
}
.sg-dialog__close:hover {
    color: var(--sg-text);
    background-color: rgba(255, 255, 255, 0.06);
}

.sg-dialog__body { padding: 1.5rem; }

.sg-dialog__body .content {
    color: var(--sg-text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}
.sg-dialog__body .content p:last-child { margin-bottom: 0; }

.sg-dialog__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sg-border);
}

.sg-dialog__footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--sg-radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.sg-dialog__footer .btn-primary {
    background-color: var(--sg-primary);
    color: var(--sg-primary-text);
    border: 1.5px solid var(--sg-primary);
}
.sg-dialog__footer .btn-primary:hover {
    background-color: var(--sg-primary-hover);
    border-color: var(--sg-primary-hover);
}

/* ============================== Cookie list ============================== */

.list-cookies .form-check {
    position: relative;
    padding: 0.875rem 0 0.875rem 2.25rem;
    border-bottom: 1px solid var(--sg-list-border);
}
.list-cookies .form-check:first-child { padding-top: 0; }
.list-cookies .form-check:last-child { border-bottom: none; }

.list-cookies .form-check-input {
    position: absolute;
    left: 0;
    top: 0.875rem;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--sg-list-input-bg);
    border: 1.5px solid var(--sg-list-border);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}
.list-cookies .form-check:first-child .form-check-input { top: 0; }

.list-cookies .form-check-input:checked {
    background-color: var(--sg-primary);
    border-color: var(--sg-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.85rem;
}
.list-cookies .form-check-input:focus-visible {
    outline: 2px solid var(--sg-primary);
    outline-offset: 2px;
}
.list-cookies .form-check-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.list-cookies .form-check-label {
    display: block;
    color: var(--sg-list-label);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
}

.list-cookies .description {
    color: var(--sg-list-muted);
    opacity: 0.75;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0.25rem 0 0;
}
.list-cookies .description p:last-child { margin-bottom: 0; }
.sg-dialog .list-cookies .description { opacity: 1; }

/* ============================== Manage page (/gdpr) ============================== */

.cookies-manage .list-cookies {
    margin-top: 2rem;
}

.cookies-manage__title {
    margin-bottom: 2rem;
}

.cookies-manage__actions {
    margin-top: 2.25rem;
}

.cookies-manage .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--sg-radius-pill);
    background-color: var(--sg-primary);
    color: var(--sg-primary-text);
    border: 1.5px solid var(--sg-primary);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.cookies-manage .btn-primary:hover {
    background-color: var(--sg-primary-hover);
    border-color: var(--sg-primary-hover);
    color: var(--sg-primary-text);
}
.cookies-manage .btn-primary:focus-visible {
    outline: 2px solid var(--sg-primary);
    outline-offset: 2px;
}
/* =====================================================================
   SmallGDPR v2.x — aspeto genérico para sites de clientes
   Kit "smallrgpd-outros-websites" (base: site da Vimagem, 2026-11-20)

   ORDEM NO BUNDLE DO TEMA (obrigatória):
     1. bootstrap(.min).css  (BS4 ou BS5 — tanto faz)
     2. smallgdpr.css        (cópia do CSS do plugin)
     3. smallgdpr-tema.css   (este ficheiro)
     4. CSS do tema/site     (opcional; pode vir antes ou depois)

   PERSONALIZAR: só o bloco :root logo abaixo (cores). O resto é igual
   em todos os sites. Os seletores usam os ids do plugin (#cookies-bar,
   #sg-settings-dialog, #cookies-manage) para ganharem sempre ao
   Bootstrap 4 e 5 (.btn-primary, .form-check, :active, :focus…).

   Acessibilidade (WCAG 2.2): texto ≥4.5:1 (AA) — com as cores por
   defeito ≥7:1 (AAA); alvos de 44px; foco visível de 2px; switch com
   contorno ≥3:1. Ao mudar as cores, confirmar o contraste.
   ===================================================================== */

/* ----------------------------------------------------------------
   1. CORES DO SITE  ← personalizar aqui
   ---------------------------------------------------------------- */
:root{
  --ck-bg:#ffffff;              /* fundo da barra, do modal e do cartão "Gerir cookies" */
  --ck-text:#1a1a1a;            /* títulos, nomes das categorias, links */
  --ck-muted:#4d4d4d;           /* texto corrido e descrições (≥7:1 sobre --ck-bg) */
  --ck-primary:#05034d;         /* botão principal ("Configurar", "Guardar seleção") e switch ligado */
  --ck-primary-text:#ffffff;    /* texto do botão principal e bola do switch ligado */
  --ck-border:#8c8c8c;          /* contorno dos botões secundários, do X e do switch (≥3:1) */
  --ck-line:rgba(0,0,0,.12);    /* filetes decorativos (cabeçalho, rodapé, linhas da lista) */
  --ck-focus:#0b5fff;           /* contorno de foco do teclado (≥3:1 sobre --ck-bg) */
  --ck-switch-off:#6b6b6b;      /* bola do switch desligado */
  --ck-backdrop:rgba(0,0,0,.5); /* fundo por trás do modal */

  /* opcional — por defeito herda a letra do site */
  --ck-font:inherit;            /* ex.: "Montserrat", sans-serif */
  --ck-font-title:inherit;      /* títulos e nomes das categorias */
}

/* Modo escuro — só para sites que o tenham. Descomentar e ajustar
   ao seletor do site ([data-bs-theme="dark"] no BS 5.3, .dark-mode…).
[data-bs-theme="dark"]{
  --ck-bg:#16181c;
  --ck-text:#f2f2f2;
  --ck-muted:#c4c4c4;
  --ck-primary:#f2f2f2;
  --ck-primary-text:#16181c;
  --ck-border:#8a8a8a;
  --ck-line:rgba(255,255,255,.14);
  --ck-focus:#7aa7ff;
  --ck-switch-off:#a0a0a0;
  --ck-backdrop:rgba(0,0,0,.7);
}
*/

/* ----------------------------------------------------------------
   2. VARIÁVEIS DO PLUGIN → cores do site (não mexer)
   O plugin volta a declarar --sg-list-* no .sg-dialog: por isso os ids.
   ---------------------------------------------------------------- */
:root,
#cookies-bar,
#sg-settings-dialog,
#cookies-manage{
  --sg-bg:var(--ck-bg);
  --sg-text:var(--ck-text);
  --sg-text-muted:var(--ck-muted);
  --sg-primary:var(--ck-primary);
  --sg-primary-hover:var(--ck-primary);
  --sg-primary-text:var(--ck-primary-text);
  --sg-border:var(--ck-border);
  --sg-border-hover:var(--ck-text);
  --sg-glyph-bg:transparent;
  --sg-radius:6px;
  --sg-radius-pill:4px;
  --sg-shadow:0 20px 56px -16px rgba(0,0,0,.32);
  --sg-z-index:1080;
  --sg-list-label:var(--ck-text);
  --sg-list-muted:var(--ck-muted);
  --sg-list-border:var(--ck-line);
  --sg-list-input-bg:transparent;
}

/* ----------------------------------------------------------------
   3. BARRA — caixa no canto inferior direito (anula a "pill" do plugin)
   ---------------------------------------------------------------- */
#cookies-bar.cookies-bar{
  display:block;
  left:auto; right:24px; bottom:24px; transform:none;
  width:calc(100% - 48px); max-width:540px;
  padding:28px 28px 26px;
  text-align:left;
  background:var(--ck-bg); color:var(--ck-text);
  border:1px solid var(--ck-line);
  border-radius:var(--sg-radius);
  font-family:var(--ck-font);
  animation:sg-bar-in 300ms ease-out both;   /* no desktop o plugin usa a versão com translateX — aqui não há */
}
#cookies-bar.cookies-bar::before{ display:none; }   /* ícone de bolacha do plugin */
#cookies-bar.cookies-bar .title{
  margin:0 0 10px; padding:0;
  font-family:var(--ck-font-title);
  font-weight:700; font-size:20px; line-height:1.2; letter-spacing:0; text-transform:none;
  color:var(--ck-text);
}
#cookies-bar.cookies-bar .content,
#cookies-bar.cookies-bar .content p{
  margin:0; padding:0; font-size:14px; line-height:1.6; color:var(--ck-muted);
}
#cookies-bar.cookies-bar .content p + p{ margin-top:8px; }
#cookies-bar.cookies-bar .buttons{
  margin:22px 0 0; display:flex; flex-wrap:wrap; gap:9px;
}

/* ----------------------------------------------------------------
   4. BOTÕES (barra, modal e página)
   Contorno = secundário · .btn-settings (barra) / .btn-primary = principal.
   "Aceitar" e "Rejeitar" têm o mesmo peso (contorno), como pede o RGPD.
   ---------------------------------------------------------------- */
#cookies-bar.cookies-bar .buttons a,
#sg-settings-dialog .sg-dialog__footer a,
#cookies-manage .cookies-manage__actions a{
  order:0; grid-column:auto;          /* anula a reordenação do plugin no desktop */
  display:inline-flex; align-items:center; justify-content:center;
  min-height:44px; padding:0 18px; margin:0;
  font-family:var(--ck-font); font-size:14px; font-weight:600; line-height:1.2;
  text-transform:none; letter-spacing:0; text-decoration:none; text-align:center;
  border:1px solid var(--ck-border); border-radius:var(--sg-radius-pill);
  background:transparent; color:var(--ck-text);
  box-shadow:none; cursor:pointer;
  transition:border-color .2s, background-color .2s, color .2s, opacity .2s;
}
#cookies-bar.cookies-bar .buttons a:hover,
#sg-settings-dialog .sg-dialog__footer a:hover,
#cookies-manage .cookies-manage__actions a:hover,
#cookies-bar.cookies-bar .buttons a:active,
#sg-settings-dialog .sg-dialog__footer a:active,
#cookies-manage .cookies-manage__actions a:active{
  border-color:var(--ck-text); background:transparent; color:var(--ck-text);
  text-decoration:none; box-shadow:none;
}
/* principal */
#cookies-bar.cookies-bar .buttons a.btn-settings,
#sg-settings-dialog .sg-dialog__footer a.btn-primary,
#cookies-manage .cookies-manage__actions a.btn-primary,
#cookies-bar.cookies-bar .buttons a.btn-settings:hover,
#sg-settings-dialog .sg-dialog__footer a.btn-primary:hover,
#cookies-manage .cookies-manage__actions a.btn-primary:hover,
#cookies-bar.cookies-bar .buttons a.btn-settings:active,
#sg-settings-dialog .sg-dialog__footer a.btn-primary:active,
#cookies-manage .cookies-manage__actions a.btn-primary:active{
  background:var(--ck-primary); color:var(--ck-primary-text); border-color:var(--ck-primary);
}
#cookies-bar.cookies-bar .buttons a.btn-settings:hover,
#sg-settings-dialog .sg-dialog__footer a.btn-primary:hover,
#cookies-manage .cookies-manage__actions a.btn-primary:hover{ opacity:.85; }
/* foco (o Bootstrap 4 põe box-shadow azul no .btn-primary:focus) */
#cookies-bar.cookies-bar .buttons a:focus,
#sg-settings-dialog .sg-dialog__footer a:focus,
#cookies-manage .cookies-manage__actions a:focus{ box-shadow:none; outline:none; }
#cookies-bar.cookies-bar .buttons a:focus-visible,
#sg-settings-dialog .sg-dialog__footer a:focus-visible,
#cookies-manage .cookies-manage__actions a:focus-visible{
  outline:2px solid var(--ck-focus) !important; outline-offset:2px;
}

/* ----------------------------------------------------------------
   5. MODAL DE DEFINIÇÕES (<dialog id="sg-settings-dialog">)
   ---------------------------------------------------------------- */
#sg-settings-dialog.sg-dialog{
  margin:auto;                        /* resets de tema (margin:0) descentram o <dialog> */
  background:var(--ck-bg); color:var(--ck-text);
  border:1px solid var(--ck-line);
  font-family:var(--ck-font);
}
#sg-settings-dialog.sg-dialog::backdrop{ background:var(--ck-backdrop); backdrop-filter:none; }
#sg-settings-dialog .sg-dialog__header{
  border-bottom:1px solid var(--ck-line);
  padding:22px 28px;
}
#sg-settings-dialog .sg-dialog__title{
  margin:0;
  font-family:var(--ck-font-title);
  font-weight:700; font-size:22px; line-height:1.2; letter-spacing:0; text-transform:none;
  color:var(--ck-text);
}
/* X (fechar): SVG no HTML (partials/cookiesBar/dialog.htm), com currentColor */
#sg-settings-dialog .sg-dialog__close{
  position:relative; flex:none;
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; padding:0; margin:-5px -5px -5px 0;
  font-size:0; line-height:1; opacity:1; text-shadow:none;
  border:1px solid var(--ck-border); border-radius:50%;
  background:transparent; color:var(--ck-text);
  cursor:pointer;
  transition:border-color .2s, transform .2s;
}
#sg-settings-dialog .sg-dialog__close svg{ display:block; width:13px; height:13px; }
#sg-settings-dialog .sg-dialog__close:hover{
  border-color:var(--ck-text); color:var(--ck-text); background:transparent; transform:rotate(90deg);
}
#sg-settings-dialog .sg-dialog__close:focus{ outline:none; box-shadow:none; }
#sg-settings-dialog .sg-dialog__close:focus-visible{ outline:2px solid var(--ck-focus) !important; outline-offset:2px; }
#sg-settings-dialog .sg-dialog__body{ padding:6px 28px 22px; }
#sg-settings-dialog .sg-dialog__body .content,
#sg-settings-dialog .sg-dialog__body .content p{
  font-size:14px; line-height:1.6; color:var(--ck-muted);
}
#sg-settings-dialog .sg-dialog__body .content{ margin:18px 0 0; }
#sg-settings-dialog .sg-dialog__footer{
  border-top:1px solid var(--ck-line);
  padding:18px 28px; gap:9px;
}

/* links do texto (barra, modal e página) */
#cookies-bar.cookies-bar .content a,
#sg-settings-dialog .sg-dialog__body .content a,
#cookies-manage > .content a{
  color:var(--ck-text); text-decoration:underline; text-underline-offset:2px;
}
#cookies-bar.cookies-bar .content a:hover,
#sg-settings-dialog .sg-dialog__body .content a:hover,
#cookies-manage > .content a:hover{ color:var(--ck-text); text-decoration-thickness:2px; }
#cookies-bar.cookies-bar .content a:focus-visible,
#sg-settings-dialog .sg-dialog__body .content a:focus-visible,
#cookies-manage > .content a:focus-visible{ outline:2px solid var(--ck-focus); outline-offset:2px; }

/* ----------------------------------------------------------------
   6. LISTA DE CATEGORIAS — switches (modal + página)
   Nome à esquerda, switch à direita, descrição por baixo.
   Anula o .form-check / .form-check-input do Bootstrap 4 (input
   absoluto, padding-left) e do Bootstrap 5 (float, ícone SVG azul).
   ---------------------------------------------------------------- */
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .form-check{
  position:static; margin:0; min-height:0;
  padding:18px 0;
  border-bottom:1px solid var(--ck-line);
  display:flex; flex-wrap:wrap; align-items:center; column-gap:18px;
}
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .form-check:last-child{ border-bottom:none; }
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .form-check-label{
  order:1; flex:1 1 0; min-width:0;     /* base 0: nomes longos quebram linha e o switch fica sempre à direita */
  margin:0; padding:0;
  min-height:44px; display:flex; align-items:center; cursor:pointer;   /* o label conta para o alvo de 44px */
  font-family:var(--ck-font-title);
  font-weight:600; font-size:16px; line-height:1.3; color:var(--ck-text);
}
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .description{
  order:3; flex:0 0 100%;
  margin:4px 0 0; opacity:1;
  font-size:13px; line-height:1.55; color:var(--ck-muted);
}
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .description p{ margin:0; color:inherit; font-size:inherit; line-height:inherit; }   /* o CSS das páginas (ex.: .legal p) não muda a cor/tamanho */
/* o switch */
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .form-check-input{
  order:2; position:static; float:none; flex:none; align-self:center;
  margin:0; width:46px; height:26px; cursor:pointer;
  -webkit-appearance:none; appearance:none;
  border:1px solid var(--ck-border); border-radius:999px;
  box-shadow:none;
  background-color:transparent;
  background-image:radial-gradient(circle, var(--ck-switch-off) 0 8.5px, transparent 9px);
  background-size:24px 24px; background-repeat:no-repeat;
  background-position:left center;
  transition:background-color .2s, background-position .15s, border-color .2s;
}
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .form-check-input:checked{
  background-color:var(--ck-primary); border-color:var(--ck-primary);
  background-image:radial-gradient(circle, var(--ck-primary-text) 0 8.5px, transparent 9px);
  background-position:right center;
}
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .form-check-input:focus{ box-shadow:none; outline:none; }
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .form-check-input:focus-visible{
  outline:2px solid var(--ck-focus) !important; outline-offset:2px;
}
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .form-check-input:disabled{ opacity:.5; cursor:not-allowed; }
/* o Bootstrap esbate (BS5: opacity) ou acinzenta (BS4: color) o label dos desativados */
:is(#sg-settings-dialog, #cookies-manage) .list-cookies .form-check-input:disabled ~ .form-check-label{
  opacity:1; color:var(--ck-text); cursor:not-allowed;
}

/* ----------------------------------------------------------------
   7. PÁGINA "GERIR COOKIES" (#cookies-manage — componente cookiesManage)
   ---------------------------------------------------------------- */
#cookies-manage.cookies-manage{
  max-width:100%; margin:0 auto;
  padding:0 28px 26px;
  background:var(--ck-bg); color:var(--ck-text);
  border:1px solid var(--ck-line);
  border-radius:var(--sg-radius);
  font-family:var(--ck-font);
  text-align:left;
  overflow:hidden;
}
#cookies-manage .cookies-manage__title{
  margin:0 -28px 20px; padding:24px 28px; border:0;
  border-bottom:1px solid var(--ck-line);
  font-family:var(--ck-font-title);
  font-weight:700; font-size:clamp(22px,3vw,28px); line-height:1.2; letter-spacing:0; text-transform:none;
  text-align:left; color:var(--ck-text);
}
#cookies-manage > .content,
#cookies-manage > .content p{
  font-size:15px; line-height:1.6; color:var(--ck-muted); margin:0 0 6px;
}
#cookies-manage .list-cookies{ margin-top:8px; }
#cookies-manage .cookies-manage__actions{ margin-top:18px; display:flex; flex-wrap:wrap; gap:9px; }

/* ----------------------------------------------------------------
   8. LINK "CONFIGURAR COOKIES" (partials/cookies-link.htm)
   Herda a cor e a letra de onde está (rodapé).
   ---------------------------------------------------------------- */
.ck-settings-link{
  display:inline-flex; align-items:center; gap:8px;
  min-height:44px; margin:0; padding:0;
  border:0; border-radius:0; background:none; box-shadow:none;
  font:inherit; color:inherit; line-height:inherit; text-align:left;
  cursor:pointer;
}
.ck-settings-link svg{ flex:none; }
.ck-settings-link:hover span{ text-decoration:underline; text-underline-offset:2px; }
.ck-settings-link:focus{ outline:none; }
.ck-settings-link:focus-visible{ outline:2px solid var(--ck-focus); outline-offset:3px; }

/* ----------------------------------------------------------------
   9. RESPONSIVO
   ---------------------------------------------------------------- */
@media (max-width:600px){
  #cookies-bar.cookies-bar{ right:16px; left:16px; bottom:16px; width:auto; max-width:none; padding:22px 20px; }
  /* botões empilhados e da mesma largura: "Aceitar" e "Rejeitar" com o mesmo peso */
  #cookies-bar.cookies-bar .buttons a{ flex:1 1 100%; }
  #sg-settings-dialog .sg-dialog__header{ padding:18px 20px; }
  #sg-settings-dialog .sg-dialog__body{ padding:6px 20px 18px; }
  #sg-settings-dialog .sg-dialog__footer{ padding:16px 20px; flex-wrap:wrap; }
  #sg-settings-dialog .sg-dialog__footer a{ flex:1 1 100%; }
  #cookies-manage.cookies-manage{ padding:0 20px 22px; }
  #cookies-manage .cookies-manage__title{ margin:0 -20px 18px; padding:20px; }
}

@media (prefers-reduced-motion:reduce){
  #cookies-bar.cookies-bar{ animation:none; }
  #sg-settings-dialog .sg-dialog__close:hover{ transform:none; }
}