/*
 * Lukasik compact product reviews
 * Version: 1.0.0
 * Scope: product review accordion only
 */

/* LK-DISABLE-REVIEW-RATING: keep reviews visible, remove only rating input. */
#ch-modal-review .lk-review-rating-field,
#ch-modal-review .form-group.required:has(.product-rating) {
  display: none !important;
}

html body #content .lk-review-accordion #tab-review {
  color: #181818;
}

html body #content .lk-review-accordion #tab-review .ch-h2 {
  margin: 0 0 14px;
  color: #181818;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.15px;
}

html body #content .lk-review-accordion #tab-review .reviews-product.d-flex {
  display: flex !important;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid #eceef0;
}

html body #content .lk-review-accordion #tab-review .reviews-product__average {
  display: flex;
  flex: 1 1 180px;
  flex-direction: column;
  justify-content: space-between;
  width: auto;
  min-width: 0;
  max-height: none;
}

html body #content .lk-review-accordion #tab-review .reviews-product__header {
  display: flex;
  align-items: center;
  min-height: 36px;
}

html body #content .lk-review-accordion #tab-review .reviews-product__rating {
  display: block;
  min-width: 0;
  margin: 0;
  color: #181818;
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
}

html body #content .lk-review-accordion #tab-review .reviews-product__details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: auto;
  min-width: 68px;
  height: 34px;
  margin: 0 0 0 auto;
  padding: 3px 4px 3px 8px;
  background: #fff;
  border: 1px solid #e4e6e8 !important;
  border-radius: 8px;
  box-sizing: border-box;
}

html body #content .lk-review-accordion #tab-review .reviews-product__details .up-icon-message {
  padding: 0;
  color: #8a9097;
  font-size: 16px;
}

html body #content .lk-review-accordion #tab-review .reviews-product__totals {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  margin-left: 6px;
  padding: 0 5px;
  color: #51565c;
  background: #f4f5f6;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

html body #content .lk-review-accordion #tab-review .reviews-product .btn-block-rs {
  width: 100%;
  margin-top: 12px;
}

html body #content .lk-review-accordion #tab-review .reviews-product .btn-block-rs .chm-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-width: 0;
  height: 42px !important;
  min-height: 42px;
  padding: 0 16px !important;
  color: #fff !important;
  background: #f47b2a !important;
  border: 1px solid #f47b2a !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 40px !important;
  text-decoration: none !important;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

html body #content .lk-review-accordion #tab-review .reviews-product .btn-block-rs .chm-btn:hover,
html body #content .lk-review-accordion #tab-review .reviews-product .btn-block-rs .chm-btn:focus {
  color: #fff !important;
  background: #df6b20 !important;
  border-color: #df6b20 !important;
  outline: 0;
}

html body #content .lk-review-accordion #tab-review .reviews-product .btn-block-rs .chm-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(244, 123, 42, 0.22) !important;
}

html body #content .lk-review-accordion #tab-review .reviews-product__rating-summary {
  display: grid !important;
  flex: 1 1 300px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-self: stretch;
  justify-content: stretch;
  width: 100%;
  min-width: 0;
  margin: 0;
  gap: 6px !important;
}

html body #content .lk-review-accordion #tab-review .product-rating-summary__item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: auto !important;
  min-width: 0;
  height: 88px !important;
  padding: 6px 4px !important;
  background: #fff;
  border: 1px solid #e4e6e8 !important;
  border-radius: 8px !important;
  box-sizing: border-box;
}

html body #content .lk-review-accordion #tab-review .product-rating-summary__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0;
  border-radius: 50%;
}

html body #content .lk-review-accordion #tab-review .product-rating-summary__icon svg {
  width: 13px;
  height: 13px;
}

html body #content .lk-review-accordion #tab-review .product-rating-summary__content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

html body #content .lk-review-accordion #tab-review .product-rating-summary__star {
  color: #3e454d;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.1;
}

html body #content .lk-review-accordion #tab-review .product-rating-summary__percent {
  color: #7a8087;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.1;
}

html body #content .lk-review-accordion #tab-review > #review > p {
  margin: 0;
  padding: 0;
  color: #687078;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 374px) {
  html body #content .lk-review-accordion #tab-review {
    padding-right: 10px;
    padding-left: 10px;
  }

  html body #content .lk-review-accordion #tab-review .ch-h2 {
    font-size: 16px;
  }

  html body #content .lk-review-accordion #tab-review .reviews-product.d-flex {
    gap: 12px;
  }

  html body #content .lk-review-accordion #tab-review .reviews-product__rating-summary {
    gap: 4px !important;
  }

  html body #content .lk-review-accordion #tab-review .product-rating-summary__item {
    height: 84px !important;
    padding-right: 2px !important;
    padding-left: 2px !important;
  }

  html body #content .lk-review-accordion #tab-review .product-rating-summary__icon {
    width: 28px;
    height: 28px;
  }
}

