/* ReviewFlow Google Reviews Shared Styles */

.review-card {
    background: #f1f3f4;
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    box-shadow: 0 1px 2px rgba(60,64,67,0.1), 0 2px 6px 2px rgba(60,64,67,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(60,64,67,0.15), 0 4px 12px 4px rgba(60,64,67,0.08);
}

.review-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
    background: #9aa0a6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 500;
}

.review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.review-info {
    flex: 1;
    min-width: 0;
}

.review-author {
    font-weight: 500;
    font-size: 14px;
    color: #3c4043;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-time {
    color: #5f6368;
    font-size: 13px;
}

.google-icon {
    width: 20px;
    height: 20px;
    margin-left: auto;
    flex-shrink: 0;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.review-stars {
    display: flex;
    gap: 3px;
    color: #f9ab00;
    font-size: 22px;
    line-height: 1;
}

.review-badge {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
}

.badge-icon {
    width: 18px;
    height: 18px;
}

/* Review text and clamping */
.review-text-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.review-text {
    color: #3c4043;
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.review-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 4.35em; /* 3 lines * 1.45 line-height */
}

.review-text.expanded {
    display: block;
    max-height: none;
}

.read-more-btn {
    background: none !important;
    border: none !important;
    color: #5f6368 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer;
    padding: 4px 0 0 0 !important;
    display: inline-block;
    text-decoration: underline !important;
    text-transform: capitalize;
    text-align: left;
    margin-top: 4px;
    box-shadow: none !important;
}

.read-more-btn:hover {
    color: #3c4043 !important;
}

/* ================= LAYOUT 1: MARQUEE ================= */

.reviews-section {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    padding: 20px 0;
    background: transparent;
    --sayyes-marquee-speed: 45s;
}

.reviews-section::before,
.reviews-section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 10;
    pointer-events: none;
}

.reviews-section::before {
    left: 0;
    background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.reviews-section::after {
    right: 0;
    background: linear-gradient(to left, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.reviews-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    will-change: transform;
    width: max-content;
}

.reviews-row-1 {
    animation: sayyesScrollRight var(--sayyes-marquee-speed, 45s) linear infinite;
}

.reviews-row-2 {
    animation: sayyesScrollLeft var(--sayyes-marquee-speed, 45s) linear infinite;
}

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

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

.reviews-row:hover {
    animation-play-state: paused;
}

.reviews-section .review-card {
    width: 340px;
    flex-shrink: 0;
}

/* ================= LAYOUT 2: GRID ================= */

.reviews-container-grid {
    width: 100%;
    padding: 20px 0;
    box-sizing: border-box;
}

.reviewflow-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

/* ================= LAYOUT 3: MASONRY ================= */

.reviews-container-masonry {
    width: 100%;
    padding: 20px 0;
    box-sizing: border-box;
}

.reviewflow-masonry-layout {
    column-count: 3;
    column-gap: 20px;
    width: 100%;
}

.reviewflow-masonry-layout .review-card {
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    break-inside: avoid;
}

/* ================= RESPONSIVE ADJ ================= */

@media (max-width: 960px) {
    .reviewflow-masonry-layout {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .reviewflow-masonry-layout {
        column-count: 1;
    }
    .reviews-section::before,
    .reviews-section::after {
        width: 60px;
    }
    .reviews-section .review-card {
        width: 290px;
    }
}
