/* Product Questions Frontend Styles */

.product-questions-manager {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.manager-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.manager-header h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
}

.manager-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.manager-filters select,
.manager-filters button {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.manager-filters select {
    min-width: 150px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #0073aa;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.questions-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.questions-list {
    min-height: 200px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.question-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.question-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.question-meta {
    flex: 1;
}

.customer-name {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.question-date {
    font-size: 12px;
    color: #999;
    margin-right: 15px;
}

.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status.answered {
    background: #d4edda;
    color: #155724;
}

.status.pending {
    background: #fff3cd;
    color: #856404;
}

.question-actions {
    display: flex;
    gap: 10px;
}

.question-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

.question-content p {
    margin-bottom: 10px;
}

.question-content strong {
    color: #333;
}

.response-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #0073aa;
}

.response-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.response-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
}

.response-actions {
    display: flex;
    gap: 10px;
}

.no-questions {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Dashboard Styles */
.product-questions-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.product-questions-dashboard h3 {
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.dashboard-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    flex: 1;
    min-width: 150px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card .stat-number {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-questions {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recent-questions h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.recent-questions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recent-question-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.question-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.question-info strong {
    color: #333;
    font-size: 14px;
}

.question-date {
    font-size: 12px;
    color: #999;
}

.question-preview {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.product-name {
    color: #0073aa;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-questions-manager,
    .product-questions-dashboard {
        padding: 15px;
    }
    
    .manager-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .manager-filters select,
    .manager-filters button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .questions-stats,
    .dashboard-stats {
        flex-direction: column;
    }
    
    .question-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .question-actions {
        margin-top: 10px;
        justify-content: flex-start;
    }
    
    .response-actions {
        flex-direction: column;
    }
    
    .response-actions .btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Animation */
.question-item {
    animation: fadeInUp 0.3s ease-out;
}

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

/* Loading Animation */
.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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