/* ═══════════════════════════════════════════
   Review Hub – Frontend Public Styles
   ═══════════════════════════════════════════ */

#rh-reviews {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Tabs ── */
.rh-front-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    background: #fff;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.rh-front-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #777;
    transition: all 0.2s;
    font-family: inherit;
}
.rh-front-tab:hover { background: #f5f5f5; }
.rh-front-tab svg { flex-shrink: 0; }

.rh-front-tab.active {
    color: #fff;
    background: #333;
}
.rh-front-tab.active[data-platform="google"]   { background: #4285F4; }
.rh-front-tab.active[data-platform="facebook"] { background: #1877F2; }
.rh-front-tab.active[data-platform="yelp"]     { background: #FF1A1A; }
.rh-front-tab.active[data-platform="all"]      { background: #00a33e; }

.rh-front-tab.active svg path { fill: rgba(255,255,255,0.9); }
.rh-front-tab .rh-yelp-icon path { fill: #FF1A1A; }
.rh-front-tab.active .rh-yelp-icon path { fill: #fff; }

.rh-front-count {
    background: rgba(0,0,0,0.06);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}
.rh-front-tab.active .rh-front-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* ── Grid ── */
.rh-front-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    grid-auto-rows: 295px;
}
@media (max-width: 767px) {
    .rh-front-grid { grid-template-columns: 1fr; }
}

/* ── Card ── */
.rh-front-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    height: 295px;
    min-height: 295px;
    max-height: 295px;
}
.rh-front-card-link:hover .rh-front-card {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.rh-front-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 295px;
    min-height: 295px;
    max-height: 295px;
    box-sizing: border-box;
}
.rh-front-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* Make text area fill remaining space */
.rh-front-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    word-break: break-word;
    overflow: hidden;
}

/* Badge */
.rh-front-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rh-plat-google   { background: #EAF1FE; color: #4285F4; }
.rh-plat-facebook { background: #E7F0FE; color: #1877F2; }
.rh-plat-yelp     { background: #FEE7E7; color: #FF1A1A; }

/* Reviewer */
.rh-front-reviewer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-right: 90px;
}
.rh-front-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #f0f0f0;
    clip-path: circle(50%);
    -webkit-clip-path: circle(50%);
}
.rh-front-avatar-ph {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}
.rh-front-avatar-ph.rh-plat-google   { background: #4285F4; }
.rh-front-avatar-ph.rh-plat-facebook { background: #1877F2; }
.rh-front-avatar-ph.rh-plat-yelp     { background: #FF1A1A; }

.rh-front-name { font-weight: 600; font-size: 15px; color: #1a1a1a; line-height: 1.3; }
.rh-front-date { font-size: 12px; color: #999; margin-top: 2px; }

/* Rating */
.rh-front-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 12px;
}
.rh-front-rating-num {
    font-size: 12px;
    color: #777;
    margin-left: 6px;
}
.rh-front-recommends {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    background: #ECFDF5;
    color: #059669;
}

/* Text */
.rh-front-readmore {
    display: block;
    color: #0056B3;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 0;
    margin-top: auto;
    text-align: left;
}

.rh-front-card-link:hover .rh-front-readmore {
    text-decoration: underline;
}

/* ── Reactions ── */
.rh-front-reactions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f3f3;
}

.rh-vote-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    font-family: inherit;
}
.rh-vote-btn:hover { background: #f0f0f0; }
.rh-vote-btn svg { flex-shrink: 0; }

.rh-vote-like.rh-voted {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #059669;
}
.rh-vote-dislike.rh-voted {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #DC2626;
}

/* ── Load More ── */
.rh-load-more-wrap {
    text-align: center;
    margin-top: 30px;
}
.rh-load-more-btn {
    padding: 12px 36px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.rh-load-more-btn:hover {
    border-color: #999;
    background: #f9f9f9;
}
.rh-load-more-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Empty */
.rh-front-empty {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}
.rh-front-empty p {
    margin-top: 10px;
    font-size: 15px;
}

/* Spinner */
.rh-spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: rh-spin-f 0.7s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}
@keyframes rh-spin-f { to { transform: rotate(360deg); } }
