/* ===== MINDSHARE MAP ENHANCED STYLES ===== */
/* Professional styling for the mindshare treemap with category badges */

/* Category Badge Container */
.mindshare-category-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 20;
  min-width: 100px;
  max-width: 160px;
  min-height: 40px;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 2px solid transparent;
}

/* Category-specific colored borders and subtle backgrounds */
.mindshare-category-badge[data-category-index="0"] {
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(59, 130, 246, 0.08) 100%);
  box-shadow: 
    0 4px 16px rgba(59, 130, 246, 0.15),
    0 2px 8px rgba(59, 130, 246, 0.08),
    0 0 0 1px rgba(59, 130, 246, 0.1);
}

.mindshare-category-badge[data-category-index="1"] {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(16, 185, 129, 0.08) 100%);
  box-shadow: 
    0 4px 16px rgba(16, 185, 129, 0.15),
    0 2px 8px rgba(16, 185, 129, 0.08),
    0 0 0 1px rgba(16, 185, 129, 0.1);
}

.mindshare-category-badge[data-category-index="2"] {
  border-color: #ef4444;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(239, 68, 68, 0.08) 100%);
  box-shadow: 
    0 4px 16px rgba(239, 68, 68, 0.15),
    0 2px 8px rgba(239, 68, 68, 0.08),
    0 0 0 1px rgba(239, 68, 68, 0.1);
}

.mindshare-category-badge[data-category-index="3"] {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(139, 92, 246, 0.08) 100%);
  box-shadow: 
    0 4px 16px rgba(139, 92, 246, 0.15),
    0 2px 8px rgba(139, 92, 246, 0.08),
    0 0 0 1px rgba(139, 92, 246, 0.1);
}

.mindshare-category-badge[data-category-index="4"] {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 158, 11, 0.08) 100%);
  box-shadow: 
    0 4px 16px rgba(245, 158, 11, 0.15),
    0 2px 8px rgba(245, 158, 11, 0.08),
    0 0 0 1px rgba(245, 158, 11, 0.1);
}

.mindshare-category-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 10px 10px 0 0;
  opacity: 0.9;
}

/* Category Name */
.mindshare-badge-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  text-align: center;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
  word-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

/* Stats Container */
.mindshare-badge-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

/* Individual Stat */
.mindshare-badge-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.mindshare-badge-value {
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1px;
  filter: brightness(1);
}

.mindshare-badge-value.buys {
  color: #059669;
}

.mindshare-badge-value.sells {
  color: #dc2626;
}

.mindshare-badge-label {
  font-size: 0.5rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  opacity: 0.9;
}

/* Category-specific accent colors for badge top borders */
.mindshare-category-badge[data-category-index="0"]::before { 
  background: linear-gradient(90deg, #3b82f6, #60a5fa); 
}
.mindshare-category-badge[data-category-index="1"]::before { 
  background: linear-gradient(90deg, #10b981, #34d399); 
}
.mindshare-category-badge[data-category-index="2"]::before { 
  background: linear-gradient(90deg, #ef4444, #f87171); 
}
.mindshare-category-badge[data-category-index="3"]::before { 
  background: linear-gradient(90deg, #8b5cf6, #a78bfa); 
}
.mindshare-category-badge[data-category-index="4"]::before { 
  background: linear-gradient(90deg, #f59e0b, #fbbf24); 
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .mindshare-category-badge {
    min-width: 90px;
    max-width: 140px;
    padding: 6px 10px;
    border-radius: 10px;
    min-height: 36px;
  }
  
  .mindshare-badge-title {
    font-size: 0.65rem;
    margin-bottom: 3px;
    line-height: 1.1;
  }
  
  .mindshare-badge-stats {
    gap: 6px;
    padding: 3px 6px;
  }
  
  .mindshare-badge-value {
    font-size: 0.6rem;
  }
  
  .mindshare-badge-label {
    font-size: 0.45rem;
  }
}

@media (max-width: 480px) {
  .mindshare-category-badge {
    min-width: 80px;
    max-width: 120px;
    padding: 5px 8px;
    border-radius: 8px;
    min-height: 32px;
  }
  
  .mindshare-badge-title {
    font-size: 0.6rem;
    margin-bottom: 2px;
    line-height: 1.1;
  }
  
  .mindshare-badge-stats {
    gap: 4px;
    padding: 2px 5px;
  }
  
  .mindshare-badge-value {
    font-size: 0.55rem;
  }
  
  .mindshare-badge-label {
    font-size: 0.4rem;
  }
}

/* Animation for badge appearance */
.mindshare-category-badge {
  animation: mindshare-badge-appear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8) rotate(-1deg);
  will-change: opacity, transform;
}

@keyframes mindshare-badge-appear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) rotate(-1deg);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.05) rotate(0.5deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

/* Enhanced tooltip for mindshare map */
.mindshare-tooltip {
  background: rgba(30, 41, 59, 0.95);
  color: #e2e8f0;
  padding: 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(10px);
  max-width: 220px;
}

.mindshare-tooltip-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 0.85rem;
}

.mindshare-tooltip-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
}

.mindshare-tooltip-stat-label {
  color: #cbd5e1;
  margin-right: 4px;
}

.mindshare-tooltip-stat-value.buys {
  color: #34d399;
  font-weight: 700;
}

.mindshare-tooltip-stat-value.sells {
  color: #f87171;
  font-weight: 700;
} 