/* =============================================
   WP Reviews Widget — Frontend Styles
   Plugin Factory | pluginfactory.online
   ============================================= */

/* Wrapper */
.wrw-reviews-wrap {
    margin: 0;
    padding: 0;
}

/* ---- GRID LAYOUT ---- */
.wrw-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 4px 0;
}

/* ---- LIST LAYOUT ---- */
.wrw-layout-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wrw-layout-list .wrw-review-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 20px;
    align-items: start;
    border-radius: 10px;
}

.wrw-layout-list .wrw-review-header {
    grid-column: 1;
    grid-row: 1 / 3;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 80px;
}

.wrw-layout-list .wrw-stars {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 4px;
}

.wrw-layout-list .wrw-review-text {
    grid-column: 2;
    grid-row: 2;
    -webkit-line-clamp: unset;
    margin-bottom: 0;
}

.wrw-layout-list .wrw-review-footer {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
}

/* ---- CARD ---- */
.wrw-review-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wrw-review-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

/* ---- HEADER ---- */
.wrw-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wrw-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.wrw-avatar-placeholder {
    background: #4285F4;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wrw-reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wrw-reviewer-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wrw-review-date {
    font-size: 12px;
    color: #999999;
}

/* ---- STARS ---- */
.wrw-stars {
    display: flex;
    gap: 2px;
}

.wrw-star {
    font-size: 17px;
    line-height: 1;
}

.wrw-star--filled  { color: #FBBC04; }
.wrw-star--empty   { color: #dddddd; }

/* ---- REVIEW TEXT ---- */
.wrw-review-text {
    font-size: 14px;
    color: #444444;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- FOOTER ---- */
.wrw-review-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

/* ---- SOURCE BADGES ---- */
.wrw-source-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.wrw-source-google {
    color: #1a73e8;
    background: #e8f0fe;
}

.wrw-source-ta {
    color: #00695c;
    background: #e0f2f1;
}

/* ---- NO REVIEWS ---- */
.wrw-no-reviews {
    color: #999;
    font-style: italic;
    padding: 16px 0;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
    .wrw-layout-grid {
        grid-template-columns: 1fr;
    }
    .wrw-layout-list .wrw-review-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .wrw-layout-list .wrw-review-header,
    .wrw-layout-list .wrw-stars,
    .wrw-layout-list .wrw-review-text,
    .wrw-layout-list .wrw-review-footer {
        grid-column: 1;
        grid-row: auto;
    }
    .wrw-layout-list .wrw-review-header {
        flex-direction: row;
        text-align: left;
    }
}
