@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&display=swap');

:root {
    --rh-primary: #5e5ce6;
    --rh-glass: rgba(255, 255, 255, 0.05);
    --rh-glass-hover: rgba(255, 255, 255, 0.1);
    --rh-border: rgba(255, 255, 255, 0.1);
    --rh-text: #333;
    --rh-text-muted: #888;
    --rh-star: #ffb800;
}

.rh-reviews-wrapper {
    font-family: 'Outfit', sans-serif;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rh-reviews-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}

.rh-reviews-slider::before,
.rh-reviews-slider::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.rh-reviews-slider::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.rh-reviews-slider::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.rh-reviews-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.rh-reviews-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 10px));
    }
}

.rh-review-card {
    background: var(--rh-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--rh-border);
    border-radius: 12px;
    padding: 16px 20px;
    width: 300px;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rh-review-card:hover {
    background: var(--rh-glass-hover);
    transform: translateY(-3px);
    border-color: var(--rh-primary);
}

.rh-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rh-review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--rh-primary);
    object-fit: cover;
}

.rh-review-meta {
    display: flex;
    flex-direction: column;
}

.rh-review-author {
    font-weight: 600;
    color: var(--rh-text);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.rh-review-time {
    font-size: 0.75rem;
    color: var(--rh-text-muted);
}

.rh-review-rating {
    display: flex;
    gap: 2px;
}

.rh-star {
    font-size: 0.9rem;
    color: #e0e0e0;
}

.rh-star.filled {
    color: var(--rh-star);
}

.rh-review-text {
    line-height: 1.4;
    color: #555;
    font-size: 0.85rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rh-reviews-footer {
    display: flex;
    justify-content: center;
    width: 100%;
}

.rh-leave-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--rh-primary);
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(94, 92, 230, 0.3);
}

.rh-leave-review-btn:hover {
    background: #4a48c9;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(94, 92, 230, 0.4);
}

.rh-leave-review-btn svg {
    transition: transform 0.3s ease;
}

.rh-leave-review-btn:hover svg {
    transform: translateX(3px);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .rh-review-card {
        background: rgba(255, 255, 255, 0.03);
    }

    .rh-review-author {
        color: #eee;
    }

    .rh-review-text {
        color: #ccc;
    }

    .rh-reviews-slider::before {
        background: linear-gradient(to right, #1a1a1a, rgba(26, 26, 26, 0));
    }

    .rh-reviews-slider::after {
        background: linear-gradient(to left, #1a1a1a, rgba(26, 26, 26, 0));
    }
}

/* Base adjustment for light themes */
body:not(.dark-mode) .rh-reviews-slider::before {
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

body:not(.dark-mode) .rh-reviews-slider::after {
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}