/* ════════════════════════════════════════════════════════════════
   YAPP · Consentimento de Cookies (RGPD / ePrivacy UE)
   Folha de estilos do banner + modal de preferências.
   Auto-contida: define as suas próprias variáveis (--ycc-*) para
   funcionar em qualquer página (index, políticas, etc.).
   Identidade visual alinhada com o site YAPP (azul/branco).
   ════════════════════════════════════════════════════════════════ */

:root{
  --ycc-blue:#3FB3FF;
  --ycc-blue-mid:#1A92E8;
  --ycc-blue-dark:#0D5FA8;
  --ycc-blue-deep:#0A3D70;
  --ycc-ink:#1C2B4A;
  --ycc-ink2:#3A5070;
  --ycc-gray:#728099;
  --ycc-sky:#EBF6FF;
  --ycc-sky2:#D4EDFF;
  --ycc-bd:rgba(63,179,255,.22);
  --ycc-bdg:rgba(28,43,74,.10);
  --ycc-sans:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --ycc-serif:'Fraunces',Georgia,serif;
  --ycc-shadow:0 18px 60px rgba(10,61,112,.28);
  --ycc-r:18px;
}

/* impede scroll do fundo quando o modal está aberto */
body.ycc-lock{overflow:hidden;}

/* ───────── BANNER ───────── */
.ycc-banner{
  position:fixed;z-index:2147483600;
  left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);
  width:min(680px,calc(100vw - 32px));
  background:#fff;
  border:1px solid var(--ycc-bdg);
  border-radius:var(--ycc-r);
  box-shadow:var(--ycc-shadow);
  padding:1.5rem 1.6rem 1.4rem;
  font-family:var(--ycc-sans);
  color:var(--ycc-ink2);
  opacity:0;pointer-events:none;
  transition:opacity .45s cubic-bezier(.16,1,.3,1),transform .45s cubic-bezier(.16,1,.3,1);
}
.ycc-banner.ycc-show{opacity:1;pointer-events:auto;transform:translateX(-50%) translateY(0);}
/* em mobile com bottom-nav, sobe acima da barra */
.ycc-banner.ycc-has-bottomnav{bottom:calc(86px + env(safe-area-inset-bottom,0px));}

