/* ----------------------------------------
   Frontend Swatches
   ---------------------------------------- */
:root {
  --trx-wcext-swatch-color-size: 32px;
  --trx-wcext-swatch-image-size: 40px;
  --trx-wcext-swatch-tooltip-color: #333;
  --trx-wcext-swatch-hover-color: #999;
  --trx-wcext-swatch-selected-color: #007dc5;
}

.trx-wcext-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.variations td.value {
  position: relative;
}
.variations td.value select.trx-wcext-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.trx-wcext-swatch-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  box-sizing: border-box;
}
.trx-wcext-swatch-item.disabled {
  --trx-wcext-swatch-disabled-width: 1px;
  --trx-wcext-swatch-disabled-color: #999;
  --trx-wcext-swatch-disabled-opacity: 0.3;
  opacity: var(--trx-wcext-swatch-disabled-opacity);
  cursor: not-allowed;
  pointer-events: none;
  overflow: hidden;
}
.trx-wcext-swatch-item.disabled:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom right, transparent calc(50% - var(--trx-wcext-swatch-disabled-width) / 2), var(--trx-wcext-swatch-disabled-color) calc(50% - var(--trx-wcext-swatch-disabled-width) / 2), var(--trx-wcext-swatch-disabled-color) calc(50% + var(--trx-wcext-swatch-disabled-width) / 2), transparent calc(50% + var(--trx-wcext-swatch-disabled-width) / 2));
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-color {
  width: var(--trx-wcext-swatch-color-size);
  height: var(--trx-wcext-swatch-color-size);
  border-radius: 50%;
  border: 1px solid transparent;
  padding: 3px;
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-color:hover {
  border-color: var(--trx-wcext-swatch-hover-color);
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-color.selected {
  border-color: var(--trx-wcext-swatch-selected-color);
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-color .trx-wcext-swatch-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex: 0 0 auto;
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-color[title]:hover:before {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: var(--trx-wcext-swatch-tooltip-color);
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  border-radius: 3px;
  pointer-events: none;
  z-index: 10;
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-color[title]:hover:after {
  content: '';
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--trx-wcext-swatch-tooltip-color);
  pointer-events: none;
  z-index: 10;
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-image {
  width: var(--trx-wcext-swatch-image-size);
  height: var(--trx-wcext-swatch-image-size);
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 1px;
  overflow: hidden;
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-image:hover {
  border-color: var(--trx-wcext-swatch-hover-color);
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-image.selected {
  border-color: var(--trx-wcext-swatch-selected-color);
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-image[title]:hover:before {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: var(--trx-wcext-swatch-tooltip-color);
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  border-radius: 3px;
  pointer-events: none;
  z-index: 10;
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-image[title]:hover:after {
  content: '';
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--trx-wcext-swatch-tooltip-color);
  pointer-events: none;
  z-index: 10;
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-button {
  padding: 6px 14px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.4;
  background: #fff;
  color: #333;
  min-width: 36px;
  text-align: center;
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-button:hover {
  border-color: var(--trx-wcext-swatch-hover-color);
  background: #f7f7f7;
}
.trx-wcext-swatch-item.trx-wcext-swatch-item-button.selected {
  border-color: var(--trx-wcext-swatch-selected-color);
  background: var(--trx-wcext-swatch-selected-color);
  color: #fff;
}

/* ----------------------------------------
   Loop / Product Grid Swatches
   ---------------------------------------- */
.trx-wcext-loop-swatches {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
}

.trx-wcext-loop-swatches .trx-wcext-swatches {
  gap: 4px;
  justify-content: flex-start;
}

/* Smaller swatches in the loop */
.trx-wcext-swatches-loop.trx-wcext-swatches-type-color {
  --trx-wcext-swatch-color-size: 24px;
}

.trx-wcext-swatches-loop.trx-wcext-swatches-type-image {
  --trx-wcext-swatch-image-size: 28px;
}

.trx-wcext-swatches-loop .trx-wcext-swatch-item-button {
  padding: 3px 8px;
  font-size: 11px;
}

/* Single attribute row in block mode (optionally prefixed with the attribute name) */
.trx-wcext-loop-swatches-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.trx-wcext-loop-swatches-attr-name {
  font-weight: 600;
  white-space: nowrap;
}

/* Inline (plain-text) style for swatches */
.trx-wcext-loop-swatches-inline {
  display: block;
  font-size: 0.85em;
}

.trx-wcext-loop-swatches-attr-sep {
  white-space: pre;
}

/* "+N" overflow indicator (shared between inline and block modes) */
.trx-wcext-swatch-overflow {
  font-size: 0.9em;
  opacity: 0.7;
}

.trx-wcext-loop-swatches-inline .trx-wcext-swatch-overflow {
  font-size: inherit;
}

/*# sourceMappingURL=swatches.css.map */
