/* ppk-consent.css — компактный корпоративный cookie-banner и панель настроек.
   Намеренно нейтральный (белый фон, тёмный текст) независимо от того, какая
   тема (светлая/тёмная) выбрана на самом сайте — раздел 32 ТЗ требует
   строгий, минималистичный вид без декоративных элементов. */

.ppk-consent-banner,
.ppk-consent-panel {
  --pc-bg: #ffffff;
  --pc-line: rgba(20, 22, 30, 0.12);
  --pc-line-strong: rgba(20, 22, 30, 0.22);
  --pc-tx-0: #16181f;
  --pc-tx-1: #454a56;
  --pc-tx-2: #767c8a;
  --pc-accent: #1c6fd6;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.ppk-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--pc-bg);
  border-top: 1px solid var(--pc-line-strong);
  box-shadow: 0 -8px 28px rgba(16, 18, 24, 0.10);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  transform: translateY(0);
  transition: transform .22s ease;
}
.ppk-consent-banner[hidden] { display: none; }

.ppk-consent-banner__text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 760px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--pc-tx-1);
}
.ppk-consent-banner__text strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--pc-tx-0);
  margin-bottom: 4px;
}

.ppk-consent-banner__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ppk-btn {
  font-family: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1;
}
.ppk-btn-solid { background: var(--pc-tx-0); color: #ffffff; }
.ppk-btn-solid:hover { background: #000; }
.ppk-btn-outline { background: transparent; color: var(--pc-tx-0); border-color: var(--pc-line-strong); }
.ppk-btn-outline:hover { border-color: var(--pc-tx-0); }
.ppk-btn-text { background: transparent; color: var(--pc-tx-2); border-color: transparent; padding-left: 6px; padding-right: 6px; }
.ppk-btn-text:hover { color: var(--pc-tx-0); }

/* --- settings panel (opened via "Настроить" or the footer "Настройки cookie" link) --- */

.ppk-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(12, 14, 20, 0.38);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
}
.ppk-consent-overlay[hidden] { display: none; }
@media (min-width: 720px) {
  .ppk-consent-overlay { align-items: center; }
}

.ppk-consent-panel {
  background: var(--pc-bg);
  border: 1px solid var(--pc-line-strong);
  border-radius: 4px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 24px 64px rgba(10, 12, 18, 0.28);
}

.ppk-consent-panel__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--pc-tx-0);
  margin: 0 0 18px 0;
}

.ppk-consent-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--pc-line);
}
.ppk-consent-row:first-of-type { border-top: none; }

.ppk-consent-row__label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pc-tx-0);
  margin-bottom: 6px;
}
.ppk-consent-row__desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--pc-tx-2);
  max-width: 300px;
}

.ppk-switch {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--pc-line-strong);
  border: none;
  cursor: pointer;
  padding: 0;
}
.ppk-switch[aria-checked="true"] { background: var(--pc-accent); }
.ppk-switch[disabled] { cursor: not-allowed; opacity: .55; }
.ppk-switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
.ppk-switch[aria-checked="true"]::after { transform: translateX(18px); }

.ppk-consent-panel__actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 720px) {
  .ppk-consent-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    gap: 16px;
  }
  .ppk-consent-banner__text { max-width: none; }
  .ppk-consent-banner__actions { justify-content: stretch; }
  .ppk-consent-banner__actions .ppk-btn { flex: 1 1 auto; }
}
