/**
 * Rating System Styles
 * Interactive voting with modern design
 */

/* ===================== STAR RATING DISPLAY ===================== */

.star-rating {
    display: inline-flex;
    gap: 2px;
    color: #fbbf24;
}

.star-rating i {
    font-size: 14px;
}

.star-rating i.far {
    color: #e5e7eb;
}

/* ===================== INTERACTIVE RATING (Single Post) ===================== */

.rating-block {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.rating-block__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.rating-block__icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    font-size: 20px;
    color: #f59e0b;
}

.rating-block__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

/* Stars Interactive */
.rating-interactive {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.rating-stars-wrap {
    display: flex;
    gap: 6px;
}

.rating-star {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #e5e7eb;
    font-size: 28px;
    transition: all 0.2s ease;
    transform-origin: center;
}

.rating-star:hover {
    transform: scale(1.15);
}

.rating-star:hover,
.rating-star.active {
    color: #fbbf24;
}

.rating-star.active {
    animation: starPop 0.3s ease;
}

@keyframes starPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Rating Info */
.rating-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.rating-value {
    font-size: 36px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.rating-count {
    font-size: 14px;
    color: #6b7280;
}

.rating-hint {
    margin: 12px 0 0 0;
    font-size: 13px;
    color: #9ca3af;
}

.rating-hint.success {
    color: #16a34a;
    font-weight: 600;
}

/* ===================== GAME HEADER RATING ===================== */

.game-header__rating-block {
    margin: 16px 0;
}

.game-header__rating-block .rating-interactive {
    gap: 16px;
}

.game-header__rating-block .rating-star {
    color: rgba(255,255,255,0.3);
    font-size: 24px;
}

.game-header__rating-block .rating-star:hover,
.game-header__rating-block .rating-star.active {
    color: #fbbf24;
}

.game-header__rating-block .rating-value {
    font-size: 28px;
    color: white;
}

.game-header__rating-block .rating-count {
    color: rgba(255,255,255,0.7);
}

.game-header__rating-block .rating-hint {
    color: rgba(255,255,255,0.5);
}

.game-header__rating-block .rating-hint.success {
    color: #dcfce7;
}

/* ===================== VOTE BUTTONS (Like/Dislike) ===================== */

.vote-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.25s ease;
}

.vote-btn i {
    font-size: 16px;
}

.vote-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.vote-btn.like:hover,
.vote-btn.like.active {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #111827;
}

.vote-btn.dislike:hover,
.vote-btn.dislike.active {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
}

/* Compact Vote (in header) */
.vote-compact {
    display: flex;
    gap: 8px;
}

.vote-compact .vote-btn {
    padding: 8px 14px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.8);
}

.vote-compact .vote-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.vote-compact .vote-btn.like:hover,
.vote-compact .vote-btn.like.active {
    background: rgba(22,163,74,0.3);
    color: #dcfce7;
}

.vote-compact .vote-btn.dislike:hover,
.vote-compact .vote-btn.dislike.active {
    background: rgba(239,68,68,0.3);
    color: #fecaca;
}

/* ===================== APPROVAL BAR ===================== */

.approval-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.approval-track {
    flex: 1;
    height: 8px;
    background: #fee2e2;
    border-radius: 4px;
    overflow: hidden;
}

.approval-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a 0%, #4ade80 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.approval-text {
    font-size: 14px;
    font-weight: 600;
    color: #16a34a;
    white-space: nowrap;
}

/* ===================== RATING SUMMARY CARD ===================== */

.rating-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #f7fef9 0%, #f0fdf4 100%);
    border-radius: 16px;
    margin: 24px 0;
}

.rating-summary__score {
    text-align: center;
}

.rating-summary__number {
    font-size: 48px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.rating-summary__stars {
    margin-top: 8px;
}

.rating-summary__stars i {
    font-size: 16px;
    color: #fbbf24;
}

.rating-summary__breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.rating-row__label {
    width: 20px;
    color: #6b7280;
    text-align: right;
}

.rating-row__bar {
    flex: 1;
    height: 8px;
    background: #f0fdf4;
    border-radius: 4px;
    overflow: hidden;
}

.rating-row__fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a 0%, #15803d 100%);
    border-radius: 4px;
}

.rating-row__count {
    width: 40px;
    color: #6b7280;
    font-size: 12px;
}

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

@media (max-width: 768px) {
    .rating-interactive {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    /* Compact rating in header — stay horizontal */
    .game-header__rating-compact .rating-interactive {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: 6px;
        justify-content: center;
    }
    
    .game-header__rating-compact .rating-star {
        font-size: 15px;
        padding: 1px;
    }
    
    .game-header__rating-compact .rating-stars-wrap {
        gap: 1px;
    }
    
    .game-header__rating-compact .rating-value {
        font-size: 17px;
    }
    
    .game-header__rating-compact .rating-count {
        font-size: 11px;
        white-space: nowrap;
    }
    
    .game-header__rating-compact .rating-sep {
        font-size: 12px;
    }
    
    .game-header__rating-compact .rating-hint {
        display: none;
    }
    
    .game-header__rating-compact .rating-user {
        display: none;
    }
    
    .rating-star {
        font-size: 24px;
        padding: 4px;
    }
    
    .rating-value {
        font-size: 28px;
    }
    
    .game-header__rating-block .rating-star {
        font-size: 20px;
    }
    
    .game-header__rating-block .rating-value {
        font-size: 24px;
    }
    
    .vote-block {
        flex-wrap: wrap;
    }
    
    .rating-summary {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .rating-summary__number {
        font-size: 40px;
    }
}