@media (min-width: 768px) {
  html body #content .lk-review-accordion #tab-review .ch-h2 {
    margin-bottom: 16px;
    font-size: 20px;
  }

  html body #content .lk-review-accordion #tab-review .reviews-product.d-flex {
    align-items: center;
    gap: 22px;
  }

  html body #content .lk-review-accordion #tab-review .reviews-product__average {
    flex: 0 1 220px;
    width: 220px;
  }

  html body #content .lk-review-accordion #tab-review .reviews-product__rating {
    font-size: 40px;
  }

  html body #content .lk-review-accordion #tab-review .reviews-product .btn-block-rs .chm-btn {
    width: 180px !important;
  }

  html body #content .lk-review-accordion #tab-review .reviews-product__rating-summary {
    flex: 1 1 330px;
    margin: 0;
    gap: 8px !important;
  }

  html body #content .lk-review-accordion #tab-review .product-rating-summary__item {
    height: 92px !important;
  }
}

.dark-theme #content .lk-review-accordion #tab-review {
  color: var(--up-text-wd-color);
}

.dark-theme #content .lk-review-accordion #tab-review .reviews-product__details,
.dark-theme #content .lk-review-accordion #tab-review .product-rating-summary__item {
  background: var(--up-bg-wd);
  border-color: #555 !important;
}

.dark-theme #content .lk-review-accordion #tab-review .product-rating-summary__star,
.dark-theme #content .lk-review-accordion #tab-review .ch-h2 {
  color: var(--up-text-wd-color);
}

/* Review form modal */
#ch-modal-review .modal-dialog.chm-modal {
  width: calc(100% - 24px) !important;
  max-width: 520px !important;
  margin: 12px auto !important;
}

#ch-modal-review .modal-content {
  max-height: calc(100vh - 24px) !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid #eceef0 !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 40px rgba(24, 31, 40, 0.18) !important;
}

#ch-modal-review .modal-header {
  display: flex !important;
  align-items: center !important;
  min-height: 58px !important;
  height: auto !important;
  padding: 16px 54px 16px 18px !important;
  border-bottom: 1px solid #eceef0 !important;
}

#ch-modal-review .modal-title {
  color: #181818 !important;
  font-size: 18px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
}

#ch-modal-review .close-modal {
  top: 14px !important;
  right: 16px !important;
  width: 30px !important;
  height: 30px !important;
  color: #3f474f !important;
  background: #fff !important;
  border: 1px solid #e2e5e8 !important;
  border-radius: 7px !important;
  box-shadow: none !important;
}

#ch-modal-review .close-modal:hover,
#ch-modal-review .close-modal:focus {
  color: #f47b2a !important;
  background: #fff7f2 !important;
  border-color: #f47b2a !important;
}

#ch-modal-review .close-modal i {
  color: currentColor !important;
}

#ch-modal-review .modal-body {
  padding: 16px 18px 10px !important;
  overflow-y: auto !important;
  border: 0 !important;
}

#ch-modal-review .form-group {
  position: relative !important;
  margin: 0 0 12px !important;
}

#ch-modal-review input.form-control,
#ch-modal-review textarea.form-control {
  width: 100% !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  color: #181818 !important;
  background: #fff !important;
  border: 1px solid #dfe2e5 !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

#ch-modal-review input.form-control {
  height: 44px !important;
  min-height: 44px !important;
}

#ch-modal-review textarea.form-control {
  min-height: 72px !important;
  resize: vertical !important;
}

#ch-modal-review #input-review {
  min-height: 92px !important;
}

#ch-modal-review input.form-control::placeholder,
#ch-modal-review textarea.form-control::placeholder {
  color: #8a9097 !important;
  opacity: 1 !important;
}

#ch-modal-review input.form-control:focus,
#ch-modal-review textarea.form-control:focus {
  background: #fff !important;
  border-color: #f47b2a !important;
  box-shadow: 0 0 0 3px rgba(244, 123, 42, 0.12) !important;
  outline: 0 !important;
}

#ch-modal-review .form-group.required_field:before {
  left: 8px !important;
  top: 9px !important;
  color: #ef4f4f !important;
  font-size: 11px !important;
}

#ch-modal-review .form-group.required_field input.form-control,
#ch-modal-review .form-group.required_field textarea.form-control {
  padding-left: 18px !important;
}

#ch-modal-review .form-group.required > .control-label {
  display: block !important;
  margin: 0 0 8px !important;
  color: #51565c !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

#ch-modal-review .product-rating {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  min-height: 26px !important;
}

#ch-modal-review .product-rating .star-rating {
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  color: #d5d8dc !important;
}

#ch-modal-review .product-rating .star-rating:before {
  font-size: 22px !important;
  line-height: 24px !important;
}

#ch-modal-review .product-rating .star-rating.active:before,
#ch-modal-review .product-rating .star-rating.checked:before {
  color: #f47b2a !important;
}

#ch-modal-review .help-block {
  margin: 12px 0 0 !important;
  color: #747a82 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

#ch-modal-review .modal-footer {
  padding: 12px 18px 18px !important;
  border: 0 !important;
}

#ch-modal-review #button-review {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: none !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  color: #fff !important;
  background: #f47b2a !important;
  border: 1px solid #f47b2a !important;
  border-radius: 7px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 40px !important;
}

#ch-modal-review #button-review:hover,
#ch-modal-review #button-review:focus {
  color: #fff !important;
  background: #df6b20 !important;
  border-color: #df6b20 !important;
}

@media (max-width: 767px) {
  #ch-modal-review .modal-dialog.chm-modal {
    display: flex !important;
    align-items: center !important;
    min-height: calc(100% - 24px) !important;
  }

  #ch-modal-review .modal-body {
    max-height: calc(100vh - 136px) !important;
  }
}
