/* Feedback Widget - Collapsed State */
.feedback-widget {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    font-family: 'Nunito', sans-serif;
    animation: feedbackSlideUp 0.6s ease-out;
}

@keyframes feedbackSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Collapsed pill */
.feedback-collapsed {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 18px;
    max-width: 280px;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.feedback-collapsed:hover {
    box-shadow: 0 6px 24px rgba(255, 105, 180, 0.2), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.feedback-question-preview {
    font-size: 0.85rem;
    color: var(--light-text);
    line-height: 1.4;
    margin-bottom: 8px;
    padding-right: 20px;
}

.feedback-cta {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.feedback-cta span {
    transition: transform 0.2s ease;
    display: inline-block;
}

.feedback-collapsed:hover .feedback-cta span {
    transform: translateX(3px);
}

/* Close button */
.feedback-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    padding: 4px;
    line-height: 1;
}

.feedback-close:hover {
    opacity: 0.8;
}

/* Subtle pulse on first appearance */
.feedback-widget.is-new {
    animation: feedbackSlideUp 0.6s ease-out, feedbackPulse 2s ease-in-out 0.8s 1;
}

@keyframes feedbackPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 105, 180, 0.12);
    }
    50% {
        box-shadow: 0 4px 28px rgba(255, 105, 180, 0.3);
    }
}

/* Expanded State */
.feedback-expanded {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 20px;
    max-width: 300px;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    animation: feedbackExpand 0.3s ease-out;
}

@keyframes feedbackExpand {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.feedback-intro {
    font-size: 0.8rem;
    color: var(--light-text);
    margin-bottom: 8px;
    padding-right: 20px;
    line-height: 1.4;
}

.feedback-question-full {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    line-height: 1.4;
}

.feedback-input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
    background: rgba(255, 255, 255, 0.6);
}

.feedback-input:focus {
    border-color: var(--primary-light);
}

.feedback-send {
    margin-top: 10px;
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.feedback-send:hover {
    background: var(--primary-dark);
}

/* Thank You State */
.feedback-thankyou {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 20px;
    max-width: 300px;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    animation: feedbackExpand 0.3s ease-out;
}

.feedback-thankyou-text {
    font-size: 0.85rem;
    color: var(--text-color);
    text-align: center;
    line-height: 1.5;
}

/* Hidden state */
.feedback-widget.is-hidden {
    display: none;
}

/* Player-aware positioning */
.feedback-widget.player-visible {
    bottom: 90px;
}

/* Mobile */
@media (max-width: 768px) {
    .feedback-widget {
        bottom: 16px;
        left: 12px;
        right: 12px;
    }

    .feedback-collapsed {
        max-width: 100%;
    }

    .feedback-expanded {
        max-width: 100%;
    }

    .feedback-thankyou {
        max-width: 100%;
    }

    .feedback-widget.player-visible {
        bottom: 80px;
    }
}