/* TeDaCo Analytics Dashboard (Admin Only) */
.analytics-dashboard {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 300px;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border: 1px solid rgba(63, 205, 199, 0.3);
  border-radius: 15px;
  padding: 1rem;
  z-index: 9999;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.analytics-dashboard.show {
  display: block;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(63, 205, 199, 0.2);
}

.analytics-header h3 {
  color: #3fcdc7;
  margin: 0;
  font-size: 1.2rem;
}

.analytics-toggle {
  background: none;
  border: none;
  color: #cccccc;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.analytics-toggle:hover {
  color: #3fcdc7;
}

.analytics-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.analytics-metric:last-child {
  border-bottom: none;
}

.metric-label {
  color: #cccccc;
  font-size: 0.9rem;
}

.metric-value {
  color: #3fcdc7;
  font-weight: bold;
  font-size: 1.1rem;
}

.metric-trend {
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.metric-trend.up {
  color: #41cf2e;
}

.metric-trend.down {
  color: #ff689b;
}

.analytics-chart {
  height: 100px;
  background: rgba(63, 205, 199, 0.1);
  border-radius: 5px;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}

.chart-bar {
  position: absolute;
  bottom: 0;
  background: linear-gradient(180deg, #3fcdc7, #e98e06);
  border-radius: 2px 2px 0 0;
  transition: height 0.3s ease;
}

.analytics-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.analytics-btn {
  flex: 1;
  padding: 0.5rem;
  background: linear-gradient(45deg, #3fcdc7, #e98e06);
  color: #1a1a1a;
  border: none;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.analytics-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(63, 205, 199, 0.3);
}

/* Real-time Activity Feed */
.activity-feed {
  max-height: 150px;
  overflow-y: auto;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(63, 205, 199, 0.2);
}

.activity-item {
  display: flex;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.8rem;
  color: #cccccc;
}

.activity-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.activity-icon.view {
  background: rgba(63, 205, 199, 0.2);
  color: #3fcdc7;
}

.activity-icon.click {
  background: rgba(233, 142, 6, 0.2);
  color: #e98e06;
}

.activity-icon.contact {
  background: rgba(255, 104, 155, 0.2);
  color: #ff689b;
}

.activity-time {
  margin-left: auto;
  font-size: 0.7rem;
  color: #888;
}

/* Heatmap Overlay Toggle */
.heatmap-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, #3fcdc7, #e98e06);
  border: none;
  border-radius: 50%;
  color: #1a1a1a;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 9998;
}

.heatmap-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(63, 205, 199, 0.4);
}

/* Performance Metrics */
.performance-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
}

.performance-metric {
  background: rgba(63, 205, 199, 0.1);
  padding: 0.5rem;
  border-radius: 5px;
  text-align: center;
}

.performance-metric .value {
  display: block;
  font-size: 1.2rem;
  font-weight: bold;
  color: #3fcdc7;
}

.performance-metric .label {
  font-size: 0.7rem;
  color: #cccccc;
  text-transform: uppercase;
}

/* Conversion Funnel */
.conversion-funnel {
  margin: 1rem 0;
}

.funnel-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  position: relative;
}

.funnel-step::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  background: #3fcdc7;
  border-radius: 50%;
  transform: translateY(-50%);
}

.funnel-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 100%;
  width: 2px;
  height: 20px;
  background: rgba(63, 205, 199, 0.3);
}

.funnel-label {
  margin-left: 1rem;
  font-size: 0.8rem;
  color: #cccccc;
}

.funnel-value {
  font-weight: bold;
  color: #3fcdc7;
}

.funnel-rate {
  font-size: 0.7rem;
  color: #888;
  margin-left: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .analytics-dashboard {
    width: calc(100vw - 40px);
    right: 20px;
    left: 20px;
  }
  
  .heatmap-toggle {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .performance-metrics {
    grid-template-columns: 1fr;
  }
}

/* Admin Access Indicator */
.admin-indicator {
  position: fixed;
  top: 10px;
  left: 10px;
  background: rgba(255, 104, 155, 0.2);
  color: #ff689b;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
  z-index: 9999;
  display: none;
}

.admin-indicator.show {
  display: block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Custom Scrollbar for Activity Feed */
.activity-feed::-webkit-scrollbar {
  width: 4px;
}

.activity-feed::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.activity-feed::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3fcdc7, #e98e06);
  border-radius: 2px;
}

.activity-feed::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff689b, #8660fe);
}
