/**
 * WG Comments - Rating Widget Styles
 *
 * @package WG_Comments
 * @since 2.3.0
 */

/* ========================================
   Rating Widget Container
   ======================================== */

.wgc-rating-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    color: #fff;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* Header */
.wgc-rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.wgc-rating-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.wgc-rating-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.wgc-rating-average {
    font-size: 28px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wgc-rating-count {
    font-size: 14px;
    opacity: 0.9;
}

/* ========================================
   Login Prompt
   ======================================== */

.wgc-rating-login-prompt {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.wgc-rating-login-prompt p {
    margin: 0 0 20px;
    font-size: 16px;
}

/* ========================================
   Rating Form
   ======================================== */

.wgc-rating-form {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

/* Current user rating */
.wgc-rating-user-current {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
}

.wgc-rating-user-current .wgc-rating-label {
    opacity: 0.9;
}

.wgc-rating-user-current .wgc-rating-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
}

/* ========================================
   Slider
   ======================================== */

.wgc-rating-slider-container {
    margin: 20px 0;
}

.wgc-rating-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
    opacity: 0.7;
}

.wgc-rating-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.wgc-rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffd700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wgc-rating-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
}

.wgc-rating-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffd700;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wgc-rating-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
}

/* Live display */
.wgc-rating-display {
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin-top: 15px;
}

.wgc-rating-number {
    font-size: 48px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.wgc-rating-slider:active ~ .wgc-rating-display .wgc-rating-number {
    transform: scale(1.1);
}

.wgc-rating-scale {
    font-size: 24px;
    margin-left: 5px;
    opacity: 0.8;
}

/* ========================================
   Actions
   ======================================== */

.wgc-rating-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.wgc-button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.wgc-button-primary {
    background: #ffd700;
    color: #333;
}

.wgc-button-primary:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.wgc-button-primary:active {
    transform: translateY(0);
}

.wgc-button-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(10px);
}

.wgc-button-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Loading state */
.wgc-button.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.wgc-button.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ========================================
   Feedback
   ======================================== */

.wgc-rating-feedback {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.wgc-rating-feedback.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.wgc-rating-feedback.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
}

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

/* ========================================
   Info
   ======================================== */

.wgc-rating-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.wgc-rating-info p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    text-align: center;
}

.wgc-rating-info strong {
    color: #ffd700;
    font-weight: 700;
}

/* ========================================
   Distribution Chart
   ======================================== */

.wgc-rating-distribution {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.wgc-rating-distribution h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px;
    opacity: 0.9;
}

.wgc-rating-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wgc-rating-bar-row {
    display: grid;
    grid-template-columns: 60px 1fr 40px;
    align-items: center;
    gap: 10px;
}

.wgc-rating-bar-label {
    font-size: 14px;
    font-weight: 600;
}

.wgc-rating-bar {
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.wgc-rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.wgc-rating-bar-count {
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .wgc-rating-widget {
        padding: 20px;
    }

    .wgc-rating-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .wgc-rating-title {
        font-size: 20px;
    }

    .wgc-rating-average {
        font-size: 24px;
    }

    .wgc-rating-number {
        font-size: 36px;
    }

    .wgc-rating-actions {
        flex-direction: column;
    }

    .wgc-button {
        width: 100%;
    }

    .wgc-rating-bar-row {
        grid-template-columns: 50px 1fr 35px;
        gap: 8px;
    }

    .wgc-rating-bar-label {
        font-size: 12px;
    }
}

/* ========================================
   Dark Mode Support (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    /* Widget already uses dark gradient - no changes needed */
}

/**
 * Datei: assets/css/wgc-rating-widget.css
 * Pfad: /wp-content/plugins/wg-comments/assets/css/wgc-rating-widget.css
 *
 * @since 2.3.0
 *
 * Rating Widget Styles:
 * - Modern gradient design (lila/blau)
 * - Interaktiver Slider mit Gold-Thumb
 * - Live-Preview beim Slider bewegen
 * - Responsive Design
 * - Animationen und Transitions
 * - Bewertungsverteilung (Distribution Chart)
 */
