/**
 * J2Commerce Reviews Module Styles
 * @package     J2Commerce
 * @subpackage  mod_j2commerce_reviews
 * @copyright   (C)2024-2026 J2Commerce, LLC
 * @license     GNU General Public License version 2 or later
 */

.j2c-reviews {
    --j2c-card-bg: #ffffff;
    --j2c-card-border: #e9ecef;
    --j2c-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --j2c-card-radius: 12px;
    --j2c-transition: 0.3s ease;
}

.j2c-reviews .fs-xs {
    font-size: 0.75rem !important;
}

.j2c-reviews .fs-sm {
    font-size: 0.875rem !important;
}

.j2c-reviews .opacity-60 {
    opacity: 0.6 !important;
}

/* Star Icons */
.j2c-reviews .j2c-stars {
    line-height: 1;
}

.j2c-reviews-summary .stars-display {
    font-size: 1.5rem;
}

/* Review Card */
.j2c-reviews .j2c-review-card {
    --productreview-box-shadow: 0 0.5rem 1rem rgba(2, 6, 23, 0.15);
    padding: 1.5rem;
    box-shadow: var(--productreview-box-shadow);
    transition: box-shadow var(--j2c-transition), transform var(--j2c-transition);
    background: var(--j2c-card-bg);
    border-radius: var(--j2c-card-radius);
}

.j2c-reviews .j2c-review-card:hover {
    box-shadow: var(--j2c-card-shadow);
    transform: translateY(-2px);
}

.j2c-reviews .j2c-review-topicon {
    color: #6c727f;
}

.j2c-reviews .j2c-review-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.j2c-reviews .j2c-review-content {
    min-height: 54px;
    line-height: 1.4;
}

.j2c-reviews .j2c-read-more {
    cursor: pointer;
    font-weight: 500;
}

.j2c-reviews .j2c-read-more:hover {
    text-decoration: underline;
}

/* Review Images */
.j2c-reviews .j2c-review-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid var(--j2c-card-border);
    transition: transform var(--j2c-transition), box-shadow var(--j2c-transition);
}

.j2c-reviews .j2c-review-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Admin Reply */
.j2c-reviews .j2c-admin-reply {
    font-size: 0.8rem;
    border-left: 3px solid var(--bs-primary, #0d6efd);
    padding-left: 0.75rem;
}

.j2c-reviews .j2c-reviewer h6 {
    font-size: 0.9rem;
}

/* Scroller Layout - Swiper Customization */
.j2c-reviews-scroller .swiper {
    padding: 1rem 0;
}

.j2c-reviews-scroller .swiper-slide {
    height: auto;
}

.j2c-reviews-scroller .swiper-button-prev,
.j2c-reviews-scroller .swiper-button-next {
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all var(--j2c-transition);
}

.j2c-reviews-scroller .swiper-button-prev:hover,
.j2c-reviews-scroller .swiper-button-next:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.j2c-reviews-scroller .swiper-button-prev::after,
.j2c-reviews-scroller .swiper-button-next::after {
    font-size: 1rem;
    font-weight: bold;
}

.j2c-reviews-scroller .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    opacity: 0.3;
    transition: all var(--j2c-transition);
}

.j2c-reviews-scroller .swiper-pagination-bullet-active {
    opacity: 1;
    width: 24px;
    border-radius: 5px;
}

/* Grid Layout */
.j2c-reviews-grid .j2c-review-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.j2c-reviews-grid .j2c-review-content {
    flex-grow: 1;
}

/* No Reviews Message */
.j2c-reviews .j2c-no-reviews {
    padding: 3rem 1rem;
    background: #f8f9fa;
    border-radius: var(--j2c-card-radius);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .j2c-reviews {
        --j2c-card-bg: #1e1e1e;
        --j2c-card-border: #333333;
        --j2c-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .j2c-reviews .j2c-no-reviews {
        background: #252525;
    }
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .j2c-reviews .j2c-review-card {
        padding: 1rem;
    }

    .j2c-reviews .j2c-review-image {
        width: 50px;
        height: 50px;
    }

    .j2c-reviews-scroller .swiper-button-prev,
    .j2c-reviews-scroller .swiper-button-next {
        display: none;
    }
}

/* Print Styles */
@media print {
    .j2c-reviews-scroller .swiper-button-prev,
    .j2c-reviews-scroller .swiper-button-next,
    .j2c-reviews-scroller .swiper-pagination {
        display: none !important;
    }

    .j2c-reviews .j2c-review-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
