/* Terms page — pill-tab navigation + content styling */

:root {
  --ink: #111318;
  --soft: #6b7084;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

/* Layout */
.terms-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px;
  color: var(--ink);
}

/* Pill tabs */
.tc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 28px;
}

.tc-tab {
  padding: 8px 18px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  color: var(--soft);
  background: none;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.tc-tab::after {
  content: attr(data-label);
  font-weight: 600;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  display: block;
  pointer-events: none;
}

.tc-tab:hover {
  color: var(--ink);
  background: #f3f4f6;
}

.tc-tab.active {
  color: #fff;
  font-weight: 600;
  background: var(--ink);
}

/* Content area — fixed width prevents layout shift between tabs */
.terms-content {
  line-height: 1.6;
  font-size: 15px;
  width: 100%;
  min-height: 60vh;
  box-sizing: border-box;
}

/* Prevent inner content from affecting wrapper width */
.terms-content .pub,
.terms-content #terms {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-content table {
  max-width: 100%;
  table-layout: fixed;
  overflow-wrap: break-word;
}

.terms-content h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.terms-content h4 {
  font-size: 16px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.terms-content p {
  margin-bottom: 12px;
}

.terms-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.terms-content li {
  margin-bottom: 6px;
}

.terms-content .small {
  font-size: 13px;
  color: var(--soft);
}

/* Color coding for review (green = new, blue = updated) */
.legend {
  background: #f5f5f5;
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 13px;
}

.legend-green {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #e8f5e9;
  border-left: 3px solid #208900;
  margin-right: 6px;
  vertical-align: middle;
}

.legend-blue {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #e3f2fd;
  border-left: 3px solid #109dd7;
  margin-right: 6px;
  vertical-align: middle;
}

.new-section {
  background: #e8f5e9;
  border-left: 4px solid #208900;
  padding: 12px;
  margin: 10px 0;
}

.updated-section {
  background: #e3f2fd;
  border-left: 4px solid #109dd7;
  padding: 12px;
  margin: 10px 0;
}

/* Summary / details styling */
details {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0;
  margin: 12px 0;
}
details[open] {
  padding-bottom: 16px;
}
details > *:not(summary) {
  padding-left: 16px;
  padding-right: 16px;
  line-height: 1.6;
}
summary {
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 8px;
  color: #6b7084;
  font-size: 13px;
  transition: background .15s;
}
summary:hover {
  background: #f9fafb;
  color: #111318;
}

/* Cookie table */
.tc-cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0 24px;
}
.tc-cookie-table th {
  text-align: left;
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 2px solid #e5e7eb;
  color: var(--ink);
}
.tc-cookie-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  vertical-align: top;
}
.tc-cookie-table tr:hover td {
  background: #f9fafb;
}

/* Ghost button (cookie settings) */
.tc-ghost-btn {
  background: none;
  border: 1px solid var(--soft);
  color: var(--soft);
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  margin: 0 0 24px;
  transition: all .15s;
}
.tc-ghost-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* Responsive */
@media (max-width: 600px) {
  .terms-wrapper {
    padding: 20px 16px;
  }

  .tc-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px;
  }

  .tc-tabs::-webkit-scrollbar {
    display: none;
  }
}
