theme-comparison-modal summary[disabled] {
  cursor: not-allowed;
  opacity: 0.3;
}

theme-comparison-modal summary.loading .icon-quickview {
  color: transparent;
}

.comparison-modal {
  display: block;
}

.comparison-modal__modal {
  height: 100vh;
  overflow: visible;
}

.comparison-modal__modal-close {
  position: absolute;
  inset-block-start: 20px;
  inset-inline-end: 20px;
}

.comparison-modal__modal-content {
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: thin;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
}

@media (min-width: 960px) {
  .comparison-modal__modal-header {
    padding-block: 80px 20px;
    padding-inline: 100px;
  }
}

@media (max-width: 959px) {
  .comparison-modal__modal-header {
    padding-block: 24px;
    padding-inline: 20px;
  }
}

@media (max-width: 639px) {
  .comparison-modal__modal-header {
    font-size: 22px;
  }
}

.comparison-modal__modal-table {
  border-collapse: collapse;
  table-layout: fixed;
  min-height: 100%;
}

.comparison-modal__modal-table tr {
  border-block-end: 1px solid rgb(var(--color-border));
}

.comparison-modal__modal-table tr:last-child {
  border-block-end: 0;
}

.comparison-modal__modal-table :is(th, td) {
  padding: 16px 20px;
}

.comparison-modal__modal-heading .comparison-modal__modal-table {
  width: 200px;
  border-inline-end: 6px solid currentColor;
}

.comparison-modal__modal-heading .comparison-modal__modal-table th {
  text-align: start;
}

.comparison-modal__modal-products {
  overflow-y: hidden;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  height: max-content;
}

.comparison-modal__modal-products::-webkit-scrollbar {
  display: none;
}

.comparison-modal__modal-products .comparison-modal__modal-table td {
  text-align: center;
  width: 250px;
  border-inline-end: 1px solid rgb(var(--color-border));
}

.comparison-modal__modal-products .product-compare__image {
  width: 60px;
  display: inline-block;
}

@media (min-width: 960px) {
  .comparison-modal__modal-products .product-compare__image {
    width: 85px;
  }

  .comparison-modal__modal-products .quickadd_button {
    padding-inline: 40px;
  }
}

.comparison-modal__modal-products .product-price {
  display: inline-flex;
  gap: 6px;
}

.comparison-modal__modal-products .product-price__item {
  order: -1;
}

.product-compare__inventory :is(.low-stock, .in-stock) strong {
  color: rgb(var(--color-text));
  font-size: var(--body6-font-size);
}

.product-compare__inventory .low-stock::before,
.product-compare__inventory .in-stock::before,
.product-compare__inventory .out-stock::before {
  --icon-size: 10px;

  content: '';
  display: inline-block;
  vertical-align: middle;
  width: var(--icon-size);
  height: var(--icon-size);
  margin-inline-end: 8px;
  background-color: currentcolor;
  border-radius: 50%;
}

.product-compare__inventory .low-stock::before {
  background-color: #fe9e0f;
}

.product-compare__inventory .in-stock::before {
  background-color: #35c08e;
}

.product-compare__inventory .out-stock {
  color: #f86140;
}

.product-compare__button {
  --border-thickness: var(--variant-picker-border-thickness);
  --border-color: rgba(var(--color-text)/ var(--variant-picker-border-opacity));

  padding: 12px 16px;
  box-shadow: inset 0 0 0 var(--border-thickness) var(--border-color);
  transition: box-shadow 0.3s ease;
}

.product-compare__button--image {
  width: 50px;
  height: auto;
  padding: 2px;
}

.product-compare__button .media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--variant-picker-border-radius);
}

.product-compare__option theme-popover-content {
  background-color: rgb(var(--color-text));
  inset-block-end: calc(100% + 12px);
  color: rgb(var(--color-background));
  padding: 7px 6px;
  font-size: 12px;
  font-weight: normal;
  line-height: 1;
  width: max-content;
  visibility: hidden;
  animation: animation-tooltip-out 0.3s ease;
  transition: visibility 0.3s ease;
}

.product-compare__option theme-popover-content::after {
  position: absolute;
  inset-inline-start: 50%;
  transform: translateX(calc(-50% * var(--transform-logical)));
}

.product-compare__option theme-popover-content::after {
  content: '';
  border-color: rgb(var(--color-text)) transparent;
  border-style: solid;
  border-width: 10px 10px 0;
  inset-block-end: -7px;
  display: block;
  width: 0;
}

.product-compare__option[open] theme-popover-content {
  visibility: visible;
  animation-name: animation-tooltip-in;
  animation-fill-mode: forwards;
}

.product-compare__option[closing] theme-popover-content {
  visibility: hidden;
  animation-name: animation-tooltip-out;
}

.product-compare__option .color-swatch {
  --swatch-radius: 999px;
}

.product-compare__option .color-swatch::after {
  width: 8px;
  height: 8px;
}

.compare_remove_button {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgb(var(--color-text));
  background-color: rgb(var(--color-background));
  border: 1px solid rgb(var(--color-text));
  border-radius: 50%;
  width: 20px;
  height: 20px;
  padding: 0;
  z-index: 1;
  position: absolute;
  inset-block-start: -6px;
  inset-inline-start: -6px;
}

@media (pointer: fine) {
  .compare_remove_button {
    transition: 0.5s cubic-bezier(.19, 1, .22, 1);
    transition-property: color, background-color;
  }

  .compare_remove_button:hover {
    color: rgb(var(--color-background));
    background-color: rgb(var(--color-text));
  }
}

@media (pointer: fine) {
  @keyframes animation-rotate-in {
    0% {
      transform: rotate(0)
    }

    50% {
      transform: rotate(40deg)
    }

    to {
      transform: rotate(0)
    }
  }

  .compare_button:hover .icon-compare {
    animation: animation-rotate-in 0.6s ease-in-out infinite;
  }
}
