/* ========================================
   FEEDBACK WIDGET
   ======================================== */

/* Floating Trigger Button */
.feedback-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transition: var(--transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

[dir="rtl"] .feedback-trigger {
    right: auto;
    left: 2rem;
}

.feedback-trigger:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 30px rgba(59, 130, 246, 0.6);
}

.feedback-trigger:active {
    transform: translateY(-2px) scale(1.02);
}

/* Modal Overlay */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.feedback-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal Content */
.feedback-content {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-glass);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.feedback-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

[dir="rtl"] .feedback-close {
    right: auto;
    left: 1rem;
}

.feedback-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Form Title */
.feedback-content h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Rating Buttons */
.rating-group {
    margin-bottom: 1.5rem;
}

.rating-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-main);
}

.rating-buttons {
    display: flex;
    gap: 1rem;
}

.rating-btn {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.rating-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.rating-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.rating-btn.thumbs-up.active {
    border-color: var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, 0.2);
}

.rating-btn.thumbs-down.active {
    border-color: var(--error);
    color: var(--error);
    background: rgba(239, 68, 68, 0.2);
}

/* Suggestions Textarea */
.feedback-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feedback-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.feedback-textarea::placeholder {
    color: var(--text-muted);
}

/* Premium Checkbox */
.premium-group {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
}

.premium-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

.premium-label {
    color: var(--text-main);
    cursor: pointer;
    flex: 1;
    font-size: 0.95rem;
}

/* Submit Button */
.feedback-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.feedback-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.feedback-submit:active {
    transform: translateY(0);
}

.feedback-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Success/Error Toast */
.feedback-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-glass);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-glass);
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
}

.feedback-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.feedback-toast.success {
    border-color: var(--success);
    color: var(--success);
}

.feedback-toast.error {
    border-color: var(--error);
    color: var(--error);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .feedback-trigger {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    [dir="rtl"] .feedback-trigger {
        right: auto;
        left: 1rem;
    }

    .feedback-content {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .rating-buttons {
        flex-direction: column;
    }

    .feedback-content h3 {
        font-size: 1.25rem;
    }
}