/*
 * Cookie banner. Every rule is anchored on #ppm-consent (or the button
 * classes doubled) so theme styles for h2/p/button/input cannot override it.
 */
#ppm-consent,.ppm-reopen{--ppm-accent:#4f46e5;font-family:inherit;font-size:16px;line-height:1.5;box-sizing:border-box}
#ppm-consent *,#ppm-consent *::before,#ppm-consent *::after{box-sizing:border-box}
#ppm-consent *{text-transform:none;letter-spacing:normal;text-shadow:none}
#ppm-consent[hidden],.ppm-reopen[hidden],#ppm-consent [hidden]{display:none!important}
#ppm-consent{position:fixed;z-index:99998;color:#111827;text-align:start}
#ppm-consent .ppm-consent__box{background:#fff;border-radius:16px;box-shadow:0 18px 50px rgba(15,23,42,.28);padding:24px;max-height:calc(100vh - 32px);overflow:auto;animation:ppm-rise .3s ease}

/* text reset */
#ppm-consent h2,#ppm-consent h3{margin:0;padding:0;border:0;background:none;font-family:inherit;font-weight:700;letter-spacing:normal;text-transform:none;color:#111827}
#ppm-consent h2{font-size:18px;line-height:1.3;margin-block-end:6px}
#ppm-consent h3{font-size:16px;line-height:1.3}
#ppm-consent p{margin:0;padding:0;font-size:14px;line-height:1.6;color:#4b5563}
#ppm-consent p a{color:var(--ppm-accent);text-decoration:underline;font-weight:600}
#ppm-consent ul{list-style:none;margin:0;padding:0}
#ppm-consent li{margin:0;padding:0;list-style:none}

/* layouts */
#ppm-consent.ppm-consent--card{inset-block-end:16px;inset-inline-start:16px;width:min(400px,calc(100vw - 32px))}
#ppm-consent.ppm-consent--bar{inset-inline:0;inset-block-end:0;padding:0 16px 16px}
#ppm-consent.ppm-consent--bar .ppm-consent__box{max-width:1080px;margin:0 auto}
#ppm-consent.ppm-consent--center{inset:0;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.55);backdrop-filter:blur(3px)}
#ppm-consent.ppm-consent--center .ppm-consent__box{width:min(500px,100%)}
/* The "Customize" screen always takes over as its own centered, overlaid modal — regardless
   of the small banner's own position setting above — same as CookieYes's preference panel. */
#ppm-consent.ppm-consent--modal{inset:0;width:auto;height:auto;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.55);backdrop-filter:blur(3px)}
#ppm-consent.ppm-consent--modal .ppm-consent__box{width:min(640px,100%);margin:0}
#ppm-consent .ppm-consent__main{display:flex;flex-direction:column;gap:18px}
#ppm-consent.ppm-consent--bar .ppm-consent__main{flex-direction:row;align-items:center;justify-content:space-between;gap:24px}
#ppm-consent.ppm-consent--bar .ppm-consent__text{flex:1 1 auto}
#ppm-consent.ppm-consent--bar .ppm-consent__actions{flex:none}

/* buttons – accept and reject share the same weight on purpose */
#ppm-consent .ppm-consent__actions{display:flex;flex-wrap:wrap;gap:10px}
#ppm-consent .ppm-cbtn,.ppm-cbtn.ppm-cbtn{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:44px;margin:0;padding:10px 20px;border:2px solid var(--ppm-accent);border-radius:10px;background:var(--ppm-accent);color:#fff;font-family:inherit;font-size:14px;font-weight:600;line-height:1.2;letter-spacing:normal;text-transform:none;text-decoration:none;text-shadow:none;box-shadow:none;cursor:pointer;transition:filter .15s,background .15s}
#ppm-consent .ppm-cbtn:hover,#ppm-consent .ppm-cbtn:focus,.ppm-cbtn.ppm-cbtn:hover{background:var(--ppm-accent);color:#fff;filter:brightness(.9);border-color:var(--ppm-accent)}
#ppm-consent .ppm-cbtn:focus-visible,.ppm-cbtn.ppm-cbtn:focus-visible{outline:3px solid #a5b4fc;outline-offset:2px}
#ppm-consent .ppm-cbtn.ppm-cbtn--ghost{background:#fff;color:var(--ppm-accent)}
#ppm-consent .ppm-cbtn.ppm-cbtn--ghost:hover{background:#f5f5ff;color:var(--ppm-accent);filter:none}
.ppm-cbtn.ppm-cbtn--inline{display:inline-flex}
#ppm-consent .ppm-consent__main .ppm-cbtn{flex:1 1 auto}
#ppm-consent.ppm-consent--bar .ppm-consent__main .ppm-cbtn{flex:none}

