/* ========================================
   Feedback Modal Styles
   Professional Feedback System
   ======================================== */

/* Overlay */
.feedback-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.feedback-overlay.show {
    display: flex;
}

/* Modal Container */
.feedback-modal {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.feedback-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.feedback-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.feedback-body {
    padding: 24px;
}

/* Form Group */
.feedback-form-group {
    margin-bottom: 24px;
}

.feedback-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.feedback-form-group .optional {
    color: #999;
    font-weight: normal;
    font-size: 12px;
}

/* Feedback Type Selection */
.feedback-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feedback-type-option {
    position: relative;
}

.feedback-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feedback-type-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.feedback-type-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.feedback-type-option input[type="radio"]:checked + .feedback-type-label {
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.feedback-type-label .emoji {
    font-size: 20px;
}

.feedback-type-label .text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Textarea */
.feedback-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    resize: vertical;
    transition: all 0.2s;
}

.feedback-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.feedback-textarea::placeholder {
    color: #999;
}

.char-count {
    font-size: 12px;
    color: #999;
    text-align: left;
    margin-top: 4px;
}

.char-count.error {
    color: #dc3545;
}

/* File Upload */
.feedback-file-upload {
    position: relative;
}

.feedback-file-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feedback-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8f9fa;
}

.feedback-file-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.feedback-file-label .icon {
    font-size: 20px;
}

.feedback-file-label .text {
    font-size: 14px;
    color: #666;
}

/* Image Preview */
.feedback-image-preview {
    display: none;
    margin-top: 12px;
    position: relative;
}

.feedback-image-preview.show {
    display: block;
}

.feedback-image-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.feedback-remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.feedback-remove-image:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Email Input */
.feedback-email-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.feedback-email-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Footer */
.feedback-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.feedback-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.feedback-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.feedback-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.feedback-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.feedback-btn-secondary {
    background: #e5e7eb;
    color: #666;
}

.feedback-btn-secondary:hover {
    background: #d1d5db;
}

/* Loading Spinner */
.feedback-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.feedback-message {
    display: none;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
}

.feedback-message.show {
    display: block;
}

.feedback-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer Button */
.footer-feedback-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    z-index: 1000;
}

.footer-feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .feedback-modal {
        max-height: 95vh;
        margin: 10px;
    }

    .feedback-header h2 {
        font-size: 20px;
    }

    .feedback-type-grid {
        grid-template-columns: 1fr;
    }

    .feedback-footer {
        flex-direction: column-reverse;
    }

    .feedback-btn {
        width: 100%;
    }

    .footer-feedback-btn {
        bottom: 10px;
        right: 10px;
        font-size: 13px;
        padding: 10px 16px;
    }
}
