/* Smart Content Optimizer — Similar Posts Popup */

.sco-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 300px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  pointer-events: none;
}

.sco-popup.sco-popup--left {
  right: auto;
  left: 24px;
}

.sco-popup.sco-popup--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.sco-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
}

.sco-popup__title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sco-popup__title-icon {
  font-size: 15px;
}

.sco-popup__close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 16px;
  line-height: 1;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.sco-popup__close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Loading */
.sco-popup__loading {
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

.sco-popup__loading::before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid #e5e7eb;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: sco-spin 0.7s linear infinite;
  margin: 0 auto 8px;
}

@keyframes sco-spin {
  to { transform: rotate(360deg); }
}

/* Posts list */
.sco-popup__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Post item */
.sco-popup__item {
  border-bottom: 1px solid #f3f4f6;
}

.sco-popup__item:last-child {
  border-bottom: none;
}

.sco-popup__item a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.sco-popup__item a:hover {
  background: #f9fafb;
}

/* Thumbnail */
.sco-popup__thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e0e7ff, #ddd6fe);
  flex-shrink: 0;
  object-fit: cover;
}

/* Text */
.sco-popup__post-text {
  flex: 1;
  min-width: 0;
}

.sco-popup__post-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sco-popup__item a:hover .sco-popup__post-title {
  color: #4f46e5;
}

.sco-popup__post-meta {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 3px;
}

/* Arrow */
.sco-popup__arrow {
  color: #d1d5db;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.sco-popup__item a:hover .sco-popup__arrow {
  transform: translateX(3px);
  color: #4f46e5;
}

/* Empty state */
.sco-popup__empty {
  padding: 20px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}
