.cookie-consent {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  padding: 18px 20px;
  border-top: 1px solid rgba(34, 34, 34, 0.92);
  background: rgba(10, 10, 10, 0.96);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.36);
  color: var(--text-primary);
  font-family: var(--sans);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 280ms ease, transform 280ms ease;
}

.cookie-consent.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cookie-consent[hidden],
.cookie-modal[hidden] {
  display: none;
}

.cookie-consent__inner {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, 100%);
  margin: 0 auto;
}

.cookie-consent__text {
  max-width: 760px;
  flex: 1 1 auto;
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.cookie-consent__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  white-space: nowrap;
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cookie-btn:hover {
  border-color: var(--accent);
}

.cookie-btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.cookie-btn--primary:hover {
  background: var(--accent-hover);
}

.cookie-btn--ghost {
  color: var(--text-secondary);
}

.cookie-floating-settings {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 9999;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.9);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0.86;
  transition: opacity 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.cookie-floating-settings:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  opacity: 1;
  transform: translateY(-1px);
}

.cookie-floating-settings svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--text-primary);
  font-family: var(--sans);
}

.cookie-modal__panel {
  width: min(560px, 100%);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.52);
  overflow: hidden;
}

.cookie-modal__header,
.cookie-modal__footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.cookie-modal__footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  border-bottom: 0;
}

.cookie-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cookie-modal__close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.cookie-modal__body {
  padding: 4px 20px;
}

.cookie-category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.cookie-category:last-child {
  border-bottom: 0;
}

.cookie-category__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.cookie-category__desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.cookie-toggle {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}

.cookie-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-toggle__track {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.cookie-toggle__track::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-secondary);
  content: "";
  transition: transform 160ms ease, background 160ms ease;
}

.cookie-toggle input:checked + .cookie-toggle__track {
  border-color: var(--accent);
  background: var(--accent);
}

.cookie-toggle input:checked + .cookie-toggle__track::after {
  transform: translateX(20px);
  background: #fff;
}

.cookie-toggle input:disabled + .cookie-toggle__track {
  cursor: not-allowed;
  opacity: 0.72;
}

@media (max-width: 768px) {
  .cookie-consent__inner {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-consent__actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .cookie-btn {
    flex: 1 1 100%;
  }

  .cookie-modal {
    align-items: end;
    padding: 12px;
  }

  .cookie-modal__panel {
    border-radius: 12px;
  }

  .cookie-floating-settings {
    bottom: 14px;
    left: 14px;
  }
}
