.wcacf-coa {
  background: #ffffff;
  border: 1px solid #d9dee8;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  color: #54595F;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
  margin: 0 auto;
  max-width: 980px;
  padding: 34px;
}

.wcacf-coa-switcher-notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  color: #1e3a8a;
  margin: 0 auto 14px;
  max-width: 980px;
  padding: 10px 12px;
}

.wcacf-coa-lookup {
  margin: 0 auto;
  max-width: 980px;
}

.wcacf-coa-lookup-form {
  align-items: end;
  background: #ffffff;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  margin: 0 0 18px;
  padding: 16px;
}

.wcacf-coa-lookup-form label {
  grid-column: 1 / -1;
}

.wcacf-coa-lookup-select {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  min-height: 42px;
  padding: 8px 10px;
  width: 100%;
}

.wcacf-coa-lookup-form button {
  background: #09435B;
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  min-height: 42px;
  padding: 8px 16px;
}

.wcacf-coa-lookup-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #475569;
  padding: 18px;
  text-align: center;
}

.wcacf-lab-results {
  color: #54595F;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0 auto;
  max-width: 980px;
}

.wcacf-product-coa-heading {
  border-bottom: 1px solid rgba(9, 67, 91, 0.14);
  margin: 0 0 18px;
  padding: 0 0 14px;
}

.wcacf-product-coa-heading h2 {
  color: #09435B;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 6px;
}

.wcacf-product-coa-heading p {
  color: #7A7A7A;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.wcacf-lab-results-list {
  display: grid;
  gap: 18px;
}

.wcacf-coa-search-form {
  background: #ffffff;
  border: 1px solid rgba(9, 67, 91, 0.18);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(9, 67, 91, 0.07);
  margin: 0 0 22px;
  padding: 18px;
}

.wcacf-coa-search-form label {
  color: #09435B;
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 9px;
}

.wcacf-coa-search-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.wcacf-coa-search-row input[type="search"] {
  background: #f8fafc;
  border: 1px solid rgba(9, 67, 91, 0.22);
  border-radius: 999px;
  color: #54595F;
  flex: 1 1 auto;
  font-size: 14px;
  min-height: 44px;
  padding: 10px 16px;
  width: 100%;
}

.wcacf-coa-search-row input[type="search"]:focus {
  border-color: #09435B;
  box-shadow: 0 0 0 3px rgba(9, 67, 91, 0.12);
  outline: none;
}

.wcacf-coa-search-row button,
.wcacf-coa-search-clear {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  min-height: 44px;
  padding: 12px 18px;
  text-decoration: none;
}

.wcacf-coa-search-row button {
  background: #00AA51;
  border: 1px solid #00AA51;
  color: #ffffff;
  cursor: pointer;
}

.wcacf-coa-search-row button:hover,
.wcacf-coa-search-row button:focus {
  background: #008f45;
  border-color: #008f45;
  color: #ffffff;
}

.wcacf-coa-search-clear {
  background: #ffffff;
  border: 1px solid rgba(9, 67, 91, 0.24);
  color: #09435B;
}

.wcacf-coa-search-clear:hover,
.wcacf-coa-search-clear:focus {
  background: #09435B;
  border-color: #09435B;
  color: #ffffff;
  text-decoration: none;
}

.wcacf-coa-pagination-summary {
  color: #7A7A7A;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 14px;
}

.wcacf-coa-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 28px 0 0;
}

.wcacf-coa-page-link,
.wcacf-coa-page-ellipsis {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  min-width: 38px;
  padding: 0 14px;
}

