/*
 * Variation table
 * Rendered inside the standard WooCommerce single product page.
 */

.willrich-vt {
  margin: 30px 0 40px;
}

.willrich-vt__title {
  margin-bottom: 15px;
}

/* Filters */

.willrich-vt__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 0 -10px 20px;
  padding: 15px 0;
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
}

.willrich-vt__filter {
  flex: 0 1 auto;
  min-width: 160px;
  margin: 0 10px 10px;
}

.willrich-vt__filter-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.willrich-vt__filter-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.willrich-vt__filter-list li {
  margin: 0 0 2px;
  list-style: none;
}

.willrich-vt__filter-list label {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 0.9em;
  font-weight: 400;
  cursor: pointer;
}

.willrich-vt__filter-list input[type="checkbox"] {
  margin: 0 6px 0 0;
}

.willrich-vt__filter-select,
.willrich-vt__search {
  width: 100%;
  max-width: 260px;
  margin: 0;
}

.willrich-vt__filter--actions {
  align-self: flex-end;
}

.willrich-vt__reset {
  margin: 0;
}

/* Toolbar */

.willrich-vt__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.willrich-vt__summary {
  margin: 0;
  font-size: 0.9em;
}

.willrich-vt__per-page {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 0.9em;
}

.willrich-vt__per-page span {
  margin-right: 8px;
}

.willrich-vt__per-page select {
  width: auto;
  margin: 0;
}

/* Table */

.willrich-vt__table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.willrich-vt__table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.willrich-vt__table th,
.willrich-vt__table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e6e6e6;
  text-align: left;
  vertical-align: middle;
}

.willrich-vt__table thead th {
  border-bottom: 2px solid #cfcfcf;
  font-size: 0.85em;
  text-transform: uppercase;
  white-space: nowrap;
}

.willrich-vt__sort {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.willrich-vt__sort::after {
  content: "\2195";
  margin-left: 5px;
  opacity: 0.35;
}

.willrich-vt__sort.is-asc::after {
  content: "\2191";
  opacity: 1;
}

.willrich-vt__sort.is-desc::after {
  content: "\2193";
  opacity: 1;
}

.willrich-vt__row {
  cursor: pointer;
}

.willrich-vt__row:hover {
  background: #f7f7f7;
}

.willrich-vt__cell--price {
  white-space: nowrap;
}

.willrich-vt__cell--price del {
  opacity: 0.5;
}

.willrich-vt__cell--stock .out-of-stock {
  color: #b00;
}

.willrich-vt__cell--qty .quantity,
.willrich-vt__cell--qty .quantity input.qty {
  margin: 0;
}

.willrich-vt__cell--qty input.qty {
  width: 60px;
  min-width: 60px;
  text-align: center;
}

.willrich-vt__cell--cart {
  white-space: nowrap;
}

.willrich-vt__add.button {
  margin: 0;
}

.willrich-vt__add.loading {
  opacity: 0.6;
  pointer-events: none;
}

.willrich-vt__empty td {
  padding: 25px 10px;
  text-align: center;
}

/* Loading state */

.willrich-vt__loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  background: rgba(255, 255, 255, 0.7);
}

.willrich-vt.is-loading .willrich-vt__loading {
  display: block;
}

.willrich-vt__loading span {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border: 2px solid #cfcfcf;
  border-top-color: #666;
  border-radius: 50%;
  animation: willrich-vt-spin 0.7s linear infinite;
}

@keyframes willrich-vt-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Pagination */

.willrich-vt__pagination {
  margin-top: 15px;
}

.willrich-vt__pages {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.willrich-vt__pages li {
  margin: 0 4px 4px 0;
  list-style: none;
}

.willrich-vt__pages a,
.willrich-vt__pages span {
  display: block;
  padding: 5px 11px;
  border: 1px solid #e0e0e0;
  font-size: 0.9em;
  line-height: 1.4;
}

.willrich-vt__pages a:hover {
  border-color: #999;
}

.willrich-vt__pages .current {
  border-color: #666;
  background: #666;
  color: #fff;
}

/* Selected variation block in the product summary */

.willrich-vt-selected {
  margin: 0 0 20px;
  padding: 12px 15px;
  border: 1px solid #e6e6e6;
  background: #fafafa;
}

.willrich-vt-selected__heading {
  margin: 0 0 6px;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.willrich-vt-selected__clear {
  margin-left: 8px;
  font-weight: 400;
  text-transform: none;
}

.willrich-vt-selected__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.willrich-vt-selected__list li {
  margin: 0;
  list-style: none;
  line-height: 1.6;
}

.willrich-vt-selected__label {
  font-weight: 700;
}

.willrich-vt-selected__value.out-of-stock {
  color: #b00;
}

/* Small screens: stack the table into cards */

@media screen and (max-width: 767px) {
  .willrich-vt__table thead {
    display: none;
  }

  .willrich-vt__table,
  .willrich-vt__table tbody,
  .willrich-vt__table tr,
  .willrich-vt__table td {
    display: block;
    width: 100%;
  }

  .willrich-vt__row {
    margin-bottom: 12px;
    border: 1px solid #e6e6e6;
  }

  .willrich-vt__table td {
    border-bottom: 1px solid #f0f0f0;
    text-align: right;
  }

  .willrich-vt__table td:last-child {
    border-bottom: 0;
  }

  .willrich-vt__table td[data-label]::before {
    content: attr(data-label);
    float: left;
    padding-right: 10px;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
  }

  .willrich-vt__cell--cart .button {
    width: 100%;
  }
}
