/*
 * ssg cookie consent — self-contained styles (no theme dependency).
 * A bottom sheet on mobile, a centred card on wider screens. Reject and Accept
 * are the same size and weight so neither nudges the choice; contrast meets
 * WCAG 2.2 AA in both colour schemes.
 */

.ssg-cc {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: rgb(15 23 42 / 45%);
}

/* Vertical placement is configurable (config.position); default is bottom. */
.ssg-cc--bottom {
  align-items: flex-end;
}

.ssg-cc--top {
  align-items: flex-start;
}

.ssg-cc--center {
  align-items: center;
}

.ssg-cc-box {
  width: 100%;
  max-width: 34rem;
  background: #ffffff;
  color: #0f172a;
  border-radius: 0.75rem;
  box-shadow: 0 12px 40px rgb(0 0 0 / 25%);
  padding: 1.25rem 1.25rem 1rem;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.ssg-cc-box h2 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.ssg-cc-box p {
  margin: 0 0 0.75rem;
  color: #334155;
}

.ssg-cc-box a {
  color: #0050a6;
}

.ssg-cc-cats {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
  max-height: 40vh;
  overflow-y: auto;
}

.ssg-cc-cat {
  display: flex;
  gap: 0.625rem;
  align-items: start;
  padding: 0.625rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

.ssg-cc-cat input {
  margin-top: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
}

.ssg-cc-cat small {
  display: block;
  color: #64748b;
  margin-top: 0.15rem;
}

.ssg-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ssg-cc-btn {
  flex: 1 1 8rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ssg-cc-primary {
  background: #0050a6;
  color: #ffffff;
}

.ssg-cc-primary:hover {
  background: #00428a;
}

.ssg-cc-secondary {
  background: #ffffff;
  color: #0f172a;
  border-color: #94a3b8;
}

.ssg-cc-secondary:hover {
  border-color: #475569;
}

.ssg-cc :focus-visible {
  outline: 2px solid #0050a6;
  outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  .ssg-cc-box {
    background: #1e293b;
    color: #f8fafc;
  }
  .ssg-cc-box p {
    color: #e2e8f0;
  }
  .ssg-cc-box a {
    color: #99bfeb;
  }
  .ssg-cc-cat {
    border-color: #334155;
  }
  .ssg-cc-cat small {
    color: #94a3b8;
  }
  .ssg-cc-secondary {
    background: #1e293b;
    color: #f8fafc;
    border-color: #64748b;
  }
  .ssg-cc :focus-visible {
    outline-color: #99bfeb;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ssg-cc * {
    transition: none !important;
  }
}
