/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 */

/**
 *  Product comments CSS
 */

.product-comment-modal .material-icons[data-icon]:before,
.product-comment-list-item .material-icons[data-icon]:before,
.product-comments-additional-info .material-icons[data-icon]:before,
#product-comments-list-header .material-icons[data-icon]:before,
#product-comments-list-footer .material-icons[data-icon]:before {
  content: attr(data-icon);
}

.btn-comment,
.btn-comment-inverse {
  border: none;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.5s;
}
.btn-comment .material-icons,
.btn-comment-inverse .material-icons{
  font-size: 20px;
  margin-right: 7px;
}
.btn-comment {
  background-color: #444;
  color: #ffffff;
}
.btn-comment:hover {
  background-color: #666;
}

.btn-comment-inverse {
  background-color: #ffffff;
  border: 1px solid #888;
}
.btn-comment-inverse:hover {
  background-color: #888;
  color: #ffffff;
}

.btn-comment-big {}
.btn-comment-huge {}

.link-comment {
  color: #232323;
}

.link-comment:hover,
.link-comment:active {
  text-decoration: underline;
  color: #232323;
}

/**
 * Additional product infos
 */

.product-comments-additional-info {
  margin: 20px 0 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.product-comments-additional-info .link-comment.post-product-comment {
  border-left: 1px solid #979797;
  padding-left: 12px;
  margin-left: 12px;
}

.product-comments-additional-info .comments-note {
  margin-right: 30px;
  margin-bottom: 15px;
}

/**
 *  Post comment modal
 */
.product-comment-modal .modal-header {
  border: none;
  padding: 30px 30px 15px;
}

.product-comment-modal .modal-body {
  padding: 0 30px 30px;
}

.product-comment-modal .modal-body a {
  text-decoration: underline;
}

.product-comment-modal .modal-header .h2 {
  float: left;
  font-size: 18px;
}

.product-comment-modal .modal-dialog {
  width: calc(100% - 30px);
  max-width: 774px;
}

.product-comment-modal .modal-dialog .h3 {
  font-size: 14px;
}

.product-comment-modal .modal-dialog .product-flag {
  display: none;
}

.product-comment-modal .modal-dialog .product-cover,
.product-comment-modal .modal-dialog .product-cover img {
  width: 99px;
  height: 99px;
}

.product-comment-modal label.form-label {
  margin: 15px 0 5px;
}

.product-comment-modal input {
  width: 100%;
}

.product-comment-modal textarea {
  width: 100%;
  margin-bottom: 10px;
}

.product-comment-modal .btn-comment,
.product-comment-modal .btn-comment-inverse {}

.product-comment-modal sup {
  color: #ff0000;
  margin-left: 2px;
}

.product-comment-modal .post-comment-buttons {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}

.product-comment-modal .post-comment-buttons .btn-comment {
  margin-left: 15px;
}

.product-comment-modal .modal-header .material-icons {
  color: #40a85f;
  font-size: 30px;
  line-height: 25px;
}

.product-comment-modal .modal-header .material-icons.error {
  color: #a94442;
}

.product-comment-modal .modal-header .material-icons.feedback {
  color: #f39d72;
}

#product-comment-posted-modal .post-comment-buttons,
#product-comment-post-error .post-comment-buttons,
#update-comment-usefulness-post-error .post-comment-buttons {
  margin-top: 30px;
}

/**
 *  Star component
 */