/* preferences screen */
#ppm-consent .ppm-consent__prefshead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-block-end:8px}
#ppm-consent .ppm-consent__back{margin:0;padding:6px 4px;border:0;background:none;color:var(--ppm-accent);font-family:inherit;font-size:14px;font-weight:600;text-decoration:underline;box-shadow:none;cursor:pointer}
#ppm-consent .ppm-consent__back:hover{background:none;color:var(--ppm-accent)}
#ppm-consent .ppm-consent__prefs ul{margin-block-end:18px}
#ppm-consent .ppm-cc{display:block;padding:14px 0;border-bottom:1px solid #eef0f4}
#ppm-consent .ppm-cc:last-child{border-bottom:0}
/* flex-start, not center: with a two-line description, centering a short fixed-height
   switch/badge against that taller sibling drops it into the middle of the wrapped text
   instead of level with the title — this is what caused the switch to overlap the text. */
#ppm-consent .ppm-cc__row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;width:100%}
/* the category name + description is the accordion trigger itself (like CookieYes's panel),
   not a separate link below it — only when there's actually something to expand. */
#ppm-consent .ppm-cc__head{flex:1 1 auto;display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-width:0;margin:0;padding:0;border:0;background:none;text-align:start;font:inherit;color:inherit;box-shadow:none;cursor:pointer}
#ppm-consent .ppm-cc__head:hover{background:none}
#ppm-consent .ppm-cc__head--plain{cursor:default}
#ppm-consent .ppm-cc__head::after{content:"";flex:none;width:8px;height:8px;margin-block-start:5px;border-inline-end:2px solid #9ca3af;border-block-end:2px solid #9ca3af;transform:rotate(45deg);transition:transform .15s}
#ppm-consent .ppm-cc__head--plain::after{display:none}
#ppm-consent .ppm-cc__head[aria-expanded=true]::after{transform:rotate(225deg)}
#ppm-consent .ppm-cc__text{display:flex;flex-direction:column;gap:2px;min-width:0}
#ppm-consent .ppm-cc__text strong{font-size:15px;font-weight:700;color:#111827}
#ppm-consent .ppm-cc__text small{display:block;color:#6b7280;font-size:13px;line-height:1.45}
#ppm-consent .ppm-cc__fixed{flex:none;margin-block-start:3px;font-size:12px;font-weight:700;color:#059669;white-space:nowrap}
#ppm-consent .ppm-cc__switchwrap{position:relative;flex:none;display:flex;align-items:center;margin:0;padding:0;cursor:pointer}
#ppm-consent .ppm-cc input[type=checkbox]{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
#ppm-consent .ppm-switch{flex:none;position:relative;display:block;width:46px;height:26px;border-radius:999px;background:#cbd5e1;transition:background .2s}
#ppm-consent .ppm-switch::after{content:"";position:absolute;inset-block-start:3px;inset-inline-start:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:inset-inline-start .2s}
#ppm-consent .ppm-cc input:checked+.ppm-switch{background:var(--ppm-accent)}
#ppm-consent .ppm-cc input:checked+.ppm-switch::after{inset-inline-start:23px}
#ppm-consent .ppm-cc input:focus-visible+.ppm-switch{box-shadow:0 0 0 3px #a5b4fc}

/* per-category cookie list, revealed by expanding its accordion header above */
#ppm-consent .ppm-cc__list{margin-block-start:10px;overflow-x:auto}
#ppm-consent .ppm-cc__table{width:100%;border-collapse:collapse;font-size:12.5px}
#ppm-consent .ppm-cc__table th,#ppm-consent .ppm-cc__table td{padding:6px 8px;border:1px solid #eef0f4;text-align:start;vertical-align:top;color:#4b5563}
#ppm-consent .ppm-cc__table th{background:#f9fafb;font-weight:700;color:#111827}
#ppm-consent .ppm-cc__table code{font-size:11.5px;color:#111827}

/* reopen button */
.ppm-reopen,button.ppm-reopen{position:fixed;z-index:99997;inset-block-end:16px;inset-inline-start:16px;margin:0;padding:9px 16px;border:0;border-radius:999px;background:#fff;color:#374151;font-family:inherit;font-weight:600;font-size:13px;line-height:1.2;text-transform:none;letter-spacing:normal;box-shadow:0 4px 14px rgba(15,23,42,.25);cursor:pointer}
.ppm-reopen:hover,button.ppm-reopen:hover{background:#fff;color:var(--ppm-accent)}

/* blocked iframes */
.ppm-blocked{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:160px;padding:24px;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc;text-align:center;color:#475569}
.ppm-blocked p{margin:0}

@keyframes ppm-rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){#ppm-consent .ppm-consent__box{animation:none}}
@media (max-width:640px){
	#ppm-consent.ppm-consent--bar .ppm-consent__main{flex-direction:column;align-items:stretch}
	#ppm-consent.ppm-consent--bar .ppm-consent__main .ppm-cbtn{flex:1 1 auto}
}
@media (max-width:480px){
	#ppm-consent.ppm-consent--card{inset-inline:12px;inset-block-end:12px;width:auto}
	#ppm-consent .ppm-consent__actions .ppm-cbtn{flex:1 1 100%}
}
