/* Compact Game Rating Widget */

.cas-game-rating-compact {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 14px;
    margin: 8px 0;
}

/* Average Rating Display */
.cas-rating-average {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cas-avg-number {
    font-size: 20px;
    font-weight: 700;
    color: #FFD700;
    line-height: 1;
}

.cas-avg-stars {
    display: flex;
    gap: 2px;
    font-size: 16px;
}

.cas-avg-star {
    background: linear-gradient(90deg, #FFD700 var(--fill-percent, 0%), #e0e0e0 var(--fill-percent, 0%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.cas-rating-total {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.cas-no-rating-text {
    font-size: 14px;
    color: #999;
    font-style: italic;
}

/* User Rating Input */
.cas-your-rating-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 16px;
}

.cas-rate-label {
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
}

.cas-star-rating-compact {
    display: flex;
    gap: 4px;
    cursor: pointer;
}

.cas-star-clickable {
    font-size: 20px;
    color: #e0e0e0;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1;
}

.cas-star-clickable:hover {
    transform: scale(1.2);
}

.cas-star-clickable.active {
    color: #FFD700;
}

.cas-star-clickable.hover {
    color: #FFD700;
}

/* When hovering, hide active state so only hover shows */
.cas-star-rating-compact.hovering .cas-star-clickable.active {
    color: #e0e0e0;
}

.cas-star-rating-compact.hovering .cas-star-clickable.hover {
    color: #FFD700;
}

/* Hover effect - controlled by JavaScript */

/* Message Display */
.cas-rating-message-compact {
    position: absolute;
    margin-top: 4px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10;
}

.cas-rating-message-compact.success {
    background: #d4edda;
    color: #155724;
}

.cas-rating-message-compact.error {
    background: #f8d7da;
    color: #721c24;
}

/* Login Prompt */
.cas-login-prompt-compact {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 16px;
}

.cas-login-prompt-compact a {
    color: #FFD700;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.cas-login-prompt-compact a:hover {
    color: #FFA500;
    text-decoration: underline;
}

/* Loading State */
.cas-star-rating-compact.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cas-game-rating-compact {
        flex-wrap: wrap;
        gap: 12px;
        padding: 8px 12px;
    }

    .cas-your-rating-compact,
    .cas-login-prompt-compact {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 8px;
        width: 100%;
    }

    .cas-avg-number {
        font-size: 18px;
    }

    .cas-avg-stars {
        font-size: 14px;
    }

    .cas-star-clickable {
        font-size: 18px;
    }
}
