/**
 * Unified Social Components CSS
 * Reusable styles for reactions, comments, shares across all pages
 */

/* ============================================
   CATCH DETAIL SPECIFIC STYLES
   ============================================ */

.catch-detail {
  max-width: 800px;
  margin: var(--spacing-xl) auto;
}

.catch-detail .post-header {
  padding: var(--spacing-lg) var(--spacing-xl);
  background: var(--lunker-cream-light);
  border-bottom: 1px solid var(--lunker-cream);
}

.catch-detail .image-wrapper {
  background: var(--lunker-cream-light);
  padding: var(--spacing-md);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catch-detail .image-wrapper.no-image {
  flex-direction: column;
  color: var(--text-secondary);
  gap: var(--spacing-md);
}

.catch-detail .image-wrapper.no-image i {
  font-size: 3rem;
  color: var(--lunker-primary);
}

.catch-detail .catch-image {
  max-height: 600px;
  object-fit: contain;
}

/* ============================================
   DETAILS TABLES SECTION
   ============================================ */

.catch-details-section {
  padding: var(--spacing-xl);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-xl);
}

.detail-card {
  background: var(--card-background);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-light);
}

.detail-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--lunker-primary);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--lunker-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.detail-card h3 i {
  font-size: 1.2rem;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.details-table th,
.details-table td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.details-table th {
  font-weight: 600;
  color: var(--lunker-primary);
  background: var(--lunker-light);
  width: 40%;
}

.details-table td {
  color: var(--text-primary);
}

.details-table tr:last-child th,
.details-table tr:last-child td {
  border-bottom: none;
}

.details-table a {
  color: var(--lunker-primary);
  text-decoration: none;
  font-weight: 500;
}

.details-table a:hover {
  text-decoration: underline;
}

/* ============================================
   UNIFIED COMMENT STYLES
   ============================================ */

.unified-comments-container,
.feed-comments {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--card-background);
  border-radius: var(--border-radius);
  max-height: 600px;
  overflow-y: auto;
}

.uc-comment {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  transition: background-color var(--transition-fast);
}

.uc-comment:hover {
  background-color: var(--lunker-hover);
}

.uc-comment.uc-reply {
  margin-left: 48px;
  padding-left: var(--spacing-md);
  border-left: 2px solid var(--border-light);
}

.uc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--lunker-cream);
}

.uc-content {
  flex: 1;
  min-width: 0;
}

.uc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xs);
}

.uc-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.uc-username {
  font-weight: 600;
  color: var(--lunker-primary);
  text-decoration: none;
  font-size: 0.95rem;
}

.uc-username:hover {
  text-decoration: underline;
}

