/**
 * 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);
}

/**
 * Additional product infos
 */

.product-comments-additional-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--spaces-md);
    row-gap: var(--spaces-sm);
}

/**
 *  Post comment modal
 */
.product-comment-modal .post-comment-buttons {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
}

.product-comment-modal .post-comment-buttons .btn-comment {
    margin-left: 15px;
}

#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;
}

@media(max-width:768px) {
    #post-product-comment-form>div:first-of-type {
        flex-direction: column;
        gap: var(--spaces-sm);
        align-items: start !important;
    }
}

/**
 *  Star component
 */

.star-content {
    margin: 0;
    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('/themes/dfd-hosdecora/assets/img/icons/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('/themes/dfd-hosdecora/assets/img/icons/small_stars.png') no-repeat 0 0 transparent;
    width: 16px;
    height: 16px;
    margin-right: 2px;
    margin-left: 0;
}

.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-empty {
    display: none;
} */

.grade-stars {
    position: relative;
    height: 20px;
    min-width: 120px;
    display: inline-block;
}

.grade-stars.small-stars {
    min-width: 90px;
}

.grade-stars .star-content {
    position: absolute;
    top: 0;
    left: 0;
}

.grade-stars[data-grade="0"] .star-content.star-full {
    visibility: hidden !important;
}

.grade-stars[data-grade="0"] .star-content.star-empty * {
    visibility: visible !important;
}

.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;
    flex-direction: column;
}

#ratingNotChosen {
    font-size: smaller;
    color: var(--color-red);
    margin-top: var(--spaces-sm);
}

#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 .btn-comment {
    margin: 0 auto;
    display: block;
}

.product-comment-list-item {
    padding: var(--spaces-md) 0;
    margin: 0;
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    text-align: left;
}

.product-comment-list-item:not(:last-of-type) {
    margin-bottom: var(--spaces-md);
}

#empty-product-comment {
    text-align: center;
}

.product-comment-list-item .grade-stars .star-content {
    margin: 0 0 var(--spaces-sm);
}

.product-comment-list-item .comment-infos .grade-stars {
    margin-bottom: var(--spaces-md);
}

#product-comments-list-header {
    width: fit-content;
    margin: 0 auto;
    background-color: var(--color-primary);
}

#product-comments-list-header * {
    color: var(--color-white);
}

@media(max-width:768px) {
    .product-comment-list-item .comment-infos .grade-stars {
        margin-bottom: var(--spaces-sm);
    }

    .product-comment-list-item .comment-content {
        margin-top: var(--spaces-sm);
        padding-top: var(--spaces-sm);
        border-top: 1px solid var(--border-color-4);
    }
}

/*
** 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 {
    visibility: hidden;
}

@media (min-width: 960px) {
    #product-comments-list-footer {
        position: relative;
    }

    #product-comments-list-footer .post-product-comment {
        margin: 0 auto;
        display: block;
    }

}

/* #product-comments-list-pagination {
    height: 32px;
}

#product-comments-list-pagination ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

#product-comments-list-pagination ul li span {
    height: 32px;
    width: 24px;
    margin: 0 5px;
    cursor: pointer;
    display: block;
    text-align: center;
    font-size: 20px;
    line-height: 32px;
    color: #6b868f;
}

#product-comments-list-pagination ul li.active span,
#product-comments-list-pagination ul li span.next i,
#product-comments-list-pagination ul li span.prev i {
    font-weight: bold;
}

#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;
}

#product-comments-list-pagination ul li.hidden {
    display: none;
} */