/*
 * Header actions, rating/stock, the "Add a product" column, row markers
 * (difference dot, "Same on all", Yes/No), the hidden-rows note, Clear all
 * and the "Send this comparison" card.
 */

/*
 * Image with Pin / Remove and the base badge on top: the column's width,
 * up to `--_image` (templates set their own).
 */
.pcfw-table__media {
  position: relative;
  display: block;
  width: 100%;
  max-width: var(--_image, 220px);
}

.pcfw-table__image {
  display: block;
}

.pcfw-table__media.is-bare {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pcfw-table__actions {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  display: flex;
  gap: 6px;
}

.pcfw-table__media.is-bare .pcfw-table__actions,
.pcfw-table__media.is-bare .pcfw-table__base {
  position: static;
}

.pcfw-table-mount .pcfw-table__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--_surface) 92%, transparent);
  box-shadow: 0 1px 3px rgb(20 22 27 / 16%);
  color: var(--_label);
  cursor: pointer;
}

.pcfw-table-mount .pcfw-table__action:hover {
  background: var(--_surface);
  color: var(--_text);
}

.pcfw-table-mount .pcfw-table__action[aria-pressed="true"] {
  color: var(--_cart-bg);
}

.pcfw-table-mount .pcfw-table__action:focus-visible {
  outline: 2px solid var(--_cart-bg);
  outline-offset: 2px;
}

.pcfw-table-mount .pcfw-table__action:disabled {
  opacity: 0.5;
  cursor: progress;
}

.pcfw-table__base {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #14161b;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

/* Rating and stock under the name. */
.pcfw-table__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0 0 12px;
  color: var(--_muted);
  font-size: 0.9em;
  font-weight: 400;
}

.pcfw-table__rating,
.pcfw-table__stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pcfw-table__stars svg {
  color: #f2b705;
}

.pcfw-table__stars strong {
  color: var(--_text);
  font-weight: 600;
}

.pcfw-table__stock {
  font-weight: 500;
}

.pcfw-table__stock.is-in-stock {
  color: #12753a;
}

.pcfw-table__stock.is-out-of-stock {
  color: #b42318;
}

.pcfw-table__stock.is-available-on-backorder {
  color: #a15c00;
}

/* "Add a product" column. */
.pcfw-table th.pcfw-table__slot {
  vertical-align: top;
}

.pcfw-table-mount a.pcfw-table__add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 200px;
  padding: 16px;
  border: 1.5px dashed color-mix(in srgb, var(--_text) 22%, transparent);
  border-radius: var(--_radius);
  background: color-mix(in srgb, var(--_text) 2%, transparent);
  color: var(--_text);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
}

.pcfw-table-mount a.pcfw-table__add:hover {
  border-color: var(--_cart-bg);
  color: var(--_cart-bg);
}

.pcfw-table__add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--_line);
  border-radius: 50%;
  background: var(--_surface);
}

.pcfw-table__add-left {
  color: var(--_muted);
  font-size: 0.9em;
  font-weight: 400;
}

/* Rows: difference dot, merged "Same on all" cell, Yes / No. */
.pcfw-table__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 8px;
  border-radius: 50%;
  background: #f2b705;
  vertical-align: 1px;
}

.pcfw-table__same-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-inline-start: 10px;
  padding: 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--_text) 6%, transparent);
  color: var(--_muted);
  font-size: 12px;
  font-weight: 500;
  vertical-align: middle;
  white-space: nowrap;
}

.pcfw-table__answer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pcfw-table__answer-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.pcfw-table__answer.is-yes .pcfw-table__answer-icon {
  background: #e6f4ec;
  color: #12753a;
}

.pcfw-table__answer.is-no .pcfw-table__answer-icon {
  background: color-mix(in srgb, var(--_text) 7%, transparent);
  color: var(--_muted);
}

.pcfw-table__hidden {
  margin: 10px 0 0;
  color: var(--_muted);
  font-size: 13px;
}

/* Clear all (toolbar). */
.pcfw-table-mount .pcfw-table__clear {
  height: 40px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--_muted);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.pcfw-table-mount .pcfw-table__clear:hover {
  background: color-mix(in srgb, var(--_text) 6%, transparent);
  color: var(--_text);
}

.pcfw-table-mount .pcfw-table__clear:focus-visible {
  outline: 2px solid var(--_cart-bg);
  outline-offset: 2px;
}

.pcfw-table-mount .pcfw-table__clear:disabled {
  opacity: 0.5;
  cursor: progress;
}

/* "Send this comparison". */
.pcfw-share-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 28px;
  padding: 24px 28px;
  border-radius: calc(var(--_radius) * 2);
  background: var(--_ink);
  color: var(--_surface);
}

.pcfw-table-mount .pcfw-share-card__title {
  margin: 0;
  color: inherit;
  font-size: 1.4em;
  font-weight: 600;
  line-height: 1.25;
}

.pcfw-share-card__sub {
  margin: 4px 0 0;
  color: color-mix(in srgb, var(--_surface) 75%, transparent);
}

.pcfw-share-card__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pcfw-table-mount .pcfw-share-card__url {
  box-sizing: border-box;
  width: 340px;
  max-width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--_surface) 25%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--_surface) 8%, transparent);
  color: inherit;
  font: inherit;
}

.pcfw-table-mount .pcfw-share-card__copy {
  height: 46px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--_surface);
  color: var(--_ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.pcfw-table-mount .pcfw-share-card__copy:focus-visible,
.pcfw-table-mount .pcfw-share-card__url:focus-visible {
  outline: 2px solid var(--_surface);
  outline-offset: 2px;
}

.pcfw-share-card__status:empty {
  display: none;
}

@media print {
  .pcfw-table__actions,
  .pcfw-table__slot,
  .pcfw-table__pad,
  .pcfw-table__clear,
  .pcfw-share-card {
    display: none;
  }
}

/* Sale prices: some block themes underline <ins>; WooCommerce shows it plain. */
.pcfw-table-mount ins {
  text-decoration: none;
}
