/**
 * Feedback System Styles
 */

/* ==================== FEEDBACK WIDGET ==================== */

.feedback-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin: 2rem 0;
}

.feedback-widget h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.feedback-widget p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    opacity: 0.95;
}

.feedback-widget-button {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.feedback-widget-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* ==================== FEEDBACK MODAL ==================== */

.feedback-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.feedback-modal-backdrop.hidden {
    display: none;
}

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

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

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

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

.feedback-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
}

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

.feedback-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.feedback-form {
    padding: 1.5rem;
}

.feedback-form .form-group {
    margin-bottom: 1.2rem;
}

.feedback-form .form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.feedback-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.95rem;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

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

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

.feedback-form small {
    display: block;
    margin-top: 0.4rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    flex: 1;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

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

#feedback-message-container {
    padding: 1.5rem;
}

#feedback-message-container.hidden {
    display: none;
}

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

/* ==================== ALERTS ==================== */

.alert {
    border-left: 4px solid;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert strong {
    display: block;
    margin-bottom: 0.5rem;
}

.alert p {
    margin: 0;
}

.alert-success {
    border-color: #10b981;
    background: #f0fdf4;
    color: #065f46;
}

.alert-danger {
    border-color: #dc2626;
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1e40af;
}

.alert-warning {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

/* ==================== SPINNER ==================== */

.spinner-small {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
}

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

/* ==================== RESPONSIVE ==================== */

@media (max-width: 640px) {
    .feedback-widget {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .feedback-widget h3 {
        font-size: 1rem;
    }

    .feedback-modal {
        max-width: 95vw;
    }

    .feedback-modal-header {
        padding: 1rem;
    }

    .feedback-form {
        padding: 1rem;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        flex: none;
    }
}
