/* Cookie consent — баннер + панель настроек (ФЗ-152) */
.vsk-cc {
  --vsk-cc-bg: #0f172a;
  --vsk-cc-card: #ffffff;
  --vsk-cc-text: #0f172a;
  --vsk-cc-muted: #475569;
  --vsk-cc-line: #e2e8f0;
  --vsk-cc-primary: #0d9488;
  --vsk-cc-primary-text: #ffffff;
  --vsk-cc-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  font-family: inherit;
  z-index: 10050;
}

.vsk-cc[hidden] {
  display: none !important;
}

.vsk-cc__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 10050;
}

.vsk-cc__backdrop[hidden],
.vsk-cc__banner[hidden],
.vsk-cc__panel[hidden],
.vsk-cc__fab[hidden] {
  display: none !important;
}

.vsk-cc__banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 10051;
  max-width: 920px;
  margin: 0 auto;
}

.vsk-cc__banner-inner {
  background: var(--vsk-cc-card);
  color: var(--vsk-cc-text);
  border-radius: 16px;
  box-shadow: var(--vsk-cc-shadow);
  border: 1px solid var(--vsk-cc-line);
  padding: 18px 18px 16px;
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .vsk-cc__banner-inner {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 18px;
    padding: 20px 22px;
  }
}

.vsk-cc__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--vsk-cc-text);
}

.vsk-cc__desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--vsk-cc-muted);
}

.vsk-cc__desc a,
.vsk-cc__legal-mini a {
  color: var(--vsk-cc-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vsk-cc__desc--panel {
  margin-bottom: 12px;
}

.vsk-cc__banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.vsk-cc__btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vsk-cc__btn--primary {
  background: var(--vsk-cc-primary);
  color: var(--vsk-cc-primary-text);
  border-color: var(--vsk-cc-primary);
}

.vsk-cc__btn--primary:hover {
  filter: brightness(0.95);
}

.vsk-cc__btn--secondary {
  background: #f1f5f9;
  color: var(--vsk-cc-text);
  border-color: #e2e8f0;
}

.vsk-cc__btn--secondary:hover {
  background: #e2e8f0;
}

.vsk-cc__btn--ghost {
  background: transparent;
  color: var(--vsk-cc-muted);
  border-color: var(--vsk-cc-line);
}

.vsk-cc__btn--ghost:hover {
  color: var(--vsk-cc-text);
  background: #f8fafc;
}

.vsk-cc__panel {
  position: fixed;
  inset: 0;
  z-index: 10052;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

@media (min-width: 640px) {
  .vsk-cc__panel {
    align-items: center;
  }
}

.vsk-cc__panel-card {
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--vsk-cc-card);
  border-radius: 16px;
  box-shadow: var(--vsk-cc-shadow);
  border: 1px solid var(--vsk-cc-line);
  padding: 18px 18px 16px;
  position: relative;
  z-index: 1;
}

.vsk-cc__panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.vsk-cc__icon-btn {
  appearance: none;
  border: 0;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #334155;
}

.vsk-cc__icon-btn:hover {
  background: #e2e8f0;
}

.vsk-cc__cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.vsk-cc__cat {
  border: 1px solid var(--vsk-cc-line);
  border-radius: 12px;
  background: #f8fafc;
}

.vsk-cc__cat-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px;
  cursor: pointer;
}

.vsk-cc__cat-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--vsk-cc-primary);
}

.vsk-cc__cat-row input[type='checkbox']:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.vsk-cc__cat-meta {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.vsk-cc__cat-name {
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--vsk-cc-text);
}

.vsk-cc__cat-hint {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--vsk-cc-muted);
}

.vsk-cc__panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.vsk-cc__legal-mini {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--vsk-cc-muted);
  text-align: center;
}

.vsk-cc__fab {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 10040;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--vsk-cc-bg);
  color: #f8fafc;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
  opacity: 0.92;
}

.vsk-cc__fab:hover {
  opacity: 1;
}

/* Не перекрывать мобильный dock */
@media (max-width: 900px) {
  body:not(.auth-page) .vsk-cc__fab {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px) + 58px);
  }
  body:not(.auth-page) .vsk-cc__banner {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px) + 58px);
  }
}

body.vsk-cc-open {
  overflow: hidden;
}