.uc-follow-btn {
  font-size: 0.75rem;
  padding: 2px 8px;
  background: var(--lunker-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.uc-follow-btn.following {
  background: transparent;
  color: var(--lunker-primary);
  border: 1px solid var(--lunker-primary);
}

.uc-follow-btn:hover {
  opacity: 0.8;
}

.uc-time {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.uc-body {
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  word-break: break-word;
  line-height: 1.5;
}

.uc-reply-tag {
  color: var(--lunker-primary);
  font-weight: 500;
}

.uc-actions {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.uc-react-btn,
.uc-reply-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.uc-react-btn:hover,
.uc-reply-btn:hover {
  background: var(--lunker-hover);
  color: var(--lunker-primary);
}

.uc-react-btn.reacted {
  color: var(--lunker-primary);
  font-weight: 600;
}

.uc-reaction-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: var(--spacing-sm);
}

.uc-reaction-emojis {
  display: flex;
  gap: 2px;
}

.uc-reaction-emoji-small {
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.uc-reaction-emoji-small:hover {
  transform: scale(1.2);
}

.uc-reaction-count-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.uc-reaction-count-text:hover {
  text-decoration: underline;
}

.uc-reply-form {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: var(--lunker-cream-light);
  border-radius: var(--border-radius);
}

.uc-reply-input {
  flex: 1;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-pill);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 0.9rem;
}

.uc-reply-submit {
  background: var(--lunker-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius-pill);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.uc-reply-submit:hover {
  background: var(--lunker-secondary);
}

.uc-menu {
  position: relative;
}

.uc-menu-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
}

.uc-menu-btn:hover {
  background: var(--lunker-hover);
}

.uc-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  min-width: 120px;
  display: none;
  z-index: 1000;
}

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

.uc-delete-btn {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  transition: background var(--transition-fast);
}

.uc-delete-btn:hover {
  background: var(--lunker-hover);
}

.uc-no-comments {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-secondary);
}

.uc-no-comments i {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  color: var(--lunker-primary);
}

/* ============================================
   REACTION PICKER STYLES
   ============================================ */

.clean-reaction-picker,
.uc-reaction-picker {
  position: absolute;
  background: white;
  border-radius: 25px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 8px 12px;
  display: flex;
  gap: 4px;
  z-index: 1200;
  border: 1px solid rgba(0, 0, 0, 0.1);
  animation: pickerFadeIn 0.2s ease-out;
}

@keyframes pickerFadeIn {
  from { 
    opacity: 0; 
    transform: translateY(8px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.clean-reaction-picker button,
.uc-reaction-picker button {
  font-size: 1.5rem;
  background: none;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.clean-reaction-picker button:hover,
.uc-reaction-picker button:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.15);
}

/* ============================================
   SHARE SECTION STYLES
   ============================================ */

.share-section {
  background: var(--card-background);
  border-top: 1px solid var(--border-light);
  padding: var(--spacing-md) var(--spacing-xl);
}

.share-actions {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.share-action-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.share-action-btn:hover {
  background: var(--lunker-hover);
  color: var(--lunker-primary);
}

.share-action-btn i {
  font-size: 1.1em;
}

/* ============================================
   BOOKMARK BUTTON STYLES
   ============================================ */

.bookmark-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  font-weight: 500;
  font-size: 0.9rem;
}

.bookmark-btn:hover {
  background: var(--lunker-hover);
  color: var(--lunker-primary);
}

.bookmark-btn.bookmarked {
  color: var(--lunker-primary);
}

.bookmark-btn.bookmarked i {
  color: var(--lunker-primary);
}

/* ============================================
   REACTION MODAL STYLES
   ============================================ */

.reaction-modal,
.comment-reaction-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.2s ease;
}

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

.reaction-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { 
    opacity: 0; 
    transform: translateY(-20px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.reaction-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f9fa;
}

.reaction-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1c1e21;
  margin: 0;
}

.reaction-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #65676b;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.reaction-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.reaction-tabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e5e5;
  overflow-x: auto;
}

.reaction-tab {
  background: none;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #65676b;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  min-width: max-content;
}

.reaction-tab.active {
  color: #1877f2;
  border-bottom-color: #1877f2;
  background: rgba(24, 119, 242, 0.1);
}

.reaction-tab:hover:not(.active) {
  background: rgba(0, 0, 0, 0.05);
}

.reaction-users-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 0;
}

.reaction-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  transition: background 0.2s ease;
  cursor: pointer;
}

.reaction-user-item:hover {
  background: #f8f9fa;
}

.reaction-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e5e5e5;
}

.reaction-user-info {
  flex: 1;
  min-width: 0;
}

.reaction-user-name {
  font-weight: 600;
  color: #1c1e21;
  font-size: 0.95rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reaction-user-username {
  color: #65676b;
  font-size: 0.85rem;
  margin: 0;
}

.reaction-user-emoji {
  font-size: 1.2rem;
  opacity: 0.8;
}

.reaction-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #65676b;
}

.reaction-loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e5e5;
  border-top: 2px solid #1877f2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 12px;
}

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

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

@media (max-width: 768px) {
  .catch-details-section {
    grid-template-columns: 1fr;
    padding: var(--spacing-md);
  }
  
  .detail-card {
    padding: var(--spacing-md);
  }
  
  .uc-comment.uc-reply {
    margin-left: 24px;
  }
  
  .share-actions {
    justify-content: space-around;
  }
}

@media (max-width: 480px) {
  .catch-detail {
    margin: var(--spacing-md) var(--spacing-sm);
  }
  
  .catch-details-section {
    padding: var(--spacing-sm);
    gap: var(--spacing-md);
  }
  
  .details-table {
    font-size: 0.85rem;
  }
  
  .details-table th,
  .details-table td {
    padding: var(--spacing-xs) var(--spacing-sm);
  }
  
  .uc-comment {
    padding: var(--spacing-sm);
  }
  
  .uc-comment.uc-reply {
    margin-left: 16px;
    padding-left: var(--spacing-sm);
  }
}
