/* -------------------------------- 

Main Components 

-------------------------------- */

table {
  border-collapse: collapse;
  border-spacing: 0;
}

.cd-products-comparison-table {
  margin-bottom: 6em;
}

.cd-products-comparison-table::after {
  /* never visible - this is used in jQuery to check the current MQ */
  display: none;
  content: "mobile";
}

.cd-products-comparison-table header::after {
  clear: both;
  content: "";
  display: table;
}

.cd-products-comparison-table h2 {
  float: left;
  font-weight: bold;
}

.cd-products-comparison-table .reset,
.cd-products-comparison-table .filter {
  font-size: 14px;
}

.cd-products-comparison-table .reset {
  color: #404042;
  text-decoration: underline;
}

.cd-products-comparison-table .filter {
  border-radius: 50px;
  padding: 0.6em 1.5em;
  color: #ffffff;
  background-color: #cccccc;
  margin-left: 1em;
  cursor: not-allowed;
  transition: background-color 0.3s;
}

.cd-products-comparison-table .filter.active {
  cursor: pointer;
  background-color: var(--base);
  color: white;
}

.no-touch .cd-products-comparison-table .filter.active:hover {
  background-color: #a7cea1;
}

@media only screen and (min-width: 1170px) {
  .cd-products-comparison-table {
    margin-bottom: 8em;
  }

  .cd-products-comparison-table::after {
    /* never visible - this is used in jQuery to check the current MQ */
    content: "desktop";
  }

  .cd-products-comparison-table h2 {
    font-size: 24px;
  }

  .cd-products-comparison-table .reset,
  .cd-products-comparison-table .filter {
    font-size: 16px;
  }

  .cd-products-comparison-table .filter {
    padding: 0.6em 2em;
    margin-left: 1.6em;
  }
}

.cd-products-table {
  position: relative;
  overflow: hidden;
}

.cd-products-table .features {
  /* fixed left column - product properties list */
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 120px;
  border-style: solid;
  border-color: #e4e4e4;
  border-top-width: 1px;
  border-bottom-width: 1px;
  background-color: #fafafa;
  opacity: 0.95;
}

.cd-products-table .features::after {
  /* color gradient on the right of .features -  visible while scrolling inside the .cd-products-table */
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: 4px;
  height: 100%;
  background-color: transparent;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.06), transparent);
  opacity: 0;
}

@media only screen and (min-width: 1170px) {
  .cd-products-table .features {
    width: 210px;
  }
}

.cd-products-table.scrolling .features::after {
  opacity: 1;
}

.cd-products-wrapper {
  overflow-x: auto;
  /* this fixes the buggy scrolling on webkit browsers - mobile devices only - when overflow property is applied */
  -webkit-overflow-scrolling: touch;
  border-style: solid;
  border-color: #e4e4e4;
  border-top-width: 1px;
  border-bottom-width: 1px;
}

.cd-products-columns {
  /* products list wrapper */
  width: 1200px;
  margin-left: 120px;
}

.cd-products-columns::after {
  clear: both;
  content: "";
  display: table;
}

@media only screen and (min-width: 1170px) {
  .cd-products-columns {
    width: 2480px;
    margin-left: 210px;
  }
}

.cd-products-columns .product {
  position: relative;
  float: left;
  width: 150px;
  text-align: center;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.filtering .cd-products-columns .product:not(.selected) {
  opacity: 0;
  visibility: hidden;
  transform: scale(0);
}

.no-product-transition .cd-products-columns .product.selected {
  transition: opacity 0.3s, visibility 0.3s;
}

.filtered .cd-products-columns .product:not(.selected) {
  position: absolute;
}

@media only screen and (min-width: 1170px) {
  .cd-products-columns .product {
    width: 310px;
  }
}

.cd-features-list li {
  font-size: 12px;
  font-weight: bold;
  padding: 15px 5px;
  border-color: #e4e4e4;
  border-style: solid;
  border-top-width: 1px;
  border-right-width: 1px;
}

.cd-features-list li.rate {
  /* rating stars */
  padding: 21px 0;
}

.cd-features-list li.rate span {
  display: inline-block;
  height: 22px;
  width: 110px;
  color: transparent;
}

@media only screen and (min-width: 1170px) {
  .cd-features-list li.rate {
    padding: 22px 0;
  }
}

.features .cd-features-list li,
.cd-products-table .features .top-info {
  /* fixed left column - items */
  font-size: 12px;
  font-weight: bold;
  /* set line-height value equal to font-size of text inside product cells */
  line-height: 18px;
  padding: 15px 5px;
  text-align: left;
}

@media only screen and (min-width: 1170px) {
  .features .cd-features-list li,
  .cd-products-table .features .top-info {
    text-transform: uppercase;
    padding: 15px 20px;
    letter-spacing: 1px;
  }
}

.features .cd-features-list li {
  /* truncate text with dots */
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.cd-products-table .top-info {
  position: relative;
  height: 195px;
  width: 150px;
  text-align: center;
  padding: 1.25em 10px;
  border-color: #e4e4e4;
  border-style: solid;
  border-right-width: 1px;
  transition: height 0.3s;
  cursor: pointer;
  background: #ffffff;
}

.cd-products-table .top-info::after {
  /* color gradient below .top-info -  visible when .top-info is fixed */
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  height: 4px;
  width: 100%;
  background-color: transparent;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.06), transparent);
  opacity: 0;
}

