/**
 * Bold Stream (bold_stream) - Legal / static policy pages
 * Loaded only on the 7 policy routes (see bs_policy_assets()).
 * Prefix: bs- (unique to this theme, does not collide with fv-/dm- or
 * other theme prefixes). Reuses the existing .article-container /
 * .widget-title / ul.menu look already shipped in theme.css; only the
 * rules that theme does not already provide are added here.
 *
 * @package BoldStream
 */

/* Centered policy card - explicit max-width on top of the existing
   .article-container look (background, radius, shadow already inherited). */
.article-container.bs-legal,
.article-container.bs-static {
  margin: 0 auto;
}

/* Cross links between policy pages, placed inside article>footer. */
.bs-related {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 12px 0 0;
  padding: 0;
  justify-content: center;
}

.bs-related li {
  font-size: 14px;
}

/* ===== Forms (Contact us / Report content) ===== */
.bs-form {
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  padding-left: 10px;
}

.bs-field {
  margin: 0 0 18px;
}

.bs-field label {
  display: block;
  margin: 0 0 6px;
  color: var(--text-on-theme);
  font-weight: 600;
  font-size: 14px;
}

.bs-field .bs-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--bs-text-secondary);
  font-weight: 400;
}

.bs-field .bs-url-prefix {
  color: var(--bs-text-secondary);
  font-size: 13px;
  margin-right: 6px;
  white-space: nowrap;
}

.bs-url-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
}

.bs-url-row input {
  flex: 1 1 200px;
}

.bs-field input[type="text"],
.bs-field input[type="email"],
.bs-field input[type="url"],
.bs-field textarea,
.bs-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  background: var(--bs-bg-primary);
  border: 1px solid var(--bs-alpha-primary-15);
  color: var(--bs-text-primary);
  font: inherit;
  font-size: 14px;
}

.bs-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.bs-field input:focus,
.bs-field textarea:focus,
.bs-field select:focus {
  outline: 2px solid var(--theme-color);
  outline-offset: 1px;
  border-color: var(--theme-color);
}

/* Custom SVG chevron for <select>, matched to the dark theme surface. */
.bs-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23cbdbd1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 8 10 13 15 8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.bs-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.bs-checkbox-row input[type="checkbox"] {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  accent-color: var(--theme-color);
  flex: 0 0 auto;
}

.bs-checkbox-row label {
  font-weight: 400;
  font-size: 13px;
  color: var(--bs-text-primary);
  margin: 0;
}

.bs-submit {
  display: inline-block;
  border: none;
  background: var(--theme-color);
  color: var(--text-on-theme);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 28px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.1s ease;
}

.bs-submit:hover {
  filter: brightness(1.1);
}

.bs-submit:focus-visible {
  outline: 2px solid var(--text-on-theme);
  outline-offset: 2px;
}

.bs-status {
  margin-top: 16px;
  padding: 12px 14px;
  font-size: 14px;
  display: none;
}

.bs-status.is-visible {
  display: block;
}

.bs-status--ok {
  background: var(--bs-alpha-green-15);
  border: 1px solid var(--bs-accent-green);
  color: var(--bs-text-primary);
}

.bs-status--err {
  background: var(--bs-alpha-red-15);
  border: 1px solid var(--bs-accent-red);
  color: var(--bs-text-secondary);
}

/* ===== Transparency report ===== */
.bs-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.bs-stat-card {
  flex: 1 1 150px;
  background: var(--bs-bg-primary);
  padding: 16px;
  text-align: center;
  border-top: 3px solid var(--theme-color);
}

.bs-stat-card .bs-stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-on-theme);
}

.bs-stat-card .bs-stat-label {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--bs-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bs-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.bs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.bs-table caption {
  text-align: left;
  color: var(--bs-text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
  caption-side: top;
}

.bs-table th,
.bs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bs-alpha-primary-10);
  text-align: left;
}

.bs-table thead th {
  color: var(--theme-color);
  font-weight: 700;
  border-bottom: 2px solid var(--theme-color);
}

.bs-table tbody tr:last-child th,
.bs-table tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 600px) {
  .bs-form {
    padding-left: 0;
  }

  .bs-stat-card {
    flex: 1 1 45%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bs-submit,
  .article-container article a {
    transition: none;
  }
}
