/* Hazen Systems cookie consent banner, themed for Nocturne design system */

.cm {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.cm__popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 100%;
  z-index: 9999;
  background: #1a1d2e;
  border-top: 1px solid #2d2e3f;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  padding: 24px;
  animation: cm-slide-up 0.3s ease-out;
}

@keyframes cm-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cm__content {
  max-width: 1200px;
  margin: 0 auto;
}

.cm__label {
  display: block;
  margin-bottom: 20px;
}

.cm__label > span:first-child {
  display: block;
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 8px;
  color: #e0dfe7;
}

.cm__label > span:last-child {
  display: block;
  font-size: 13px;
  color: #9ca0a8;
  line-height: 1.6;
}

.cm__label > span:last-child a {
  color: #9184d9;
  text-decoration: none;
  font-weight: 500;
  transition: color 150ms ease;
}

.cm__label > span:last-child a:hover {
  color: #a89ee8;
}

.cm__inputs {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.cm__input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cm__checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid #9184d9;
  border-radius: 3px;
  cursor: pointer;
  background: transparent;
  transition: all 150ms ease;
  flex-shrink: 0;
}

.cm__checkbox:hover {
  border-color: #a89ee8;
  background: rgba(145, 132, 217, 0.05);
}

.cm__checkbox:checked {
  background: #9184d9;
  border-color: #9184d9;
}

.cm__checkbox:checked::after {
  content: '✓';
  display: block;
  color: #161826;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  line-height: 18px;
}

.cm__checkbox:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cm__input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}

.cm__input-label-title {
  font-weight: 500;
  color: #e0dfe7;
  font-size: 13px;
}

.cm__input-label-description {
  display: block;
  font-size: 12px;
  color: #9ca0a8;
  margin-top: 2px;
}

.cm__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cm__btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
  display: inline-block;
}

.cm__btn--primary {
  background: #9184d9;
  color: #161826;
}

.cm__btn--primary:hover {
  background: #a89ee8;
}

.cm__btn--secondary {
  background: transparent;
  color: #9184d9;
  border: 1px solid #9184d9;
}

.cm__btn--secondary:hover {
  background: rgba(145, 132, 217, 0.1);
  border-color: #a89ee8;
  color: #a89ee8;
}

.cm__btn--tertiary {
  background: transparent;
  color: #9ca0a8;
  border: 1px solid #2d2e3f;
}

.cm__btn--tertiary:hover {
  color: #e0dfe7;
  border-color: #3d3e4f;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .cm__popup,
  .cm__checkbox,
  .cm__btn {
    animation: none !important;
    transition: none !important;
  }
}

/* Tablet and below */
@media (max-width: 768px) {
  .cm__popup {
    padding: 20px 16px;
  }

  .cm__buttons {
    flex-direction: column;
    justify-content: stretch;
  }

  .cm__btn {
    width: 100%;
    text-align: center;
  }
}
