/**
 * WL Bewertungen - Frontend Styles
 * Modern Design with Poppins
 */

/* Widget Container */
.wlbw-widget {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: center;
    position: relative;
}

/* Headline */
.wlbw-headline {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1a1a2e;
    line-height: 1.3;
}

/* Stars Container */
.wlbw-stars {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

/* Single Star */
.wlbw-star {
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    line-height: 1;
    display: inline-flex;
}

.wlbw-star svg {
    width: 40px;
    height: 40px;
    fill: #e0e0e0;
    transition: fill 0.2s ease;
}

/* Star Hover - scale only the hovered star */
.wlbw-stars:not(.is-disabled) .wlbw-star:hover {
    transform: scale(1.15);
}

/* Hover color for hovered star AND all previous stars (via is-hovered class) */
.wlbw-stars:not(.is-disabled) .wlbw-star:hover svg,
.wlbw-stars:not(.is-disabled) .wlbw-star.is-hovered svg {
    fill: var(--wlbw-star-hover-color, #fbbf24);
}

/* Star Active - VERY high specificity to ensure active color shows */
.wlbw-widget .wlbw-star.is-active svg,
.wlbw-widget .wlbw-stars .wlbw-star.is-active svg,
.wlbw-widget .wlbw-stars.is-disabled .wlbw-star.is-active svg,
.elementor-widget .wlbw-widget .wlbw-star.is-active svg,
.elementor-widget .wlbw-widget .wlbw-stars .wlbw-star.is-active svg,
.elementor-widget .wlbw-widget .wlbw-stars.is-disabled .wlbw-star.is-active svg {
    fill: var(--wlbw-star-active-color, #f59e0b) !important;
}

/* Disabled Stars - keep active color visible */
.wlbw-stars.is-disabled .wlbw-star {
    cursor: default;
    pointer-events: none;
}

/* Stats Text */
.wlbw-stats-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 20px;
    font-weight: 400;
}

/* Submit Button */
.wlbw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none !important;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.18);
}

.wlbw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.22);
}

.wlbw-btn:active {
    transform: translateY(0);
}

.wlbw-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.wlbw-btn.is-loading {
    pointer-events: none;
}

.wlbw-btn.is-loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wlbw-spin 0.8s linear infinite;
}

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

/* Messages */
.wlbw-msg {
    display: none;
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    animation: wlbw-fadeIn 0.3s ease;
}

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

.wlbw-msg.is-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.wlbw-msg.is-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* Already Rated Notice */
.wlbw-notice {
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
    margin: 16px 0 0;
}

/* Error Text */
.wlbw-error {
    color: #dc2626;
    font-style: italic;
}

/* Responsive */
@media (max-width: 480px) {
    .wlbw-headline {
        font-size: 1.25rem;
    }

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

    .wlbw-btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}
