/**
 * Tomorrow's Heroes — Activity Tracker & Analytics Dashboard Styles
 */

/* ==========================================================================
   PARENT ANALYTICS DASHBOARD TAB
   ========================================================================== */
.parent-analytics-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  direction: rtl;
  font-family: var(--font-kids, 'Cairo', 'Tajawal', sans-serif);
}

/* 1. LAST SEEN LOCATION BANNER */
.analytics-last-location-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(30, 27, 75, 0.25);
  border: 2px solid #6366f1;
  flex-wrap: wrap;
  gap: 16px;
}

.last-loc-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.last-loc-icon-pulse {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.3);
  border: 2px solid #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  animation: radarPulse 2s infinite ease-in-out;
}
@keyframes radarPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.6); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(129, 140, 248, 0); }
}

.last-loc-info h3 {
  margin: 0;
  font-size: 14px;
  color: #c7d2fe;
  font-weight: 800;
}
.last-loc-title {
  margin: 4px 0 2px;
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
}
.last-loc-time {
  font-size: 13px;
  color: #a5b4fc;
  font-weight: 700;
}

.btn-resume-last-page {
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}
.btn-resume-last-page:hover {
  background: #059669;
  transform: translateY(-2px);
}

/* 2. KPI METRICS CARDS GRID */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.analytics-kpi-card {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.analytics-kpi-card:hover {
  transform: translateY(-3px);
  border-color: #6366f1;
}

.kpi-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.kpi-val {
  font-size: 26px;
  font-weight: 900;
  color: #1f2937;
  font-family: var(--font-kids, 'Outfit', sans-serif);
}
.kpi-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 800;
  margin-top: 4px;
}

/* 3. TIMELINE FEED & CONTROLS */
.analytics-timeline-section {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.timeline-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.timeline-title-wrap h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #1f2937;
}
.timeline-title-wrap p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

.timeline-actions-row {
  display: flex;
  gap: 10px;
}

.btn-export-analytics {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  color: #374151;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-export-analytics:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* Timeline List */
.analytics-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-left: 8px;
  scrollbar-width: thin;
}
.analytics-timeline-list::-webkit-scrollbar {
  width: 6px;
}
.analytics-timeline-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.timeline-event-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.timeline-event-item:hover {
  background: #f1f5f9;
  transform: translateX(-4px);
}

.event-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.event-content {
  flex: 1;
}
.event-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: #1e293b;
}
.event-meta {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
  margin-top: 2px;
}

.event-time-stamp {
  font-size: 12px;
  font-weight: 800;
  color: #6366f1;
  background: #eef2ff;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.timeline-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}
.timeline-empty-state span {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

/* ==========================================================================
   SMART RESUME BANNER IN HOME VIEW
   ========================================================================== */
.smart-resume-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 18px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
  animation: slideDownFade 0.4s ease;
}
@keyframes slideDownFade {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.resume-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #78350f;
}
.resume-banner-content strong {
  font-size: 15px;
  font-weight: 900;
}
.resume-banner-content p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.resume-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-banner-resume {
  background: #d97706;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-banner-resume:hover {
  background: #b45309;
}
.btn-banner-dismiss {
  background: none;
  border: none;
  font-size: 16px;
  color: #92400e;
  cursor: pointer;
  padding: 4px 8px;
}

/* Responsive */
@media (max-width: 800px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .analytics-last-location-card {
    flex-direction: column;
    text-align: center;
  }
  .last-loc-header {
    flex-direction: column;
  }
}
