/* Shimmer animation keyframes */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Tech card styles */
.techCard {
  padding: 4px var(--mantine-spacing-xs);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  background: rgba(var(--gradient-color), 0.12);
  border: 1px solid rgba(var(--gradient-color), 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
  cursor: pointer;
}

/* Enhanced styling for tier 3 and faction techs */
.techCard.enhanced {
  background: rgba(var(--gradient-color), 0.25);
  border: 1px solid rgba(var(--gradient-color), 0.9);
  box-shadow: 0 0 8px rgba(var(--gradient-color), 0.15);
  position: relative;
  overflow: hidden;
}

.techCard.enhanced::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  animation: shimmer 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}


.techCard:hover {
  background: rgba(var(--gradient-color), 0.18);
  border: 1px solid rgba(var(--gradient-color), 0.4);
  box-shadow: 0 4px 16px rgba(var(--gradient-color), 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  /* transform: translateY(-2px); */
}

.techCard.enhanced:hover {
  background: rgba(var(--gradient-color), 0.5);
  border: 1px solid rgba(var(--gradient-color), 0.5);
  box-shadow: 0 4px 16px rgba(var(--gradient-color), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}


.techCard::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(var(--gradient-color), 0.6);
}

/* Faction icon positioning */
.factionIcon {
  position: absolute;
  top: 3px;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.factionIconWithTier {
  right: 20px;
}

.factionIconWithoutTier {
  right: 4px;
}

/* Tier dots container */
.tierContainer {
  position: absolute;
  top: 3px;
  right: 4px;
  display: flex;
  width: 12px;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Tier dots */
.tierDot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(var(--gradient-color), 0.9);
  box-shadow: 0 0 3px rgba(var(--gradient-color), 0.9), inset 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Main content group */
.contentGroup {
  gap: var(--mantine-spacing-xs);
  position: relative;
  min-width: 0;
}

/* Tech icon */
.techIcon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(var(--gradient-color), 0.3));
}

/* Faction tech icon with darkening background */
.factionTechIcon {
  position: relative;
  overflow: visible;
}

.factionTechIcon img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px !important;
  height: 18px !important;
  z-index: 1;
}

/* Tech name text */
.techName {
  color: var(--mantine-color-white);
  font-weight: 800;
  flex: 1;
  min-width: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  padding-right: 16px;
  /* letter-spacing: -0.05em; */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

/* Icon filter */
.iconFilter {
  filter: drop-shadow(0 1px 2px rgba(var(--gradient-color), 0.3));
}

/* Color-specific classes using global variables */
.red {
  --gradient-color: var(--gd-red);
}

.green {
  --gradient-color: var(--gd-green);
}

.blue {
  --gradient-color: var(--gd-blue);
}

.yellow {
  --gradient-color: var(--gd-yellow);
}

.gray {
  --gradient-color: var(--gd-gray);
}