.cd-products-table .top-info h3 {
  padding: 5px 0 0px;
  font-weight: bold;
  font-size: 12px;
}

.cd-products-table .top-info img {
  display: block;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.cd-products-table .top-info h3,
.cd-products-table .top-info picture {
  transition: transform 0.3s;
}

.cd-products-table .top-info .check {
  position: relative;
  display: inline-block;
  height: 16px;
  width: 16px;
  margin: 0 auto 1em;
}

.cd-products-table .top-info .check::after,
.cd-products-table .top-info .check::before {
  /* used to create the check icon and green circle dot - visible when product is selected */
  position: absolute;
  top: 0;
  left: 0;
  content: "";
  height: 100%;
  width: 100%;
}

.cd-products-table .top-info .check::before {
  /* green circle dot */
  border-radius: 50%;
  border: 1px solid #e4e4e4;
  background: #ffffff;
  transition: background-color 0.3s, transform 0.3s, border-color 0.3s;
}

.cd-products-table .top-info .check::after {
  /* check icon */
  background: var(--yellow);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
}

@media only screen and (min-width: 1170px) {
  .cd-products-table .top-info {
    height: 330px;
    width: 310px;
  }

  .cd-products-table .top-info h3 {
    padding-top: 1.4em;
    font-size: 16px;
  }
}

.cd-products-table .features .top-info {
  /* models */
  width: 120px;
  cursor: auto;
  background: #fafafa;
}

@media only screen and (min-width: 1170px) {
  .cd-products-table .features .top-info {
    width: 210px;
  }
}

.cd-products-table .selected .top-info .check::before {
  /* green circle dot */
  background: var(--base);
  border-color: var(--base);
  transform: scale(1.5);
  -webkit-animation: cd-bounce 0.3s;
  animation: cd-bounce 0.3s;
}

@-webkit-keyframes cd-bounce {
  0% {
    -webkit-transform: scale(1);
  }

  60% {
    -webkit-transform: scale(1.6);
  }

  100% {
    -webkit-transform: scale(1.5);
  }
}

@keyframes cd-bounce {
  0% {
    transform: scale(1);
  }

  60% {
    transform: scale(1.6);
  }

  100% {
    transform: scale(1.5);
  }
}

.cd-products-table .selected .top-info .check::after {
  /* check icon */
  opacity: 1;
}

@media only screen and (min-width: 1170px) {
  .cd-products-table.top-fixed .cd-products-columns > li,
  .cd-products-table.top-scrolling .cd-products-columns > li,
  .cd-products-table.top-fixed .features,
  .cd-products-table.top-scrolling .features {
    padding-top: 160px;
  }

  .cd-products-table.top-fixed .top-info,
  .cd-products-table.top-scrolling .top-info {
    height: 160px;
    position: fixed;
    top: 0;
  }

  .no-cssgradients .cd-products-table.top-fixed .top-info,
  .no-cssgradients .cd-products-table.top-scrolling .top-info {
    border-bottom: 1px solid #e4e4e4;
  }

  .cd-products-table.top-fixed .top-info::after,
  .cd-products-table.top-scrolling .top-info::after {
    opacity: 1;
  }

  .cd-products-table.top-fixed .top-info h3,
  .cd-products-table.top-scrolling .top-info h3 {
    transform: translateY(-116px);
    display: none;
  }

  .cd-products-table.top-fixed .top-info picture,
  .cd-products-table.top-scrolling .top-info picture {
    transform: translateY(-62px) scale(0.4);
  }

  .cd-products-table.top-scrolling .top-info {
    position: absolute;
  }
}

.cd-table-navigation a {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 15px;
  transform: translateY(55px);
  /* replace text with image */
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
  color: transparent;
  height: 60px;
  width: 40px;
  background: rgba(64, 64, 66, 0.2) url("data:image/svg+xml,%3Csvg width='9' height='15' viewBox='0 0 9 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 0.9375L8.0625 7.5L1.5 14.0625' stroke='%23374F5A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center center;
  border-radius: 3px;
  transition: background-color 0.3s, opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.cd-table-navigation a.inactive {
  opacity: 0;
  visibility: hidden;
}

.cd-table-navigation a.prev {
  left: 120px;
  right: auto;
  transform: translateY(55px) translateX(15px) rotate(180deg);
}

.no-touch .cd-table-navigation a:hover {
  background-color: #404042;
}

@media only screen and (min-width: 1170px) {
  .cd-table-navigation a {
    transform: translateY(100px);
  }

  .cd-table-navigation a.prev {
    left: 210px;
    transform: translateY(100px) translateX(15px) rotate(180deg);
  }

  .top-fixed .cd-table-navigation a {
    position: fixed;
  }

  .top-fixed .cd-table-navigation a,
  .top-scrolling .cd-table-navigation a {
    transform: translateY(45px);
  }

  .top-fixed .cd-table-navigation a.prev,
  .top-scrolling .cd-table-navigation a.prev {
    transform: translateY(45px) translateX(15px) rotate(180deg);
  }
}

/* -------------------------------- 

  No JS

  -------------------------------- */

.no-js .actions {
  display: none;
}

.no-js .cd-products-table .top-info {
  height: 195px;
}

@media only screen and (min-width: 1170px) {
  .no-js .cd-products-table .top-info {
    height: 330px;
  }
}

.no-js .cd-products-columns .check {
  display: none;
}


