/* Site-wide privacy/consent banner (see /assets/js/consent.js). Relies on
   the shared CSS custom properties from base.css, so it looks native on
   both the plain marketing pages and the kartta-kysely tool. */
.kk-consent-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 500;
  width: min(640px, calc(100vw - 32px));
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
}
.kk-consent-text {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.45;
}
.kk-consent-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.kk-consent-link {
  border: none;
  background: none;
  color: var(--color-lake);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.kk-consent-buttons {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.kk-consent-btn {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 2px solid transparent;
}
.kk-consent-btn-primary {
  background: var(--color-forest);
  color: #fff;
}
.kk-consent-btn-primary:hover {
  background: var(--color-forest-dark);
}
.kk-consent-btn-secondary {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-muted);
}
.kk-consent-btn-secondary:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

.kk-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.kk-modal {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  max-width: 620px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.kk-modal-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius) var(--radius) 0 0;
}
.kk-modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}
.kk-modal-close {
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px 8px;
}
.kk-modal-close:hover {
  color: var(--color-text);
}
.kk-modal-body {
  padding: 18px 22px 22px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}
.kk-modal-body p {
  margin: 0 0 12px;
}
.kk-modal-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .kk-consent-banner {
    bottom: 8px;
    padding: 14px 16px;
  }
  .kk-consent-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .kk-consent-buttons {
    justify-content: flex-end;
  }
}
