/**
 * @file
 * Styles for Pond Avatar Client.
 *
 * CanuckDUCK Avatar Display Styles
 */

/* Base avatar container */
.pond-avatar {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  overflow: visible;
}

.pond-avatar__image {
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e0e0e0;
}

/* Size variants */
.pond-avatar--small {
  width: 32px;
  height: 32px;
}
.pond-avatar--small .pond-avatar__image {
  width: 32px;
  height: 32px;
}

.pond-avatar--medium {
  width: 64px;
  height: 64px;
}
.pond-avatar--medium .pond-avatar__image {
  width: 64px;
  height: 64px;
}

.pond-avatar--large {
  width: 128px;
  height: 128px;
}
.pond-avatar--large .pond-avatar__image {
  width: 128px;
  height: 128px;
}

/* Type badges */
.pond-avatar__badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.pond-avatar__badge--premium {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pond-avatar__badge--exclusive {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.pond-avatar__badge--nft {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.pond-avatar__badge-icon {
  width: 10px;
  height: 10px;
}

/* Rarity borders/effects */
.pond-avatar--rarity-common .pond-avatar__image {
  border: 2px solid #9e9e9e;
}

.pond-avatar--rarity-uncommon .pond-avatar__image {
  border: 2px solid #4caf50;
}

.pond-avatar--rarity-rare .pond-avatar__image {
  border: 2px solid #2196f3;
}

.pond-avatar--rarity-epic .pond-avatar__image {
  border: 2px solid #9c27b0;
  box-shadow: 0 0 10px rgba(156, 39, 176, 0.5);
}

.pond-avatar--rarity-legendary .pond-avatar__image {
  border: 2px solid #ff9800;
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.6);
}

/* Animated glow for rare avatars */
.pond-avatar__rarity-glow {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.pond-avatar--rarity-epic .pond-avatar__rarity-glow {
  background: radial-gradient(circle, rgba(156, 39, 176, 0.3) 0%, transparent 70%);
  animation: pulse-epic 2s ease-in-out infinite;
}

.pond-avatar--rarity-legendary .pond-avatar__rarity-glow {
  background: radial-gradient(circle, rgba(255, 152, 0, 0.4) 0%, transparent 70%);
  animation: pulse-legendary 1.5s ease-in-out infinite;
}

@keyframes pulse-epic {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes pulse-legendary {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* NFT special effects */
.pond-avatar--type-nft .pond-avatar__image {
  border: 2px solid transparent;
  background: 
    linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #4facfe, #00f2fe, #43e97b, #38f9d7) border-box;
}

.pond-avatar--type-nft:hover .pond-avatar__image {
  animation: nft-border-rotate 3s linear infinite;
}

@keyframes nft-border-rotate {
  0% {
    background: 
      linear-gradient(white, white) padding-box,
      linear-gradient(0deg, #4facfe, #00f2fe, #43e97b, #38f9d7) border-box;
  }
  25% {
    background: 
      linear-gradient(white, white) padding-box,
      linear-gradient(90deg, #4facfe, #00f2fe, #43e97b, #38f9d7) border-box;
  }
  50% {
    background: 
      linear-gradient(white, white) padding-box,
      linear-gradient(180deg, #4facfe, #00f2fe, #43e97b, #38f9d7) border-box;
  }
  75% {
    background: 
      linear-gradient(white, white) padding-box,
      linear-gradient(270deg, #4facfe, #00f2fe, #43e97b, #38f9d7) border-box;
  }
  100% {
    background: 
      linear-gradient(white, white) padding-box,
      linear-gradient(360deg, #4facfe, #00f2fe, #43e97b, #38f9d7) border-box;
  }
}

/* Comment/post avatar integration */
.comment .pond-avatar,
.node .pond-avatar {
  float: left;
  margin-right: 12px;
  margin-bottom: 8px;
}

/* Forum topic list avatars */
.forum-topic-list .pond-avatar {
  margin-right: 8px;
  vertical-align: middle;
}

/* User profile page */
.user-profile .pond-avatar--large {
  margin: 0 auto 20px;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pond-avatar--large {
    width: 96px;
    height: 96px;
  }
  .pond-avatar--large .pond-avatar__image {
    width: 96px;
    height: 96px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .pond-avatar__image {
    background-color: #424242;
  }
  
  .pond-avatar--rarity-common .pond-avatar__image {
    border-color: #757575;
  }
}

/* CanuckDUCK theme colors */
.pond-avatar--canuckduck-official .pond-avatar__image {
  border: 2px solid #d32f2f; /* Canadian red */
}

.pond-avatar--canuckduck-official .pond-avatar__badge {
  background: linear-gradient(135deg, #d32f2f 0%, #ff5722 100%);
}
