/* Comment System Styles for SCUI Website */

/* Connection Status */
.connection-status {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.9em;
  margin-bottom: 20px;
  text-align: center;
}

.connection-status.online {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.connection-status.offline {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* Comments Container */
.comments {
  margin-top: 40px;
}

.comments-count {
  color: #333;
  font-size: 1.5rem;
  margin-bottom: 30px;
  font-weight: 600;
}

/* Comments List */
.comments-list {
  margin-bottom: 40px;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
}

.no-comments {
  text-align: center;
  padding: 30px;
  color: #666;
  font-style: italic;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.error {
  text-align: center;
  padding: 20px;
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

/* Individual Comment */
.comment {
  display: flex;
  margin-bottom: 30px;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #e9ecef;
  transition: box-shadow 0.3s ease;
}

.comment:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.comment-avatar {
  flex-shrink: 0;
  margin-right: 15px;
}

.comment-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e9ecef;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comment-author {
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.comment-date {
  color: #666;
  font-size: 0.9rem;
}

.comment-text {
  color: #555;
  line-height: 1.6;
  margin: 0;
  word-wrap: break-word;
}

/* Comment Form */
.reply-form {
  background-color: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.reply-form h4 {
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}

.reply-form p {
  color: #666;
  margin-bottom: 25px;
  font-size: 0.9rem;
}

/* Form Messages */
.form-message {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: 500;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.form-message.warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.form-message.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Form Fields */
.form-group {
  margin-bottom: 20px;
}

.form-control {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px 15px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
  outline: none;
}

.form-control.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220,53,69,0.25);
}

/* Field Validation */
.error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 5px;
  display: block;
}

/* Submit Button */
.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .comment {
    padding: 1rem;
  }
  
  .comment .d-flex {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .comment-img {
    align-self: flex-start;
  }
  
  .reply-form {
    padding: 1.5rem;
  }
  
  .reply-form .row .col-md-6 {
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .comment-img img {
    width: 40px;
    height: 40px;
  }
  
  .comment-content h5 {
    font-size: 1rem;
  }
  
  .reply-form {
    padding: 1rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .comment {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .comment:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .reply-form {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .no-comments {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
}