/* Better Formulas — Certificate of Analysis (COA) tab + viewer
   New, standalone stylesheet. Only referenced by product pages. */

.coa-intro {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.coa-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 480px;
}
.coa-list li {
  border-bottom: 1px solid var(--border);
}
.coa-list li:first-child {
  border-top: 1px solid var(--border);
}
.coa-list button.coa-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 4px;
  background: none;
  border: none;
  text-align: left;
  color: inherit;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
}
.coa-list button.coa-link:hover,
.coa-list button.coa-link:focus-visible {
  color: var(--green-medium);
}
.coa-list .coa-link__batch {
  font-weight: 600;
}
.coa-list .coa-link__date {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: 10px;
}
.coa-badge-current {
  display: inline-block;
  background: var(--green-pale);
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
}
[data-theme="dark"] .coa-badge-current {
  background: var(--accent-bg);
  color: var(--soft-white);
}
.coa-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Popup viewer ---------- */
.coa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 21, 27, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 950;
  padding: 20px;
}
.coa-modal-overlay[hidden] {
  display: none;
}
.coa-modal {
  background: var(--bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 780px;
  height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.coa-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.coa-modal__title {
  font-weight: 600;
  font-size: 0.98rem;
}
.coa-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
}
.coa-modal__close:hover { background: var(--bg-alt); color: var(--text); }
.coa-modal__body {
  flex: 1;
  min-height: 0;
}
.coa-modal__body embed,
.coa-modal__body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 600px) {
  .coa-modal {
    height: 92vh;
  }
}