.star-content {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

.star-content div.star,
.star-content div.star-on,
.star-content div.star-hover {
  display: block;
  width: 20px;
  height: 20px;
  background: url(../img/stars.png) no-repeat 0 0 transparent;
  flex: auto;
  margin-left: 3px;
}
.star-content div.star-on,
.star-content div.star-hover {
  background-position: -24px 0;
}

.small-stars .star-content div.star,
.small-stars .star-content div.star-on,
.small-stars .star-content div.star-hover {
  background: url(../img/small_stars.png) no-repeat 0 0 transparent;
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

.small-stars .star-content div.star-on,
.small-stars .star-content div.star-hover {
  background-position: -19px 0;
}

.star-content div.star-hover {
  cursor: pointer;
}

.grade-stars {
  position: relative;
  height: 20px;
  min-width: 120px;
  display: inline-block;
}

.grade-stars.small-stars {
  min-width: 100px;
}

.grade-stars .star-content {
  position: absolute;
  top: 3px;
  left: 0;
}

.criterion-rating .grade-stars .star-content {
  top: 0;
}

#post-product-comment-modal .star-content div.star a {
  display: block;
  position: absolute;
  text-indent: -5000px;
}
#post-product-comment-modal .criterion-rating {
  display: flex;
  align-items: center;
}

#post-product-comment-modal .criterion-rating label {
  margin: 0 10px 0 0;
}

#post-product-comment-form input.error,
#post-product-comment-form textarea.error {
  background-color: #f2dede;
  border: solid 1px #ebcccc;
}

#post-product-comment-form input.valid,
#post-product-comment-form textarea.valid {
  border: solid 1px #d0e9c6;
}

/**
 *  Product comments list
 */

#product-comments-list-header {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  margin: 30px 0 15px;
}

#product-comments-list-header .comments-nb {
  font-size: 16px;
  font-weight: 500;
}

#product-comments-list-header .comments-nb .material-icons {
  margin-right: 3px;
}

#product-comments-list-header .comments-note {
  font-size: 14px;
}

#product-comments-list .btn-comment {
  margin: 0 auto;
  display: block;
}

.product-comment-list-item {
  border: 1px solid #e5e5e5;
  padding: 30px 0;
  margin: 0;
}

#empty-product-comment {
  text-align: center;
}

.product-comment-list-item .grade-stars .star-content {
  margin: 0 0 10px;
}

.product-comment-list-item .comment-infos {
  color: #888;
  font-size: 12px;
}

.product-comment-list-item .comment-infos .grade-stars {
  margin-bottom: 15px;
}

.product-comment-list-item .comment-content .h4 {
  font-size: 14px;
  color: inherit;
}

.product-comment-list-item .comment-content p {
  color: #888;
}

.product-comment-list-item .comment-content .comment-buttons a {
  color: #bbb;
  font-size: 14px;
  margin-right: 8px;
}

.product-comment-list-item .comment-content .comment-buttons a .material-icons {
  font-size: 18px;
  cursor: pointer;
}

/*
** Quickview style
*/

.product-quickview-review {
  display: flex;
  flex-direction: row;
}

.product-quickview-review .grade-stars .star-content {
  margin: 0 0 0 0;
  top: 0;
}

/*
** Product list override
*/

.product-list-reviews {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  margin-top: 12px;
  width: 100%;
  visibility: hidden;
}
.product-miniature .product-list-reviews {
  justify-content: center;
}

.product-list-reviews .grade-stars .star-content {
  top: 2px;
}

.product-list-reviews .comments-nb {
  color: #888;
}

#product-comments-list-footer {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  justify-content: space-between;
}

#product-comments-list-footer .btn-comment {
  margin-top: 15px;
}

@media (max-width: 576px) {
  #product-comments-list-footer {
    flex-direction: column;
    align-items: center;
  }
  .product-comment-list-item .comment-infos {
    margin-bottom: 15px;
  }
}

#product-comments-list-pagination {
  margin: 15px 0 0;
}

#product-comments-list-pagination ul {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

#product-comments-list-pagination ul li span {
  display: block;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  height: 30px;
  line-height: 30px;
  width: 30px;
}

#product-comments-list-pagination ul li.active span {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#product-comments-list-pagination ul li.disabled span {
  opacity: 0.3;
  cursor: not-allowed;
}

#product-comments-list-pagination ul li.active span {
  cursor: not-allowed;
}
