/**
 * Product Reviews CSS
 *
 * Styles for product reviews and review form
 *
 * @package Solmetex_Custom_Functionality
 */

/* Review section */
.product-reviews {
    margin-bottom: 30px;
}

.review-item {
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    background-color: #fafafa;
    border-radius: 4px;
}

.review-item:last-child {
    margin-bottom: 0;
}

.review-stars {
    color: #f9ca63;
    font-size: 18px;
    margin-bottom: 5px;
}

.empty-star {
    color: #d3ced2;
}

.review-heading {
    margin: 0 0 10px;
    font-size: 18px;
}

.review-text {
    margin-bottom: 10px;
}

.review-author {
    font-style: italic;
    color: #777;
    margin: 5px 0 0;
    font-size: 14px;
}

.review-footer {
    text-align: center;
    margin-top: 20px;
}

.no-reviews {
    padding: 20px;
    text-align: center;
    background-color: #fafafa;
    border-radius: 4px;
    margin-bottom: 20px;
}

.no-reviews + .review_form_wrapper + .reviews-footer, .no-reviews + .reviews-footer {
    display: none;
}

#review_form {
    padding: 0 20px;
    margin: 20px;
}

/* Review form link */
.submit-review-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0098ca;
    color: #fff !important;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.submit-review-link:hover {
    background-color: #007ba3;
    color: #fff !important;
    text-decoration: none;
}

/* Review form */
#review_form_wrapper {
    margin-top: 30px;
    padding: 25px;
    background-color: #f7f7f7;
    border-radius: 4px;
    border: 1px solid #eee;
}

#review_form .comment-reply-title {
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

#review_form .comment-notes {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

#review_form .comment-form-rating {
    margin-bottom: 20px;
}

#review_form .comment-form-rating label {
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

#review_form .stars {
    font-size: 24px;
    line-height: 1;
}

#review_form .stars a {
    color: #d3ced2;
    margin-right: 5px;
    text-decoration: none;
}

#review_form .stars a.active,
#review_form .stars a:hover {
    color: #f9ca63;
}

#review_form .comment-form-comment,
#review_form .comment-form-author,
#review_form .comment-form-email {
    margin-bottom: 15px;
}

#review_form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

#review_form .required {
    color: red;
}

#review_form input[type="text"],
#review_form input[type="email"],
#review_form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#review_form textarea {
    height: 120px;
}

#review_form .submit {
    background-color: #0098ca;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

#review_form .submit:hover {
    background-color: #007ba3;
}

/* Star Rating */
.comment-form-rating .stars {
    display: inline-block;
    margin: 0;
}

.comment-form-rating .stars a {
    position: relative;
    display: inline-block;
    width: 1em;
    font-size: 1.5em;
    text-indent: -999em;
    overflow: hidden;
    margin-right: 5px;
}

.comment-form-rating .stars a:before {
    font-family: star;
    content: "\53";
    color: #d3ced2;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 1em;
    height: 1em;
    line-height: 1;
    text-indent: 0;
}

.comment-form-rating .stars a:hover ~ a:before {
    content: "\53";
}

.comment-form-rating .stars:hover a:before {
    content: "\53";
}

.comment-form-rating .stars.selected a:before {
    content: "\53";
    color: #f9ca63;
}

.comment-form-rating .stars.selected a.active:before {
    content: "\53";
    color: #f9ca63;
}

.comment-form-rating .stars.selected a.active ~ a:before {
    content: "\53";
    color: #d3ced2;
}

.comment-form-rating .stars.selected a:hover ~ a:before {
    content: "\53";
    color: #d3ced2;
}

.comment-form-rating .stars.selected a:hover:before {
    content: "\53";
    color: #f9ca63;
}

/* Review Section Container */
.customer-reviews {

    margin: 0 auto;
    padding: 40px 0;
}

.reviews-title {
    text-align: center;
    margin-bottom: 30px;

}

/* Review cards */
.review-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
    margin: 0 15px 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.review-heading {
    font-size: 18px;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 10px;
    color: #333;
}

.review-text {
    font-size: 15px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 15px;
}

.review-author {
    font-size: 14px;
    color: #888;
    font-style: italic;
    margin-top: auto;
}

/* Review Stars */
.review-stars {
    font-size: 20px;
    color: #ffc107;
    letter-spacing: 2px;
}

.empty-star {
    color: #e0e0e0;
}

/* Custom Slider Layout */
.reviews-slider {
    position: relative;
    overflow: hidden;
    width: 95%;
    margin: 0 auto;
    display: flex;
    flex-wrap: nowrap;
}

.reviews-slider .review-card {
    flex: 0 0 32%;
    position: relative;
    transition: transform 300ms ease;
    transform: translateX(0);
    will-change: transform;
    margin: 0 15px 0 0;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
}

/* Visible class for cards */
.reviews-slider .review-card.visible {
    opacity: 1;
}

.reviews-slider .review-card:not(.visible) {
    opacity: 0.4;
}

/* Slider Controls */
.slider-controls {
    text-align: center;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-prev,
.slider-next {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: 0 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    /* Add touch friendly tap areas for mobile */
    padding: 0;
    touch-action: manipulation;
}

.slider-prev:hover,
.slider-next:hover {
    background: #e9e9e9;
    transform: scale(1.1);
}

.slider-prev:disabled,
.slider-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

/* Reviews Footer */
.reviews-footer {
    text-align: center;
    margin-top: 30px;
}

.share-text {
    font-size: 16px;
    color: #555;
}

.submit-review-link {
    display: inline-block;
    color: #0066cc;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.submit-review-link:hover {
    color: #004499;
    text-decoration: underline;
}

/* Review Form */
.review-form-wrapper {
    background: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.review-form-wrapper [data-review-close] {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.review-form-wrapper [data-review-close]:hover {
    color: #333;
}

.review-form-wrapper [data-review-close]::before {
    content: "×";
}

.review-form-wrapper .comment-form-rating {
    margin-bottom: 20px;
}

.review-form-wrapper .comment-form-rating label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.review-form-wrapper .comment-form-rating select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.review-form-wrapper .comment-form-comment label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.review-form-wrapper .comment-form-comment textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 150px;
}

.review-form-wrapper input[type="submit"] {
    background: #0066cc;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.review-form-wrapper input[type="submit"]:hover {
    background: #004499;
}

/* Empty Reviews */
.no-reviews {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 30px;
}

.no-reviews p {
    margin-bottom: 15px;
    color: #666;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .reviews-slider .review-card {
        flex: 0 0 48%;
        margin-right: 2%;
    }
    
    .review-card {
        padding: 15px;
    }
    
    .review-heading {
        font-size: 17px;
    }
    
    .review-text {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    /* Disable slider completely on mobile */
    .reviews-slider {
        width: 100%;
        display: block;
        position: static;
        overflow: visible;
        flex-direction: column;
    }
    
    /* Show all review cards stacked */
    .reviews-slider .review-card {
        flex: none;
        width: 100%;
        margin: 0 0 20px 0;
        display: block !important; /* Force display regardless of visible class */
        transform: none !important; /* Override any transform from JS */
        position: static;
        opacity: 1 !important; /* Force full opacity for all cards */
    }
    
    /* Hide slider controls on mobile */
    .slider-controls {
        display: none;
    }
    
    .review-form-wrapper {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .reviews-slider {
        width: 85%;
    }
    
    .review-card {
        margin-bottom: 0;
    }
    
    .slider-prev,
    .slider-next {
        width: 50px;
        height: 50px;
    }
} 