/* ============================================================
   Review Box PRO – [rbp_games] Grid CSS
   ============================================================ */

.rbp-games-grid__list {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
    gap: 16px;
    margin-bottom: 20px;
}

/* ── Card ── */
.rbpg-card {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    transition: transform .18s, box-shadow .18s;
}
.rbpg-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.rbpg-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* ── Media ── */
.rbpg-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
    overflow: hidden;
}
.rbpg-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.rbpg-card:hover .rbpg-card__thumb { transform: scale(1.05); }
.rbpg-card__thumb--empty {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* ── Score badge ── */
.rbpg-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    border-radius: 7px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.rbpg-card__score {
    font-weight: 900;
    line-height: 1;
    color: #fff;
    padding: 6px 8px 4px;
    width: 100%;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.rbpg-card__label {
    background: rgba(0,0,0,.32);
    color: #fff;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 2px 6px 3px;
    width: 100%;
    text-align: center;
}

/* Badge colours */
.rbpg-card__badge.rbp-badge-low      .rbpg-card__score { background: #dc2626; }
.rbpg-card__badge.rbp-badge-mid-low  .rbpg-card__score { background: #f97316; }
.rbpg-card__badge.rbp-badge-mid-high .rbpg-card__score { background: #eab308; }
.rbpg-card__badge.rbp-badge-high     .rbpg-card__score { background: #16a34a; }

/* ── Body ── */
.rbpg-card__body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.rbpg-card__title {
    font-weight: 700;
    line-height: 1.3;
    color: #111;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Stars ── */
.rbpg-card__stars { display: flex; gap: 1px; line-height: 1; }
.rbpg-star        { color: #d1d5db; }
.rbpg-star--full  { color: #f59e0b; }
.rbpg-star--half  { position: relative; color: #d1d5db; }
.rbpg-star--half::before {
    content: '\2605';
    position: absolute;
    left: 0; top: 0;
    color: #f59e0b;
    clip-path: inset(0 50% 0 0);
    pointer-events: none;
}

/* ── Votes ── */
.rbpg-card__votes          { color: #9ca3af; margin: 0 !important; padding: 0 !important; }
.rbpg-card__votes--none    { font-style: italic; }

/* ── Footer ── */
.rbp-games-grid__footer    { text-align: center; padding: 4px 0 8px; }
.rbp-games-grid__more {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}
.rbp-games-grid__more:hover { transform: translateY(-1px); }
.rbp-games-grid__end        { color: #9ca3af; font-size: 13px; margin: 0 !important; }

/* ── Loading spinner ── */
.rbp-games-grid__loading    { text-align: center; padding: 16px; }
.rbp-games-grid__spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #e5e7eb;
    border-top-color: #1d4ed8;
    border-radius: 50%;
    animation: rbpg-spin .7s linear infinite;
}
@keyframes rbpg-spin { to { transform: rotate(360deg); } }

/* ── Empty ── */
.rbp-games-grid__empty  { text-align: center; color: #9ca3af; padding: 24px; font-size: 14px; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .rbp-games-grid__list {
        grid-template-columns: repeat( 2, 1fr );
        gap: 10px;
    }
}
