/* Feedback Widget - Minimal & Non-intrusive */

.feedback-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    font-family: inherit;
}

.feedback-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.feedback-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

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

.feedback-button svg {
    width: 24px;
    height: 24px;
}

/* Feedback Modal */
.feedback-modal {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: var(--bg-primary, white);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid var(--border, #e5e7eb);
}

.feedback-modal.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.feedback-header {
    padding: 20px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary, #f9fafb);
}

.feedback-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary, #111827);
}

.feedback-close {
    background: none;
    border: none;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.feedback-close:hover {
    background: var(--bg-tertiary, #f3f4f6);
    color: var(--text-primary, #111827);
}

.feedback-body {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.feedback-description {
    margin: 0 0 16px 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.5;
}

.feedback-form-group {
    margin-bottom: 16px;
}

.feedback-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary, #111827);
}

.feedback-input,
.feedback-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-primary, #111827);
    background: var(--bg-primary, white);
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.feedback-input:focus,
.feedback-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.feedback-textarea {
    resize: vertical;
    min-height: 100px;
}

.feedback-char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-tertiary, #9ca3af);
    margin-top: 4px;
}

.feedback-error,
.feedback-success {
    padding: 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.feedback-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.feedback-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.feedback-error.hidden,
.feedback-success.hidden {
    display: none;
}

.feedback-submit {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.feedback-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.feedback-submit:active {
    transform: translateY(0);
}

.feedback-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.feedback-loading {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.feedback-loading.hidden {
    display: none;
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .feedback-modal {
        background: #1f2937;
        border-color: #374151;
    }
    
    .feedback-header {
        background: #111827;
        border-color: #374151;
    }
    
    .feedback-header h3 {
        color: #f9fafb;
    }
    
    .feedback-close {
        color: #9ca3af;
    }
    
    .feedback-close:hover {
        background: #374151;
        color: #f9fafb;
    }
    
    .feedback-description {
        color: #d1d5db;
    }
    
    .feedback-label {
        color: #f3f4f6;
    }
    
    .feedback-input,
    .feedback-textarea {
        background: #111827;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .feedback-char-count {
        color: #6b7280;
    }
    
    .feedback-error {
        background: #7f1d1d;
        color: #fca5a5;
        border-color: #991b1b;
    }
    
    .feedback-success {
        background: #14532d;
        color: #86efac;
        border-color: #166534;
    }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .feedback-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .feedback-button {
        width: 52px;
        height: 52px;
    }
    
    .feedback-modal {
        width: calc(100vw - 32px);
        right: 0;
        bottom: 68px;
    }
    
    .feedback-body {
        max-height: 400px;
    }
}

/* Ensure widget doesn't interfere with other UI elements */
.feedback-widget {
    isolation: isolate;
}

