/* pd-consent — базовые стили. Тема сайта переопределяет только переменные --pdc-* (см. themes/). */
.pdc {
  --pdc-bg: #ffffff;
  --pdc-fg: #1c1c1e;
  --pdc-muted: #6b6b70;
  --pdc-accent: #1c1c1e;
  --pdc-accent-fg: #ffffff;
  --pdc-border: rgba(0, 0, 0, .1);
  --pdc-radius: 14px;
  --pdc-btn-radius: 10px;
  --pdc-font: inherit;
  --pdc-title-font: inherit;
  --pdc-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  --pdc-z: 2147483000;

  position: fixed;
  z-index: var(--pdc-z);
  font-family: var(--pdc-font);
  color: var(--pdc-fg);
  font-size: 14px;
  line-height: 1.45;
  box-sizing: border-box;
}
.pdc *, .pdc *::before, .pdc *::after { box-sizing: inherit; }

.pdc__box {
  background: var(--pdc-bg);
  border: 1px solid var(--pdc-border);
  border-radius: var(--pdc-radius);
  box-shadow: var(--pdc-shadow);
  padding: 20px 22px;
}
.pdc__title { font-family: var(--pdc-title-font); font-weight: 700; font-size: 16px; margin: 0 0 6px; }
.pdc__text { color: var(--pdc-muted); margin: 0 0 14px; }
.pdc__text a { color: var(--pdc-fg); text-decoration: underline; text-underline-offset: 2px; }

.pdc__btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pdc__btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--pdc-btn-radius);
  padding: 10px 16px;
  border: 1px solid var(--pdc-accent);
  background: var(--pdc-accent);
  color: var(--pdc-accent-fg);
  line-height: 1.2;
}
.pdc__btn--ghost { background: transparent; color: var(--pdc-fg); border-color: var(--pdc-border); }
.pdc__btn--link { background: none; border: 0; color: var(--pdc-fg); text-decoration: underline; padding: 10px 6px; font-weight: 500; }
.pdc__btn:focus-visible { outline: 2px solid var(--pdc-accent); outline-offset: 2px; }

/* bar — полоса снизу во всю ширину */
.pdc--bar { left: 16px; right: 16px; bottom: 16px; }
.pdc--bar .pdc__box { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; }
.pdc--bar .pdc__title { grid-column: 1; }
.pdc--bar .pdc__text { grid-column: 1; margin: 0; }
.pdc--bar .pdc__btns { grid-column: 2; grid-row: 1 / span 2; justify-content: flex-end; }

/* card — карточка в углу */
.pdc--card { left: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); }

/* modal — настройки */
.pdc--modal { inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); padding: 16px; }
.pdc--modal .pdc__box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.pdc--modal .pdc__title { margin-bottom: 12px; }
.pdc--modal .pdc__btns { margin-top: 16px; }

.pdc__cat { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--pdc-border); cursor: pointer; }
.pdc__cat input { position: absolute; opacity: 0; pointer-events: none; }
.pdc__cat-body b { display: block; font-weight: 600; }
.pdc__cat-body small { display: block; color: var(--pdc-muted); font-size: 13px; margin-top: 2px; }
.pdc__switch { width: 38px; height: 22px; border-radius: 22px; background: var(--pdc-border); position: relative; margin-top: 1px; transition: background .15s; }
.pdc__switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.pdc__cat input:checked + .pdc__switch { background: var(--pdc-accent); }
.pdc__cat input:checked + .pdc__switch::after { transform: translateX(16px); }
.pdc__cat input:disabled + .pdc__switch { opacity: .55; }
.pdc__cat input:focus-visible + .pdc__switch { outline: 2px solid var(--pdc-accent); outline-offset: 2px; }

@media (max-width: 720px) {
  .pdc--bar { left: 8px; right: 8px; bottom: 8px; }
  .pdc--bar .pdc__box { display: block; padding: 16px; }
  .pdc--bar .pdc__text { margin-bottom: 12px; }
  .pdc--card { left: 8px; bottom: 8px; width: calc(100vw - 16px); }
  .pdc__btns .pdc__btn--primary { flex: 1 1 140px; }
}

@media (prefers-reduced-motion: reduce) { .pdc__switch, .pdc__switch::after { transition: none; } }
