/* Floating Feedback Widget Styles */
.feedback-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.feedback-trigger {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.feedback-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Modal Styles */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.feedback-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.feedback-modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.feedback-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.feedback-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.feedback-modal-body {
    padding: 24px;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feedback-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feedback-form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.feedback-form-input,
.feedback-form-select,
.feedback-form-textarea {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.feedback-form-input:focus,
.feedback-form-select:focus,
.feedback-form-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.feedback-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.feedback-screenshot-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-screenshot-area:hover {
    border-color: #6366f1;
    background: #f8faff;
}

.feedback-screenshot-area.dragover {
    border-color: #6366f1;
    background: #f0f4ff;
}

.feedback-screenshot-input {
    display: none;
}

.feedback-screenshot-text {
    color: #6b7280;
    font-size: 14px;
}

.feedback-screenshot-preview {
    margin-top: 12px;
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feedback-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.feedback-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.feedback-btn-primary {
    background: #6366f1;
    color: white;
}

.feedback-btn-primary:hover {
    background: #5b5ac7;
}

.feedback-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.feedback-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.feedback-btn-secondary:hover {
    background: #e5e7eb;
}

/* Success Message */
.feedback-success {
    text-align: center;
    padding: 40px 24px;
}

.feedback-success-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    fill: #10b981;
}

.feedback-success-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.feedback-success-text {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* Loading State */
.feedback-loading {
    pointer-events: none;
    opacity: 0.7;
}

.feedback-loading .feedback-btn-primary {
    position: relative;
}

.feedback-loading .feedback-btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .feedback-widget {
        bottom: 10px;
        right: 10px;
    }
    
    .feedback-trigger {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .feedback-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .feedback-form-row {
        grid-template-columns: 1fr;
    }
    
    .feedback-form-actions {
        flex-direction: column;
    }
    
    .feedback-btn {
        width: 100%;
    }
}

/* Dark theme support */
[data-theme="dark"] .feedback-modal-content,
[data-bs-theme="dark"] .feedback-modal-content {
    background: #1f2937;
    color: #f9fafb;
}

[data-theme="dark"] .feedback-modal-header,
[data-bs-theme="dark"] .feedback-modal-header {
    border-bottom-color: #374151;
}

[data-theme="dark"] .feedback-modal-title,
[data-bs-theme="dark"] .feedback-modal-title {
    color: #f9fafb;
}

[data-theme="dark"] .feedback-form-label,
[data-bs-theme="dark"] .feedback-form-label {
    color: #d1d5db;
}

[data-theme="dark"] .feedback-form-input,
[data-theme="dark"] .feedback-form-select,
[data-theme="dark"] .feedback-form-textarea,
[data-bs-theme="dark"] .feedback-form-input,
[data-bs-theme="dark"] .feedback-form-select,
[data-bs-theme="dark"] .feedback-form-textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] .feedback-form-input:focus,
[data-theme="dark"] .feedback-form-select:focus,
[data-theme="dark"] .feedback-form-textarea:focus,
[data-bs-theme="dark"] .feedback-form-input:focus,
[data-bs-theme="dark"] .feedback-form-select:focus,
[data-bs-theme="dark"] .feedback-form-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .feedback-screenshot-area,
[data-bs-theme="dark"] .feedback-screenshot-area {
    border-color: #4b5563;
    background: #374151;
}

[data-theme="dark"] .feedback-screenshot-area:hover,
[data-bs-theme="dark"] .feedback-screenshot-area:hover {
    border-color: #6366f1;
    background: #1e3a8a;
}

[data-theme="dark"] .feedback-screenshot-text,
[data-bs-theme="dark"] .feedback-screenshot-text {
    color: #9ca3af;
}

[data-theme="dark"] .feedback-btn-secondary,
[data-bs-theme="dark"] .feedback-btn-secondary {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

[data-theme="dark"] .feedback-btn-secondary:hover,
[data-bs-theme="dark"] .feedback-btn-secondary:hover {
    background: #4b5563;
}

[data-theme="dark"] .feedback-success-title,
[data-bs-theme="dark"] .feedback-success-title {
    color: #f9fafb;
}

[data-theme="dark"] .feedback-success-text,
[data-bs-theme="dark"] .feedback-success-text {
    color: #9ca3af;
}