/*
 * ProtoConsent browser extension
 * Copyright (C) 2026 ProtoConsent contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

:root {
  --pc-bg-light: #dbeafe;
  --pc-blue: #1e3a8a;
  --pc-body-bg: #f3f4f6;
  --pc-text-main: #111827;
  --pc-muted: #6b7280;
  --pc-border: #e5e7eb;
  --pc-white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--pc-text-main);
  background-color: var(--pc-body-bg);
}

a {
  color: var(--pc-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

header {
  padding: 12px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: contain;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--pc-blue);
}

.header-link {
  font-size: 13px;
  color: var(--pc-muted);
}

.header-links-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

main {
  flex: 1;
}

.hero {
  background-color: var(--pc-white);
  border-radius: 12px;
  border: 1px solid var(--pc-border);
  padding: 24px 20px 22px;
  margin-bottom: 18px;
}

.hero-logo {
  display: block;
  margin: 0 auto 12px;
  border-radius: 8px;
}

.hero-title {
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--pc-text-main);
}

.hero-subtitle {
  font-size: 16px;
  color: var(--pc-muted);
  margin: 0 0 20px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hero-meta {
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  background: var(--pc-bg-light);
  padding: 0.75rem 1.5rem;
}

.hero-meta-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.95rem;
  color: var(--pc-blue);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background-color: var(--pc-bg-light);
  color: var(--pc-blue);
  font-size: 13px;
  border: 1px solid rgba(30, 58, 138, 0.1);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background-color: var(--pc-blue);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  background-color: var(--pc-blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #1d4ed8;
  text-decoration: none;
}

.btn-secondary {
  font-size: 12px;
  color: var(--pc-blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-footnote {
  font-size: 13px;
  color: var(--pc-muted);
  margin-top: 8px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr);
  gap: 16px;
  margin-top: 16px;
}

@media (max-width: 780px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background-color: var(--pc-white);
  border-radius: 10px;
  border: 1px solid var(--pc-border);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
}

.card > .screenshot:last-child {
  margin-top: auto;
  margin-bottom: auto;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pc-muted);
}

.card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

.card p {
  margin: 0 0 8px;
}

.card ul {
  margin: 10px 0 0;
  padding-left: 16px;
}

.card li {
  margin-bottom: 4px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pill {
  padding: 3px 10px;
  border-radius: 999px;
  background-color: var(--pc-bg-light);
  color: var(--pc-blue);
  font-size: 13px;
  border: 1px solid rgba(30, 58, 138, 0.12);
}

.audience-block {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--pc-border);
}

.audience-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pc-muted);
  margin-bottom: 4px;
}

footer {
  border-top: 1px solid var(--pc-border);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 13px;
  color: var(--pc-muted);
}

.footer-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
}

.footer-links a {
  color: var(--pc-muted);
}

.grid-spaced {
  margin-top: 14px;
}

.card-spaced {
  margin-top: 14px;
}

.cta-text {
  margin-bottom: 6px;
}

.screenshot {
  margin: 12px 0 14px;
  padding: 0;
  text-align: center;
}

.screenshot img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--pc-border);
}

.screenshot figcaption {
  font-size: 13px;
  color: var(--pc-muted);
  margin-top: 8px;
}

.code-block {
  background-color: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 16px 18px;
  margin: 10px 0 14px;
  overflow-x: auto;
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.code-comment {
  color: #94a3b8;
}

/* GPC demo card */

.gpc-demo-card {
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
}

/* WK pill replica */

.wk-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  border: 1px solid #bfd0e4;
  color: #1e3a8a;
  background-color: #f3f8ff;
  vertical-align: middle;
}

.wk-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #2563eb;
}

/* SDK live test */

.sdk-demo-card {
  background-color: var(--pc-bg-light);
  border: 1px solid rgba(30, 58, 138, 0.12);
}

.sdk-demo-detected,
.sdk-demo-noext {
  background-color: var(--pc-white);
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 6px;
}

.sdk-demo-noext {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--pc-text-main);
}

.sdk-demo-profile {
  font-size: 15px;
  font-weight: 700;
  color: var(--pc-blue);
  margin-bottom: 10px;
  text-transform: capitalize;
}

.sdk-demo-purposes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sdk-demo-purpose {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid;
}

.sdk-demo-purpose.is-allowed {
  background-color: #dcfce7;
  color: #166534;
  border-color: rgba(22, 101, 52, 0.15);
}

.sdk-demo-purpose.is-blocked {
  background-color: #fee2e2;
  color: #991b1b;
  border-color: rgba(153, 27, 27, 0.15);
}

.sdk-demo-icon {
  flex-shrink: 0;
}

/* Collapsible card (details/summary) */
details.card {
  padding: 0;
}

details.card > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
}

details.card > summary::-webkit-details-marker {
  display: none;
}

details.card > summary::after {
  content: "▸";
  float: right;
  color: var(--pc-muted);
  font-size: 12px;
}

details.card[open] > summary::after {
  content: "▾";
}

details.card[open] > summary {
  border-bottom: 1px solid var(--pc-border);
  margin-bottom: 0;
}

details.card > p,
details.card > ul {
  padding: 0 16px;
}

details.card > p:first-of-type {
  margin-top: 12px;
}

/* Article page (why.html) */

.article {
  background-color: var(--pc-white);
  border-radius: 12px;
  border: 1px solid var(--pc-border);
  padding: 28px 24px 24px;
}

.article-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pc-border);
}

.article-back {
  font-size: 13px;
  color: var(--pc-muted);
  display: inline-block;
  margin-bottom: 12px;
}

.article-title {
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--pc-text-main);
}

.article-subtitle {
  font-size: 17px;
  color: var(--pc-muted);
  margin: 0;
  line-height: 1.5;
}

.article-section {
  margin-bottom: 24px;
}

.article-section:last-child {
  margin-bottom: 0;
}

.article-section h2 {
  font-size: 18px;
  margin: 0 0 10px;
  color: var(--pc-text-main);
}

.article-section p {
  margin: 0 0 10px;
}

.article-section ul {
  margin: 8px 0 10px;
  padding-left: 18px;
}

.article-section li {
  margin-bottom: 6px;
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 12px;
}

.policy-table th,
.policy-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pc-border);
}

.policy-table th {
  font-weight: 600;
  color: var(--pc-blue);
}

.policy-table td:first-child {
  white-space: nowrap;
}
