.cookie-consent-root,
.cookie-consent-root * {
  box-sizing: border-box;
}

.cookie-consent {
  position: fixed;
  right: auto;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  width: min(470px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px;
  background: #eef2f6;
  border: 1px solid #c8d1dc;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(16, 32, 45, 0.22);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.cookie-consent.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-consent.preferences-mode {
  right: auto;
  left: 50%;
  transform: translate(-50%, 20px);
}

.cookie-consent.preferences-mode.show {
  transform: translate(-50%, 0);
}

.cookie-title {
  margin-bottom: 10px;
  font-size: 26px;
  line-height: 1.15;
}

.cookie-text {
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.55;
}

.cookie-settings-link {
  display: inline;
  padding: 0;
  color: var(--sky);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-settings-link:focus-visible,
.cookie-btn:focus-visible,
.cookie-save:focus-visible,
.cookie-policy-note a:focus-visible,
.footer-privacy-links a:focus-visible,
.footer-privacy-links button:focus-visible,
.cookie-option input:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.cookie-settings-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.38);
  border-color: #b9c4d0;
  border-radius: 12px;
}

.cookie-settings-panel.open {
  display: flex;
}

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-option-info strong,
.cookie-option-info span {
  display: block;
}

.cookie-option-info strong {
  font-size: 14px;
}

.cookie-option-info span {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.4;
}

.cookie-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  accent-color: var(--ink);
}

.cookie-option input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.cookie-save {
  align-self: flex-start;
  padding: 9px 15px;
  color: white;
  background: var(--sky);
  border: 1px solid var(--sky);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 800;
}

.cookie-save:hover {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
}

.cookie-policy-note {
  margin: 0 0 14px;
  color: #60727c;
  font-size: 12px;
  line-height: 1.55;
}

.cookie-policy-note a {
  color: var(--sky);
  font-weight: 700;
  text-underline-offset: 3px;
}

.cookie-actions {
  display: flex;
  gap: 10px;
}

.cookie-btn {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid #b9c4d0;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 800;
}

.cookie-btn.accept {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.cookie-btn:hover {
  color: white;
  background: var(--sky);
  border-color: var(--sky);
}

.footer-privacy-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  color: #73838b;
  font-size: 11px;
}

.footer-privacy-links a,
.footer-privacy-links button {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-privacy-links a:hover,
.footer-privacy-links button:hover {
  color: var(--sky);
}

@media (max-width: 800px) {
  .cookie-consent {
    right: auto;
    bottom: 16px;
    left: 16px;
    width: calc(100% - 32px);
    max-width: none;
    max-height: calc(100vh - 32px);
    padding: 20px 18px;
    border-radius: 16px;
  }

  .cookie-consent.show {
    transform: translateY(0);
  }

  .cookie-consent.preferences-mode {
    right: auto;
    left: 50%;
    transform: translate(-50%, 20px);
  }

  .cookie-consent.preferences-mode.show {
    transform: translate(-50%, 0);
  }

  .cookie-title {
    font-size: 26px;
  }

  .cookie-text {
    font-size: 14px;
  }

  .cookie-settings-panel {
    padding: 15px;
  }

  .cookie-option-info strong {
    font-size: 14px;
  }

  .cookie-option-info span {
    font-size: 12px;
  }

  .cookie-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer-privacy-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent,
  .cookie-btn {
    transition: none;
  }
}