.wcacf-coa-page-link {
  background: #ffffff;
  border: 1px solid rgba(9, 67, 91, 0.24);
  color: #09435B;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.wcacf-coa-page-link:hover,
.wcacf-coa-page-link:focus,
.wcacf-coa-page-link.is-current {
  background: #09435B;
  border-color: #09435B;
  color: #ffffff;
  text-decoration: none;
}

.wcacf-coa-page-link:hover,
.wcacf-coa-page-link:focus {
  transform: translateY(-1px);
}

.wcacf-coa-page-ellipsis {
  color: #7A7A7A;
  min-width: auto;
  padding: 0 4px;
}

.wcacf-lab-result-card {
  align-items: stretch;
  background: #ffffff;
  border: 1.5px solid #09435B;
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(180px, 0.85fr);
  min-height: 190px;
  overflow: hidden;
}

.wcacf-lab-result-info {
  padding: 28px 30px;
}

.wcacf-lab-pill {
  align-items: center;
  background: #f1f5f9;
  border-radius: 999px;
  color: #09435B;
  display: inline-flex;
  font-size: 12px;
  gap: 7px;
  line-height: 1;
  margin-bottom: 13px;
  padding: 7px 12px;
}

.wcacf-lab-logo {
  border-radius: 999px;
  display: inline-block;
  height: 20px;
  max-width: 58px;
  object-fit: contain;
  width: auto;
}

.wcacf-coa-provider-logo {
  display: block;
  height: auto;
  max-height: 70px;
  max-width: 150px;
  object-fit: contain;
}

.wcacf-coa-provider {
  margin: 0 0 8px;
}

.wcacf-lab-result-card h2 {
  color: #09435B;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 18px;
}

.wcacf-lab-result-card h2 span {
  color: #09435B;
}

.wcacf-lab-result-card h2 small {
  color: #09435B;
  display: block;
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
}

.wcacf-lab-result-variation {
  color: #7A7A7A;
  font-size: 13px;
  margin: -8px 0 18px;
}

.wcacf-lab-result-metrics {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 22px;
}

.wcacf-lab-result-metrics span {
  color: #7A7A7A;
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 7px;
}

.wcacf-lab-result-metrics strong {
  color: #54595F;
  display: block;
  font-size: 13px;
  line-height: 1.3;
}

.wcacf-lab-result-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wcacf-lab-result-link {
  align-items: center;
  background: #00AA51;
  border: 1px solid #00AA51;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  justify-content: center;
  line-height: 1;
  padding: 12px 18px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.wcacf-lab-result-link:hover,
.wcacf-lab-result-link:focus {
  background: #008f45;
  border-color: #008f45;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

.wcacf-lab-result-image {
  align-items: center;
  border-left: 1.5px dashed #09435B;
  display: flex;
  justify-content: center;
  min-height: 100%;
  padding: 24px;
  text-align: center;
}

.wcacf-lab-result-image img {
  display: block;
  height: auto;
  max-height: 150px;
  max-width: 180px;
  object-fit: contain;
}

.wcacf-lab-result-image span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #7A7A7A;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  height: 84px;
  justify-content: center;
  letter-spacing: 0.08em;
  width: 84px;
}

.wcacf-lab-results-accordion {
  gap: 14px;
}

.wcacf-lab-result-accordion-item {
  background: #ffffff;
  border: 1px solid rgba(9, 67, 91, 0.18);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(9, 67, 91, 0.05);
  overflow: hidden;
}

.wcacf-lab-result-accordion-item[open] {
  border-color: #09435B;
}

.wcacf-lab-result-accordion-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  list-style: none;
  padding: 18px 22px;
  position: relative;
}

.wcacf-lab-result-accordion-summary::-webkit-details-marker {
  display: none;
}

.wcacf-lab-result-accordion-summary-text {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.wcacf-lab-result-accordion-name {
  color: #09435B;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.wcacf-lab-result-accordion-dosage,
.wcacf-lab-result-accordion-batch {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #54595F;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 10px;
}

.wcacf-lab-result-accordion-icon {
  border: solid #00AA51;
  border-width: 0 2px 2px 0;
  flex: 0 0 auto;
  display: inline-block;
  height: 10px;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  width: 10px;
}

.wcacf-lab-result-accordion-item[open] .wcacf-lab-result-accordion-icon {
  transform: rotate(-135deg);
}

.wcacf-lab-result-accordion-panel {
  background: #ffffff;
  border-top: 1px solid rgba(9, 67, 91, 0.12);
  padding: 16px;
}

.wcacf-lab-result-card-in-accordion {
  margin: 0;
}

.wcacf-selected-coa {
  margin-top: 34px;
}

.wcacf-coa.is-hidden {
  display: none;
}

.wcacf-coa-actions {
  margin-bottom: 18px;
  text-align: right;
}

.wcacf-coa-actions button {
  background: #09435B;
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  padding: 10px 16px;
}

.wcacf-coa-header {
  align-items: flex-start;
  border-bottom: 3px solid #09435B;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding-bottom: 22px;
}

.wcacf-coa-brand {
  align-items: center;
  display: flex;
  gap: 14px;
}

.wcacf-coa-brand img {
  height: auto;
  max-height: 70px;
  max-width: 150px;
}

.wcacf-coa-brand strong {
  display: block;
  font-size: 22px;
  letter-spacing: 0.02em;
}

.wcacf-coa-brand span {
  color: #5d6b82;
  display: block;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wcacf-coa-meta {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.wcacf-coa-meta div,
.wcacf-coa-grid div {
  background: #f7f9fc;
  border: 1px solid #e4e9f2;
  border-radius: 6px;
  padding: 10px 12px;
}

.wcacf-coa-meta span,
.wcacf-coa-grid span {
  color: #7A7A7A;
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wcacf-coa-meta strong,
.wcacf-coa-grid strong {
  display: block;
  font-size: 14px;
  margin-top: 3px;
}

.wcacf-coa-grid a {
  color: #09435B;
  text-decoration: underline;
}

.wcacf-coa-result {
  border-radius: 999px;
  display: inline-block !important;
  padding: 4px 10px;
}

.wcacf-coa-result-pass {
  background: rgba(0, 170, 81, 0.12);
  color: #00AA51;
}

.wcacf-coa-result-fail {
  background: #fee2e2;
  color: #991b1b;
}

.wcacf-coa-result-conditional-pass,
.wcacf-coa-result-pending {
  background: #fef3c7;
  color: #92400e;
}

.wcacf-coa-title {
  padding: 30px 0 20px;
  text-align: center;
}

.wcacf-coa-title p {
  color: #7A7A7A;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

.wcacf-coa-title h1 {
  color: #0f172a;
  font-size: 34px;
  margin: 8px 0;
}

.wcacf-coa-title span {
  color: #475569;
  display: block;
  font-family: "Courier New", monospace;
  overflow-wrap: anywhere;
}

.wcacf-coa-title small {
  color: #7A7A7A;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
}

.wcacf-coa-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
}

.wcacf-coa-grid div:nth-child(7),
.wcacf-coa-grid div:nth-child(8) {
  grid-column: span 2;
}

.wcacf-coa-media {
  display: grid;
  gap: 18px;
  grid-template-columns: 2fr 1fr;
  margin: 0 0 28px;
}

.wcacf-coa-media-card {
  border: 1px solid #e4e9f2;
  border-radius: 8px;
  padding: 14px;
}

.wcacf-coa-media-card h2 {
  color: #09435B;
  font-size: 16px;
  margin: 0 0 12px;
}

.wcacf-coa-media-card img {
  display: block;
  height: auto;
  max-width: 100%;
}

.wcacf-coa-qr {
  text-align: center;
}

.wcacf-coa-qr img {
  margin: 0 auto 10px;
  max-width: 180px;
}

.wcacf-coa-qr a {
  color: #09435B;
  font-weight: 700;
  text-decoration: underline;
}

.wcacf-coa-section h2,
.wcacf-coa-footer h2 {
  color: #09435B;
  font-size: 18px;
  margin: 0 0 12px;
}

.wcacf-coa-table {
  border-collapse: collapse;
  font-size: 14px;
  margin: 0 0 26px;
  width: 100%;
}

.wcacf-coa-table th {
  background: #09435B;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 11px 9px;
  text-align: left;
  text-transform: uppercase;
}

.wcacf-coa-table td {
  border: 1px solid #e4e9f2;
  padding: 10px 9px;
  vertical-align: top;
}

.wcacf-coa-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.wcacf-coa-status-pass {
  background: rgba(0, 170, 81, 0.12);
  color: #00AA51;
}

.wcacf-coa-status-fail {
  background: #fee2e2;
  color: #991b1b;
}

.wcacf-coa-status-n-a,
.wcacf-coa-status-na {
  background: #e2e8f0;
  color: #334155;
}

.wcacf-coa-footer {
  border-top: 1px solid #e4e9f2;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 260px;
  padding-top: 20px;
}

.wcacf-coa-footer p {
  margin: 0 0 6px;
}

.wcacf-coa-signature {
  align-self: end;
  border-top: 1px solid #09435B;
  min-height: 92px;
  padding-top: 8px;
  text-align: center;
}

.wcacf-coa-signature img {
  display: block;
  margin: 0 auto 8px;
  max-height: 70px;
  width: auto;
}

.wcacf-coa-signature span {
  color: #7A7A7A;
  font-size: 12px;
  text-transform: uppercase;
}

.wcacf-coa-notes {
  border-top: 1px solid #e4e9f2;
  color: #7A7A7A;
  font-size: 12px;
  margin: 22px 0 0;
  padding-top: 14px;
}

@media (max-width: 760px) {
  .wcacf-coa-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .wcacf-coa-search-row button,
  .wcacf-coa-search-clear {
    width: 100%;
  }

  .wcacf-lab-result-card,
  .wcacf-lab-result-metrics {
    grid-template-columns: 1fr;
  }

  .wcacf-lab-result-accordion-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .wcacf-lab-result-info {
    padding: 22px;
  }

  .wcacf-lab-result-image {
    border-left: 0;
    border-top: 1.5px dashed #09435B;
  }

  .wcacf-coa {
    padding: 20px;
  }

  .wcacf-coa-header,
  .wcacf-coa-footer {
    display: block;
  }

  .wcacf-coa-meta {
    margin-top: 16px;
  }

  .wcacf-coa-grid {
    grid-template-columns: 1fr;
  }

  .wcacf-coa-media {
    grid-template-columns: 1fr;
  }

  .wcacf-coa-grid div:nth-child(7),
  .wcacf-coa-grid div:nth-child(8) {
    grid-column: auto;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  .wcacf-coa,
  .wcacf-coa * {
    visibility: visible;
  }

  .wcacf-coa {
    border: 0;
    box-shadow: none;
    left: 0;
    margin: 0;
    max-width: none;
    padding: 0;
    position: absolute;
    top: 0;
    width: 100%;
  }

  .wcacf-coa-actions {
    display: none;
  }
}