.ycc-head{display:flex;align-items:center;gap:.6rem;margin-bottom:.7rem;}
.ycc-ic{
  width:34px;height:34px;border-radius:10px;flex-shrink:0;
  background:var(--ycc-sky);border:1px solid var(--ycc-bd);
  display:flex;align-items:center;justify-content:center;
}
.ycc-ic svg{width:17px;height:17px;stroke:var(--ycc-blue-dark);fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.ycc-title{font-family:var(--ycc-serif);font-size:1.12rem;font-weight:600;color:var(--ycc-ink);letter-spacing:-.01em;}
.ycc-text{font-size:.86rem;line-height:1.62;font-weight:300;margin-bottom:1.1rem;}
.ycc-text a{color:var(--ycc-blue-dark);font-weight:600;text-decoration:none;border-bottom:1px solid var(--ycc-bd);}
.ycc-text a:hover{border-color:var(--ycc-blue-dark);}

.ycc-actions{display:flex;flex-wrap:wrap;gap:.6rem;}
.ycc-btn{
  flex:1 1 auto;min-width:140px;
  display:inline-flex;align-items:center;justify-content:center;gap:.4rem;
  padding:.8rem 1.1rem;border-radius:50px;
  font-family:var(--ycc-sans);font-size:.84rem;font-weight:600;
  cursor:pointer;border:1px solid transparent;
  transition:all .22s;-webkit-tap-highlight-color:transparent;
  text-align:center;line-height:1.2;
}
.ycc-btn:active{transform:scale(.97);}
.ycc-btn--primary{background:linear-gradient(135deg,var(--ycc-blue-deep),var(--ycc-blue-mid));color:#fff;box-shadow:0 4px 16px rgba(13,95,168,.3);}
.ycc-btn--primary:hover{box-shadow:0 8px 24px rgba(13,95,168,.42);transform:translateY(-1px);}
.ycc-btn--ghost{background:var(--ycc-sky);color:var(--ycc-blue-dark);border-color:var(--ycc-bd);}
.ycc-btn--ghost:hover{background:var(--ycc-sky2);}
.ycc-btn--text{flex:1 1 100%;min-width:0;background:none;color:var(--ycc-gray);padding:.5rem;font-weight:500;text-decoration:underline;}
.ycc-btn--text:hover{color:var(--ycc-blue-dark);}

/* ───────── MODAL DE PREFERÊNCIAS ───────── */
.ycc-modal{
  position:fixed;inset:0;z-index:2147483601;
  display:flex;align-items:center;justify-content:center;
  padding:20px;
  background:rgba(10,38,90,.5);
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
  opacity:0;pointer-events:none;transition:opacity .35s ease;
}
.ycc-modal.ycc-show{opacity:1;pointer-events:auto;}
.ycc-panel{
  width:min(560px,100%);max-height:88vh;overflow-y:auto;
  background:#fff;border-radius:var(--ycc-r);box-shadow:var(--ycc-shadow);
  font-family:var(--ycc-sans);color:var(--ycc-ink2);
  transform:translateY(16px) scale(.98);transition:transform .35s cubic-bezier(.16,1,.3,1);
  -webkit-overflow-scrolling:touch;
}
.ycc-modal.ycc-show .ycc-panel{transform:none;}
.ycc-panel-hd{
  position:sticky;top:0;background:#fff;z-index:2;
  display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:1.4rem 1.6rem 1rem;border-bottom:1px solid var(--ycc-bdg);
}
.ycc-hd-text{display:flex;flex-direction:column;gap:.2rem;}
.ycc-brand{font-family:var(--ycc-serif);font-size:.92rem;font-weight:700;color:var(--ycc-blue-dark);letter-spacing:.06em;line-height:1;}
.ycc-panel-hd h2{font-family:var(--ycc-serif);font-size:1.25rem;font-weight:600;color:var(--ycc-ink);letter-spacing:-.01em;}
.ycc-close{
  width:34px;height:34px;border-radius:50%;flex-shrink:0;border:1px solid var(--ycc-bdg);
  background:#fff;cursor:pointer;color:var(--ycc-ink2);font-size:1.1rem;line-height:1;
  display:flex;align-items:center;justify-content:center;transition:all .2s;
}
.ycc-close:hover{background:var(--ycc-sky);color:var(--ycc-blue-dark);}
.ycc-panel-bd{padding:1.2rem 1.6rem;}
.ycc-intro{font-size:.85rem;line-height:1.6;font-weight:300;margin-bottom:1.2rem;}
.ycc-intro a{color:var(--ycc-blue-dark);font-weight:600;text-decoration:none;}
.ycc-intro a:hover{text-decoration:underline;}

/* categoria */
.ycc-cat{
  border:1px solid var(--ycc-bdg);border-radius:14px;
  padding:1rem 1.1rem;margin-bottom:.7rem;background:#fff;transition:border-color .2s;
}
.ycc-cat:hover{border-color:var(--ycc-bd);}
.ycc-cat-top{display:flex;align-items:center;justify-content:space-between;gap:1rem;}
.ycc-cat-name{font-size:.95rem;font-weight:600;color:var(--ycc-ink);}
.ycc-cat-desc{font-size:.8rem;line-height:1.55;font-weight:300;margin-top:.45rem;}

/* interruptor (toggle) */
.ycc-switch{position:relative;width:46px;height:26px;flex-shrink:0;}
.ycc-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;}
.ycc-slider{
  position:absolute;inset:0;border-radius:50px;background:#cfdcec;transition:background .25s;
}
.ycc-slider::before{
  content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;
  background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform .25s;
}
.ycc-switch input:checked + .ycc-slider{background:var(--ycc-blue-mid);}
.ycc-switch input:checked + .ycc-slider::before{transform:translateX(20px);}
.ycc-switch input:disabled + .ycc-slider{background:var(--ycc-blue-dark);opacity:.55;cursor:not-allowed;}
.ycc-switch input:focus-visible + .ycc-slider{outline:2px solid var(--ycc-blue-dark);outline-offset:2px;}

.ycc-panel-ft{
  position:sticky;bottom:0;background:#fff;
  display:flex;flex-wrap:wrap;gap:.6rem;
  padding:1rem 1.6rem 1.3rem;border-top:1px solid var(--ycc-bdg);
}
.ycc-panel-ft .ycc-btn{flex:1 1 160px;}

/* ───────── BOTÃO FLUTUANTE "Preferências de cookies" ───────── */
.ycc-fab{
  position:fixed;z-index:2147483500;left:1.2rem;bottom:1.2rem;
  width:42px;height:42px;border-radius:50%;
  background:#fff;border:1px solid var(--ycc-bdg);
  box-shadow:0 4px 18px rgba(28,43,74,.14);
  cursor:pointer;display:none;align-items:center;justify-content:center;
  -webkit-tap-highlight-color:transparent;transition:transform .2s,box-shadow .2s;
}
.ycc-fab.ycc-fab-show{display:flex;}
.ycc-fab:hover{transform:translateY(-2px);box-shadow:0 8px 26px rgba(28,43,74,.2);}
.ycc-fab svg{width:20px;height:20px;stroke:var(--ycc-blue-dark);fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}

/* ───────── RESPONSIVO ───────── */
@media(max-width:600px){
  .ycc-banner{left:0;right:0;transform:translateY(20px);width:auto;bottom:0;border-radius:var(--ycc-r) var(--ycc-r) 0 0;padding:1.3rem 1.2rem calc(1.3rem + env(safe-area-inset-bottom,0px));}
  .ycc-banner.ycc-show{transform:translateY(0);}
  .ycc-banner.ycc-has-bottomnav{bottom:0;margin-bottom:calc(74px + env(safe-area-inset-bottom,0px));}
  .ycc-actions{flex-direction:column;}
  .ycc-btn{flex:1 1 100%;}
}

@media(prefers-reduced-motion:reduce){
  .ycc-banner,.ycc-modal,.ycc-panel{transition:none;}
}
