/* ============================================================
   WP Reviews for Yell.com – Frontend Styles
   Redesigned to match Google Reviews-style slider layout
   ============================================================ */

/* ---- CSS Custom Properties ---- */
.yell-reviews-wrapper {
    --yell-cards-per-row: 3;
    --yell-card-gap: 20px;
    --yell-card-radius: 14px;
    --yell-bg: #eceef4;
    --yell-card-bg: #fff;
    --yell-text: #333;
    --yell-text-light: #6b7280;
    --yell-brand: #1893D0;
    --yell-star: #f5a623;
    --yell-arrow-size: 40px;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--yell-text);
    max-width: 100%;
    position: relative;
}

/* ---- Header (toggleable) ---- */
.yell-reviews-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px 24px;
    background: var(--yell-card-bg);
    border: 1px solid #e2e4ea;
    border-radius: var(--yell-card-radius);
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.yell-reviews-platform-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 56px;
}
.yell-platform-name {
    font-size: 0.7rem;
    color: var(--yell-text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.yell-reviews-summary {
    flex: 1;
}
.yell-reviews-business-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1d2327;
    margin-bottom: 6px;
}
.yell-reviews-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.yell-reviews-score {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--yell-brand);
    line-height: 1;
}
.yell-reviews-count {
    color: var(--yell-text-light);
    font-size: 0.9rem;
}
.yell-reviews-link {
    color: var(--yell-brand);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
}
.yell-reviews-link:hover {
    text-decoration: underline;
}

/* ---- Stars ---- */
.yell-stars {
    font-size: 1.2rem;
    line-height: 1;
    letter-spacing: 1px;
}
.yell-star-full  { color: var(--yell-star); }
.yell-star-half  { color: var(--yell-star); opacity: 0.6; }
.yell-star-empty { color: #ddd; }

.yell-review-stars-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.yell-verified-badge {
    font-size: 0.85rem;
    line-height: 1;
}

/* ============================================================
   Slider Layout (Default — matches reference image)
   ============================================================ */
.yell-reviews-slider-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.yell-reviews-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--yell-card-gap);
    padding: 12px 6px 16px;
    scrollbar-width: none;          /* Firefox */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    flex: 1;
}
.yell-reviews-list::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}

/* ---- Review Card ---- */
.yell-review-card {
    flex: 0 0 calc((100% - (var(--yell-cards-per-row) - 1) * var(--yell-card-gap)) / var(--yell-cards-per-row));
    min-width: 280px;
    scroll-snap-align: start;
    background: var(--yell-card-bg);
    border: 1px solid #e2e4ea;
    border-radius: var(--yell-card-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    box-sizing: border-box;
}
.yell-review-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.10);
    transform: translateY(-2px);
}

/* ---- Card Header ---- */
.yell-review-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}
.yell-reviewer-avatar {
    flex-shrink: 0;
}
.yell-reviewer-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
.yell-reviewer-initials {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}
.yell-reviewer-info {
    flex: 1;
    min-width: 0;
}
.yell-reviewer-name {
    display: block;
    font-weight: 700;
    color: #1d2327;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.yell-review-date {
    display: block;
    color: var(--yell-text-light);
    font-size: 0.78rem;
    margin-top: 2px;
}

/* ---- Platform icon (top-right corner of card) ---- */
.yell-review-platform-icon {
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0.9;
}

/* ---- Review text ---- */
.yell-review-text {
    color: #444;
    font-size: 0.88rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.yell-read-more {
    display: inline-block;
    margin-top: 6px;
    color: var(--yell-brand);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}
.yell-read-more:hover {
    text-decoration: underline;
}

/* ---- Reply ---- */
.yell-review-reply {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f9f9f9;
    border-left: 3px solid var(--yell-brand);
    border-radius: 0 6px 6px 0;
    font-size: 0.82rem;
    color: #555;
}
.yell-review-reply strong {
    display: block;
    margin-bottom: 4px;
    color: var(--yell-brand);
}
.yell-review-reply p {
    margin: 0;
}

/* ---- Navigation Arrows ---- */
.yell-nav-arrow {
    flex-shrink: 0;
    width: var(--yell-arrow-size);
    height: var(--yell-arrow-size);
    border: 1px solid #d1d5db;
    background: var(--yell-card-bg);
    border-radius: 50%;
    font-size: 1.6rem;
    font-weight: 300;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.yell-nav-arrow:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
}
.yell-nav-arrow:active {
    transform: scale(0.95);
}

/* ---- Footer / Write a Review Button (toggleable) ---- */
.yell-reviews-footer {
    text-align: center;
    margin-top: 20px;
}
.yell-write-review-btn {
    display: inline-block;
    padding: 10px 28px;
    background: var(--yell-brand);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease, transform 0.15s ease;
}
.yell-write-review-btn:hover {
    background: #1477a8;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ---- No reviews placeholder ---- */
.yell-reviews-no-reviews {
    color: var(--yell-text-light);
    font-style: italic;
    text-align: center;
    padding: 24px;
}

/* ============================================================
   Grid Override
   ============================================================ */
.yell-reviews-grid .yell-reviews-list {
    flex-wrap: wrap;
    overflow-x: visible;
    scroll-snap-type: none;
}
.yell-reviews-grid .yell-review-card {
    scroll-snap-align: none;
}
.yell-reviews-grid .yell-nav-arrow {
    display: none;
}

/* ============================================================
   List Override
   ============================================================ */
.yell-reviews-list.yell-reviews-wrapper .yell-reviews-list {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: visible;
    scroll-snap-type: none;
}
.yell-reviews-list.yell-reviews-wrapper .yell-review-card {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
    scroll-snap-align: none;
}
.yell-reviews-list.yell-reviews-wrapper .yell-nav-arrow {
    display: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .yell-reviews-wrapper {
        --yell-cards-per-row: 2;
    }
}
@media (max-width: 640px) {
    .yell-reviews-wrapper {
        --yell-cards-per-row: 1;
    }
    .yell-reviews-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .yell-reviews-rating-row {
        justify-content: center;
    }
    .yell-nav-arrow {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }
    .yell-review-card {
        min-width: 260px;
    }
}
