/**
 * Frontend Styles for Post Ratings System
 * 
 * Professional and responsive styling for rating widgets
 */

/* Rating Wrapper */
.prs-rating-wrapper {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.prs-rating-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Heading Styles */
.prs-rating-wrapper .prs-heading {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333333;
}

.prs-rating-wrapper .prs-subheading {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666666;
}

/* Rating Container */
.prs-rating-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

/* Star Rating Styles */
.prs-stars {
    display: flex;
    gap: 8px;
    cursor: pointer;
}

.prs-stars.prs-disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.prs-star {
    display: inline-flex;
    font-size: 40px;
    color: #CCCCCC;
    transition: all 0.2s ease;
    cursor: pointer;
}

.prs-star svg {
    width: 40px;
    height: 40px;
    fill: currentColor;
}

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

.prs-star.active {
    color: #FFD700;
}

.prs-star.half {
    color: #FFD700;
}

.prs-stars.prs-disabled .prs-star {
    cursor: not-allowed;
}

.prs-stars.prs-disabled .prs-star:hover {
    transform: none;
}

/* Thumbs Rating Styles */
.prs-thumbs {
    display: flex;
    gap: 20px;
}

.prs-thumbs.prs-disabled {
    opacity: 0.6;
}

.prs-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    background: #ffffff;
    color: #CCCCCC;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prs-thumb:hover:not(:disabled) {
    border-color: #FFD700;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.prs-thumb.active {
    border-color: #FFD700;
    color: #FFD700;
    background: #fffbf0;
}

.prs-thumb svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.prs-thumb:disabled {
    cursor: not-allowed;
}

/* Rating Info */
.prs-rating-info {
    text-align: center;
    margin: 15px 0 0 0;
    font-size: 16px;
    color: #666666;
}

.prs-rating-info .prs-average {
    font-weight: 700;
    color: #333333;
    font-size: 20px;
}

.prs-rating-info .prs-separator {
    margin: 0 8px;
    color: #CCCCCC;
}

.prs-rating-info .prs-total {
    font-weight: 500;
}

/* Message Container */
.prs-message-container {
    margin-top: 15px;
    text-align: center;
}

/* Loading Spinner */
.prs-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    color: #666666;
    font-size: 14px;
}

.prs-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e5e5;
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: prs-spin 0.8s linear infinite;
}

@keyframes prs-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.prs-success-message {
    padding: 12px 20px;
    background: #f0f9ff;
    border: 1px solid #FFD700;
    border-radius: 6px;
    color: #FFD700;
    font-weight: 600;
    font-size: 14px;
    animation: prs-fadeIn 0.3s ease;
}

/* Error Message */
.prs-error-message {
    padding: 12px 20px;
    background: #fff5f5;
    border: 1px solid #ff4444;
    border-radius: 6px;
    color: #cc0000;
    font-weight: 600;
    font-size: 14px;
    animation: prs-fadeIn 0.3s ease;
}

@keyframes prs-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Already Rated State */
.prs-already-rated .prs-star,
.prs-already-rated .prs-thumb {
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .prs-rating-wrapper {
        padding: 15px;
        margin: 20px 0;
    }

    .prs-rating-wrapper .prs-heading {
        font-size: 20px;
    }

    .prs-star {
        font-size: 32px;
    }

    .prs-star svg {
        width: 32px;
        height: 32px;
    }

    .prs-thumbs {
        gap: 15px;
    }

    .prs-thumb {
        padding: 12px 20px;
        font-size: 13px;
    }

    .prs-thumb svg {
        width: 28px;
        height: 28px;
    }

    .prs-rating-info {
        font-size: 14px;
    }

    .prs-rating-info .prs-average {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .prs-rating-wrapper {
        padding: 12px;
    }

    .prs-rating-wrapper .prs-heading {
        font-size: 18px;
    }

    .prs-star {
        font-size: 28px;
    }

    .prs-star svg {
        width: 28px;
        height: 28px;
    }

    .prs-stars {
        gap: 5px;
    }

    .prs-thumbs {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .prs-thumb {
        width: 100%;
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .prs-rating-wrapper {
        border: 1px solid #000;
        box-shadow: none;
    }

    .prs-message-container,
    .prs-subheading {
        display: none;
    }
}
