/**
 * Review Carousel Styles
 */

/* Base Wrapper */
.wer-carousel-wrapper {
    position: relative;
    padding: 20px 0;
}

.wer-no-reviews {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 16px;
}

/* Review Card */
.wer-review-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.wer-review-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Card Header */
.wer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wer-stars {
    display: flex;
    gap: 2px;
}

.wer-star {
    font-size: 18px;
    color: #ddd;
}

.wer-star.filled {
    color: #ffa500;
}

.wer-verified-badge {
    font-size: 12px;
    color: #28a745;
    background: #d4edda;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Review Content */
.wer-review-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
}

.wer-review-content {
    flex: 1;
    margin-bottom: 15px;
}

.wer-review-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Card Footer */
.wer-card-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.wer-reviewer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wer-reviewer-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.wer-review-date {
    font-size: 12px;
    color: #999;
}

.wer-product-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.wer-product-thumb {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
}

.wer-product-link {
    font-size: 13px;
    color: #0073aa;
    text-decoration: none;
}

.wer-product-link:hover {
    text-decoration: underline;
}

.wer-product-name {
    font-size: 13px;
    color: #666;
}

/* ========== CAROUSEL MODE ========== */
.wer-mode-carousel .wer-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 0 50px;
}

.wer-mode-carousel .wer-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

/* Desktop: Show 3 cards */
.wer-mode-carousel .wer-review-card {
    flex: 0 0 calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
}

/* Navigation Arrows */
.wer-carousel-prev,
.wer-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #333;
    transition: all 0.2s;
    z-index: 10;
    user-select: none;
    outline: none;
}

.wer-carousel-prev:hover,
.wer-carousel-next:hover,
.wer-carousel-prev:focus,
.wer-carousel-next:focus {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.wer-carousel-prev:focus,
.wer-carousel-next:focus {
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

.wer-carousel-prev {
    left: 0;
}

.wer-carousel-next {
    right: 0;
}

.wer-carousel-prev.disabled,
.wer-carousel-next.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dots Navigation */
.wer-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.wer-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    display: inline-block;
    outline: none;
}

.wer-dot.active,
.wer-dot:hover {
    background: #0073aa;
}

.wer-dot:focus {
    background: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

/* ========== MARQUEE MODE ========== */
.wer-mode-marquee .wer-marquee-container {
    overflow: hidden;
    position: relative;
}

.wer-mode-marquee .wer-marquee-track {
    display: flex;
    gap: 20px;
    animation: marquee-scroll 30s linear infinite;
}

.wer-mode-marquee .wer-marquee-track:hover {
    animation-play-state: paused;
}

.wer-mode-marquee .wer-review-card {
    flex: 0 0 350px;
    max-width: 350px;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ========== GRID MODE ========== */
.wer-mode-grid .wer-grid-container {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 1024px) {
    /* Tablet: Show 2 cards */
    .wer-mode-carousel .wer-review-card {
        flex: 0 0 calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
    }
    
    .wer-mode-grid .wer-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile: Show 1 card */
    .wer-mode-carousel .wer-review-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .wer-mode-carousel .wer-carousel-container {
        padding: 0 40px;
    }

    .wer-carousel-prev,
    .wer-carousel-next {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .wer-mode-marquee .wer-review-card {
        flex: 0 0 300px;
        max-width: 300px;
    }

    .wer-mode-grid .wer-grid-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wer-mode-carousel .wer-carousel-container {
        padding: 0 30px;
    }

    .wer-carousel-prev,
    .wer-carousel-next {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .wer-mode-marquee .wer-review-card {
        flex: 0 0 250px;
        max-width: 250px;
    }

    .wer-review-card {
        padding: 15px;
    }
}

/* RTL Support */
.rtl .wer-mode-carousel .wer-carousel-track {
    direction: rtl;
}

.rtl .wer-carousel-prev {
    left: auto;
    right: 0;
}

.rtl .wer-carousel-next {
    right: auto;
    left: 0;
}
