/**
 * Rating Widget Styles for SendFilesEncrypted
 *
 * Provides star rating UI with hover effects and animations
 */

/* Rating Widget Container */
.rating-widget {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.rating-widget.rated {
    background: #e8f5e9;
    border: 1px solid #4caf50;
}

.rating-widget.success {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Rating Prompt Text */
.rating-prompt {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.rating-hint {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #666;
}

.rating-thanks {
    margin: 10px 0 0 0;
    font-size: 14px;
    color: #2e7d32;
    font-weight: 500;
}

/* Star Container */
.rating-stars {
    display: inline-flex;
    gap: 5px;
    font-size: 32px;
    line-height: 1;
}

.rating-stars.interactive {
    cursor: pointer;
}

/* Individual Star */
.star {
    color: #ddd;
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.star.filled {
    color: #ffd700;
}

.star.half-filled {
    background: linear-gradient(90deg, #ffd700 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Interactive Stars */
.rating-stars.interactive .star {
    cursor: pointer;
}

.rating-stars.interactive .star:hover {
    transform: scale(1.2);
}

.rating-stars.interactive .star:active {
    transform: scale(0.9);
}

/* Readonly Stars */
.rating-stars.readonly .star {
    cursor: default;
}

/* Rating Display (for showing existing ratings) */
.rating-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.rating-display .rating-stars {
    font-size: 18px;
}

.rating-display .rating-value {
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

.rating-display .rating-count {
    color: #666;
    font-size: 14px;
}

/* Error Message */
.rating-error {
    margin-top: 10px;
    padding: 10px;
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 4px;
    color: #c62828;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .rating-widget {
        padding: 15px;
        margin: 15px 0;
    }

    .rating-stars {
        font-size: 28px;
    }

    .rating-prompt {
        font-size: 14px;
    }

    .rating-display .rating-stars {
        font-size: 16px;
    }

    .rating-display .rating-value {
        font-size: 16px;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .rating-widget {
        background: #2d2d2d;
        color: #fff;
    }

    .rating-widget.rated {
        background: #1b5e20;
        border-color: #4caf50;
    }

    .rating-prompt {
        color: #fff;
    }

    .rating-hint {
        color: #aaa;
    }

    .star {
        color: #555;
    }

    .rating-display .rating-value {
        color: #fff;
    }

    .rating-display .rating-count {
        color: #aaa;
    }
}

/* Integration with existing site styles */
.rating-widget-inline {
    display: inline-block;
    padding: 10px 15px;
    margin: 0;
    background: transparent;
    border-radius: 0;
}

.rating-widget-inline .rating-stars {
    font-size: 24px;
}

/* Footer Rating Widget */
footer .rating-widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

footer .rating-widget.rated {
    background: rgba(76, 175, 80, 0.2);
}

footer .rating-prompt,
footer .rating-hint,
footer .rating-thanks {
    color: #fff;
}
