/* DocSpace landing — cookie-баннер (152-ФЗ ст. 18.1, opt-in для Я.Метрики).
   v2 от 2026-05-14. Glassmorphism в стиле hero лендинга.
   Цвета через var(--blue-700) и т.д. с hex-fallback'ами для legal-страниц,
   где :root-токены лендинга не подключены. */

.cc-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(24px);
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cc-overlay.cc-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cc-banner {
  max-width: 960px;
  margin: 0 auto 18px;
  padding: 22px 26px;
  background: rgba(15, 23, 42, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow:
    0 30px 60px rgba(15, 23, 42, 0.45),
    0 12px 24px rgba(15, 23, 42, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #E2E8F0;
}

.cc-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.cc-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(35, 114, 173, 0.22);
  border: 1px solid rgba(49, 167, 212, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7CC7E8;
}
.cc-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.cc-text { min-width: 0; }
.cc-banner h3 {
  font-size: 17px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.cc-banner p {
  margin: 0;
  color: #CBD5E1;
}
.cc-banner a {
  color: #7CC7E8;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(124, 199, 232, 0.4);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.cc-banner a:hover {
  color: #B0DEEF;
  text-decoration-color: #B0DEEF;
}

.cc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.cc-btn:active { transform: translateY(1px); }

.cc-btn-primary {
  background: #2372AD;
  border-color: #2372AD;
  color: #FFFFFF;
  box-shadow:
    0 10px 24px rgba(35, 114, 173, 0.42),
    0 0 0 1px rgba(49, 167, 212, 0.25) inset;
}
.cc-btn-primary:hover {
  background: #2589BA;
  border-color: #2589BA;
  box-shadow:
    0 14px 32px rgba(35, 114, 173, 0.55),
    0 0 0 1px rgba(49, 167, 212, 0.45) inset;
}

.cc-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}
.cc-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.cc-btn-link {
  min-height: 44px;
  padding: 11px 8px;
  background: transparent;
  border: none;
  color: #94A3B8;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(148, 163, 184, 0.4);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.cc-btn-link:hover {
  color: #FFFFFF;
  text-decoration-color: #FFFFFF;
}

.cc-btn:focus-visible,
.cc-btn-link:focus-visible,
.cc-banner a:focus-visible,
.cc-cat input[type=checkbox]:focus-visible {
  outline: 2px solid #31A7D4;
  outline-offset: 2px;
  border-radius: 6px;
}

.cc-settings {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.cc-settings.cc-visible { display: block; }

.cc-cat {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.cc-cat:last-of-type { margin-bottom: 16px; }
.cc-cat input[type=checkbox] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #2372AD;
  cursor: pointer;
}
.cc-cat input[type=checkbox]:disabled { cursor: not-allowed; opacity: 0.6; }
.cc-cat label { cursor: pointer; min-width: 0; }
.cc-cat input[type=checkbox]:disabled + label { cursor: default; }
.cc-cat-label {
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 2px;
}
.cc-cat-desc {
  font-size: 13px;
  color: #94A3B8;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .cc-banner {
    margin: 0 12px 12px;
    padding: 18px 18px 20px;
    border-radius: 14px;
  }
  .cc-head { gap: 12px; margin-bottom: 16px; }
  .cc-icon { width: 36px; height: 36px; }
  .cc-icon svg { width: 20px; height: 20px; }
  .cc-banner h3 { font-size: 16px; }
  .cc-actions {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  .cc-btn { width: 100%; }
  .cc-btn-link { width: 100%; padding: 11px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-overlay {
    transition: opacity 120ms linear;
    transform: none;
  }
  .cc-btn,
  .cc-btn-link,
  .cc-banner a {
    transition: none;
  }
  .cc-btn:active { transform: none; }
}
