/* VitalIQ Legal Pages — Shared Stylesheet */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Sticky top bar */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar a {
  text-decoration: none;
  color: inherit;
}

.top-bar .brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: #0066cc;
}

.top-bar .separator {
  color: #ccc;
  font-weight: 300;
}

.top-bar .doc-name {
  font-weight: 500;
  color: #555;
  font-size: 0.9375rem;
}

/* Main content */
.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* Document header */
.doc-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e5e5e5;
}

.doc-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 12px;
  line-height: 1.2;
}

.doc-meta {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.8;
}

.doc-meta strong {
  color: #444;
}

/* Headings */
h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #222;
  margin: 32px 0 12px;
}

h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #333;
  margin: 24px 0 8px;
}

/* Paragraphs */
p {
  margin: 0 0 16px;
}

/* Links */
a {
  color: #0066cc;
  text-decoration: underline;
  text-decoration-color: rgba(0, 102, 204, 0.3);
}

a:hover {
  text-decoration-color: #0066cc;
}

/* Lists */
ul, ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 6px;
}

/* Bold text */
strong {
  font-weight: 600;
}

/* Horizontal rules */
hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 32px 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.9375rem;
}

thead th {
  background: #f7f7f7;
  text-align: left;
  font-weight: 600;
  padding: 10px 12px;
  border: 1px solid #ddd;
  color: #333;
}

tbody td {
  padding: 10px 12px;
  border: 1px solid #ddd;
  vertical-align: top;
}

tbody tr:nth-child(even) {
  background: #fafafa;
}

/* Table of contents */
.toc {
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 0 0 32px;
}

.toc h2 {
  font-size: 1.125rem;
  margin: 0 0 12px;
  padding: 0;
  border: none;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

.toc li {
  margin-bottom: 4px;
}

.toc a {
  text-decoration: none;
  color: #0066cc;
}

.toc a:hover {
  text-decoration: underline;
}

/* Callout box */
.callout {
  background: #f0f7ff;
  border-left: 4px solid #0066cc;
  padding: 16px 20px;
  margin: 16px 0 24px;
  border-radius: 0 8px 8px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Important/warning */
.important {
  background: #fff8f0;
  border-left: 4px solid #e67e00;
  padding: 16px 20px;
  margin: 16px 0 24px;
  border-radius: 0 8px 8px 0;
}

.important p:last-child {
  margin-bottom: 0;
}

/* Legal hub cards */
.legal-section {
  margin: 32px 0;
}

.legal-section h2 {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 16px;
}

.legal-link {
  display: block;
  padding: 16px 20px;
  margin: 0 0 8px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.legal-link:hover {
  border-color: #0066cc;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.08);
}

.legal-link .link-title {
  font-weight: 600;
  color: #0066cc;
  display: block;
  margin-bottom: 4px;
}

.legal-link .link-desc {
  font-size: 0.875rem;
  color: #666;
}

/* Footer */
.footer {
  border-top: 1px solid #e5e5e5;
  padding-top: 24px;
  margin-top: 48px;
  font-size: 0.875rem;
  color: #888;
  text-align: center;
  line-height: 2;
}

.footer a {
  color: #0066cc;
}

/* Responsive */
@media (max-width: 600px) {
  .content {
    padding: 24px 16px 60px;
  }

  .doc-header h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  table {
    font-size: 0.8125rem;
  }

  thead th, tbody td {
    padding: 8px;
  }

  .top-bar {
    padding: 10px 16px;
  }

  .top-bar .doc-name {
    font-size: 0.8125rem;
  }
}

/* Print */
@media print {
  .top-bar {
    position: static;
    border-bottom: none;
  }

  .content {
    max-width: none;
    padding: 0;
  }
}

/* ── Cookie Consent Banner ──────────────────────────────────────────── */

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: none;
  padding: 16px;
}

#cookie-banner.cookie-banner-visible {
  display: block;
}

.cookie-banner-inner {
  background: #1e1e1e;
  color: #e5e5e5;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.9375rem;
  line-height: 1.6;
  border-radius: 16px;
  border: 1px solid #333;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  max-width: 480px;
  margin: 0 auto;
}

.cookie-banner-gpc {
  border-color: #2d6b4a;
}

.cookie-banner-icon {
  font-size: 1.5rem;
  margin-bottom: -4px;
}

.cookie-banner-text {
  margin: 0;
  color: #ccc;
  font-size: 0.875rem;
  line-height: 1.5;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
}

.cookie-btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  line-height: 1.4;
  text-align: center;
  flex: 1;
  transition: background 0.2s, transform 0.1s;
}

.cookie-btn:active {
  transform: scale(0.97);
}

.cookie-btn-accept {
  background: #4ecdc4;
  color: #111;
}

.cookie-btn-accept:hover {
  background: #45b7af;
}

.cookie-btn-manage {
  background: transparent;
  color: #999;
  border: 1px solid #444;
}

.cookie-btn-manage:hover {
  background: #2a2a2a;
  color: #ccc;
}

@media (max-width: 600px) {
  #cookie-banner {
    padding: 12px;
  }

  .cookie-banner-inner {
    padding: 20px;
  }

  .cookie-banner-actions {
    flex-direction: column;
  }
}
