/**
 * ╔═══════════════════════════════════════════════════════════════╗
 * ║  DigiSchool Africa — Social Engagement Styles                 ║
 * ║  Likes/Dislikes | Share Buttons | Top Badge | B2C Only        ║
 * ╚═══════════════════════════════════════════════════════════════╝
 */

/* ============================================================ */
/* SOCIAL ACTIONS BAR */
/* ============================================================ */
.ds-social-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-top: 1px solid #e6eef7;
  border-radius: 0 0 12px 12px;
  margin-top: auto;
}

.ds-social-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-like-btn,
.ds-dislike-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: white;
  border: 1px solid #dfe3e8;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.ds-like-btn:hover {
  border-color: #1E88E5;
  color: #1E88E5;
  background: #E3F2FD;
}

.ds-like-btn.active {
  background: #1E88E5;
  border-color: #1E88E5;
  color: white;
}

.ds-dislike-btn:hover {
  border-color: #999;
  background: #f5f5f5;
}

.ds-dislike-btn.active {
  background: #666;
  border-color: #666;
  color: white;
}

.ds-like-btn .icon,
.ds-dislike-btn .icon {
  font-size: 16px;
  line-height: 1;
}

.ds-like-btn .counter,
.ds-dislike-btn .counter {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* ============================================================ */
/* SHARE BUTTON */
/* ============================================================ */
.ds-share-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: white;
  border: 1px solid #26A69A;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #26A69A;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ds-share-btn:hover {
  background: #26A69A;
  color: white;
}

.ds-share-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============================================================ */
/* SHARE MENU */
/* ============================================================ */
.ds-share-menu {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  background: white;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 8px;
  min-width: 180px;
  z-index: 1000;
  animation: slideUp 0.2s ease;
}

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

.share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
}

.share-option:hover {
  background: #f5f5f5;
}

.share-option svg {
  flex-shrink: 0;
}

/* ============================================================ */
/* TOP BADGE */
/* ============================================================ */
.ds-top-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: white;
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
  z-index: 10;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.ds-top-badge .badge-icon {
  font-size: 16px;
  line-height: 1;
}

/* ============================================================ */
/* TOAST NOTIFICATION */
/* ============================================================ */
.ds-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  background: #333;
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
}

.ds-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================ */
/* TOP 3 SECTION (Homepage) */
/* ============================================================ */
.ds-top3-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e6eef7 100%);
}

.ds-top3-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.ds-top3-header {
  text-align: center;
  margin-bottom: 48px;
}

.ds-top3-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.ds-top3-header .subtitle {
  font-size: 18px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

.ds-top3-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.ds-top3-card {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ds-top3-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.ds-top3-card .rank {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: white;
  font-size: 20px;
  font-weight: 700;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.ds-top3-card .course-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 48px 0 12px 0;
  line-height: 1.3;
}

.ds-top3-card .course-level {
  display: inline-block;
  padding: 4px 12px;
  background: #E3F2FD;
  color: #1E88E5;
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
  margin-bottom: 12px;
}

.ds-top3-card .course-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.ds-top3-card .stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666;
}

.ds-top3-card .stat .icon {
  font-size: 18px;
}

.ds-top3-card .cta-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: #1E88E5;
  color: white;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
  margin-top: 16px;
}

.ds-top3-card .cta-btn:hover {
  background: #1565C0;
}

/* ============================================================ */
/* RESPONSIVE */
/* ============================================================ */
@media (max-width: 768px) {
  .ds-social-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .ds-social-left {
    justify-content: center;
  }
  
  .ds-share-menu {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .ds-top3-header h2 {
    font-size: 28px;
  }
  
  .ds-top3-grid {
    grid-template-columns: 1fr;
  }
}
