/**
 * FAQ Feedback Styles
 * Enhanced animations and visual feedback for like/dislike buttons
 */

/* Button click animations */
.feedback-button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feedback-button:active {
    transform: scale(0.95);
}

.feedback-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    pointer-events: none;
}

.feedback-button:active::before {
    width: 100px;
    height: 100px;
}

/* Success state animations */
.feedback-button.success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    transform: scale(1.05);
    animation: successPulse 0.6s ease-in-out;
}

.feedback-button.error {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
    transform: scale(1.05);
    animation: errorShake 0.6s ease-in-out;
}

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

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Loading state */
.feedback-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.feedback-button.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Feedback message animations */
.faq-feedback-message {
    animation: slideInRight 0.3s ease-out;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover effects */
.feedback-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===================================
   LIGHT MODE ENHANCEMENTS
   =================================== */

/* Feedback buttons in light mode */
[data-theme="light"] .feedback-button,
html[data-theme="light"] .feedback-button,
body[data-theme="light"] .feedback-button {
    background: var(--light-card-bg-solid) !important;
    border: 1px solid var(--light-border-default) !important;
    color: var(--light-text-secondary) !important;
    box-shadow: var(--light-shadow-sm) !important;
}

[data-theme="light"] .feedback-button:hover:not(:disabled),
html[data-theme="light"] .feedback-button:hover:not(:disabled),
body[data-theme="light"] .feedback-button:hover:not(:disabled) {
    border-color: var(--light-border-accent) !important;
    color: var(--light-accent-primary) !important;
    box-shadow: var(--light-shadow-md) !important;
}

/* Success state in light mode */
[data-theme="light"] .feedback-button.success,
html[data-theme="light"] .feedback-button.success,
body[data-theme="light"] .feedback-button.success {
    background: var(--light-success-bg) !important;
    border-color: var(--light-success-border) !important;
    color: var(--light-success-text) !important;
}

/* Error state in light mode */
[data-theme="light"] .feedback-button.error,
html[data-theme="light"] .feedback-button.error,
body[data-theme="light"] .feedback-button.error {
    background: var(--light-error-bg) !important;
    border-color: var(--light-error-border) !important;
    color: var(--light-error-text) !important;
}

/* FAQ feedback message in light mode */
[data-theme="light"] .faq-feedback-message,
html[data-theme="light"] .faq-feedback-message,
body[data-theme="light"] .faq-feedback-message {
    background: var(--light-card-bg-solid) !important;
    border: 1px solid var(--light-border-default) !important;
    box-shadow: var(--light-shadow-lg) !important;
    color: var(--light-text-primary) !important;
}

.feedback-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Form container animations */
.feedback-form {
    transition: opacity 0.3s ease;
}

.feedback-form.submitted {
    opacity: 0.8;
}

/* Count badge animations */
.feedback-count {
    animation: countBounce 0.5s ease-out;
}

@keyframes countBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .faq-feedback-message {
        backdrop-filter: blur(20px);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .feedback-button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .faq-feedback-message {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        transform: translateX(0);
    }
}

/* Accessibility improvements */
.feedback-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.feedback-button:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .feedback-button,
    .faq-feedback-message,
    .feedback-count {
        animation: none !important;
        transition: none !important;
    }
}

