/* Character Posts Feed */
.posts-feed {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s;
}

.post-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.post-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid #ecf0f1;
  margin-bottom: 1rem;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.post-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: visible;
  position: relative;
  flex-shrink: 0;
}

.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.post-avatar .character-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.post-avatar .character-badge svg {
  width: 12px;
  height: 12px;
}

.post-author-info {
  display: flex;
  flex-direction: column;
}

.post-author-name {
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e50;
}

.post-author-profession {
  font-size: 0.85rem;
  color: #7f8c8d;
}

.post-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #2c3e50;
}

.post-text {
  position: relative;
  white-space: normal;
}

.show-more-btn:hover {
  color: #2980b9;
  text-decoration: underline;
}

.post-time {
  font-size: 0.8rem;
  color: #95a5a6;
}

/* Post Footer */
.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ecf0f1;
}

.post-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.post-likes-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c3e50;
  padding: 0 0.5rem;
}

.post-likes-count .likes-number {
  display: inline-block;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #ddd;
  background: white;
  color: #7f8c8d;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  flex: 1;
  justify-content: center;
}

.post-action-btn:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #3498db;
  color: #3498db;
}

.post-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.post-action-btn svg {
  flex-shrink: 0;
}

.like-btn.active {
  background: #e8f5e9;
  border-color: #27ae60;
  color: #27ae60;
}

.like-btn.active svg {
  fill: #27ae60;
}

.dislike-btn.active {
  background: #ffebee;
  border-color: #e74c3c;
  color: #e74c3c;
}

.dislike-btn.active svg {
  fill: #e74c3c;
}

.chat-btn {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.chat-btn:hover {
  background: #2980b9;
  border-color: #2980b9;
  color: white;
}

.chat-btn span {
  display: inline-block !important;
}

.no-posts {
  text-align: center;
  color: #7f8c8d;
  padding: 3rem;
  background: white;
  border-radius: 12px;
}

/* Loading Indicator */
.loading-indicator {
  text-align: center;
  padding: 2rem;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 4px solid #ecf0f1;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-indicator p {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.end-message {
  text-align: center;
  padding: 2rem;
  color: #95a5a6;
  font-size: 0.9rem;
}

/* Post Image */
.post-image {
  margin: 1rem -1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

/* Admin Controls */
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ecf0f1;
  margin-bottom: 1rem;
}

.post-admin-controls {
  position: relative;
  flex-shrink: 0;
}

.post-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #95a5a6;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.post-menu-btn:hover {
  background: #f8f9fa;
  color: #2c3e50;
}

.post-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 140px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.post-menu-dropdown.show {
  display: block;
}

.post-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: #2c3e50;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: left;
}

.post-menu-item:hover {
  background: #f8f9fa;
}

.post-menu-item.delete-post-btn:hover {
  background: #fee;
  color: #e74c3c;
}

.post-menu-item svg {
  flex-shrink: 0;
}

/* Modal Styles for Post Moderation */
.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  background-color: white;
  font-family: inherit;
  resize: vertical;
}

.form-control:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.delete-confirmation {
  text-align: center;
  padding: 1rem;
}

.warning-icon {
  margin: 0 auto 1rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(231, 76, 60, 0.1);
}

.delete-confirmation h3 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.delete-confirmation p {
  color: #7f8c8d;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .posts-feed {
    gap: 1rem;
  }
  
  .post-card {
    padding: 1rem;
  }

  .post-action-btn span {
    display: none;
  }

  .post-action-btn {
    padding: 0.5rem;
  }

  .post-likes-count {
    min-width: 40px;
  }

  .post-menu-dropdown {
    right: -10px;
  }
}
