/* TOP-3 Experts Widget - Corrected WordPress Styles */
/* Using exact colors from React design system */

:root {
  /* Core colors from React design system */
  --wp-dark-teal: 193, 100%, 20%;     /* #005264 */
  --wp-main-teal: 173, 80%, 32%;      /* #0d9488 */
  --wp-accent-orange: 16, 85%, 46%;   /* #d84315 */
  --wp-pure-white: 0, 0%, 100%;       /* #fff */
  --wp-card-bg: 0, 0%, 98%;           /* card background */
  --wp-muted: 0, 0%, 45%;             /* muted text */
  
  /* Gradients */
  --wp-gradient-primary: linear-gradient(135deg, hsl(173, 80%, 32%), hsl(193, 100%, 20%));
  --wp-gradient-accent: linear-gradient(135deg, hsl(16, 85%, 46%), hsl(16, 85%, 56%));
  --wp-gradient-teal: linear-gradient(135deg, hsl(173, 80%, 32%), hsl(173, 80%, 42%));
  
  /* Shadows */
  --wp-shadow-teal: 0 10px 30px -5px hsl(173, 80%, 32%, 0.4);
  --wp-shadow-orange: 0 8px 25px -5px hsl(16, 85%, 46%, 0.4);
  --wp-shadow-glow: 0 0 20px hsl(173, 80%, 32%, 0.6);
  
  /* Transitions */
  --wp-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Widget Container */
.top-experts-mystical-widget {
  position: relative;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px;
}

/* Background Pattern */
.mystical-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.1;
  background-repeat: repeat;
  background-size: 400px 300px;
  pointer-events: none;
  background-image: url('/assets/themes/namedb/img/constellation-pattern.png');
  background-position: center;
  z-index: 1;
}

/* Header Styling */
.mystical-header {
  position: relative;
  margin-bottom: 32px;
  text-align: center;
}

.mystical-title-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--wp-gradient-primary);
  border-radius: 50px;
  box-shadow: var(--wp-shadow-glow);
  margin-bottom: 16px;
}

.mystical-title {
  font-size: 18px;
  font-weight: bold;
  color: hsl(var(--wp-pure-white));
  letter-spacing: 0.1em;
  margin: 0;
}

.mystical-sparkle {
  width: 20px;
  height: 20px;
  color: hsl(var(--wp-accent-orange));
  animation: mystical-pulse 2s infinite;
}

/* Grid Layout */
.mystical-desktop-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.mystical-mobile-view {
  display: none;
}

/* Card Base Styles */
.mystical-card {
  position: relative;
  border: 1px solid hsl(var(--wp-main-teal), 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--wp-transition);
  background-repeat: repeat;
  background-size: 400px 300px;
  background-position: center;
  background-image: url('/assets/themes/namedb/img/constellation-pattern.png');
}

.mystical-card:hover {
  border-color: hsl(var(--wp-main-teal), 0.4);
  box-shadow: var(--wp-shadow-teal);
}

.mystical-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: hsl(var(--wp-pure-white), 0.85);
  backdrop-filter: blur(1px);
}

.mystical-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--wp-gradient-primary);
  opacity: 0;
  transition: var(--wp-transition);
}

.mystical-card:hover .mystical-card-glow {
  opacity: 0.1;
}

/* Desktop Content */
.mystical-desktop-content {
  position: relative;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Avatar Section */
.mystical-avatar-wrapper {
  position: relative;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.mystical-rank-badge {
  position: absolute;
  left: -32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--wp-gradient-accent);
  color: hsl(var(--wp-pure-white));
  width: 48px;
  height: 32px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  box-shadow: var(--wp-shadow-orange);
}

.mystical-avatar-link {
  position: relative;
  display: block;
  text-decoration: none;
  width: 100%;
  height: 88px;
}

.mystical-avatar-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20%;
  padding: 4px;
  animation: mystical-pulse 3s infinite;
  width: auto;
  height: 88px;
   display: flex;
  align-items: center;
  justify-content: center;
}

.mystical-avatar-inner {
  width: 80px;
  height: 80px;
  background: hsl(var(--wp-card-bg), 0.8);
  border-radius: 50%;
   display: flex;
  align-items: center;
  justify-content: center;
}

.mystical-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid hsl(var(--wp-main-teal));
  box-shadow: var(--wp-shadow-glow);
  z-index: 5;
}

.mystical-verified-badge {
  position: absolute;
  bottom: 4px;
  right: -4px;
  background: var(--wp-gradient-teal);
  border-radius: 50%;
  padding: 4px;
  width: 24px;
  height: 24px;
}

.mystical-verified-badge svg {
  width: 16px;
  height: 16px;
  color: hsl(var(--wp-pure-white));
  z-index: 10;
}

/* Name and Specialty Section */
.mystical-name-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mystical-name-link {
  text-decoration: none;
  display: block;
}

.mystical-expert-name {
  font-weight: bold;
  color: hsl(var(--wp-dark-teal));
  font-size: 18px;
  margin: 0;
  transition: var(--wp-transition);
}

.mystical-name-link:hover .mystical-expert-name {
  color: hsl(var(--wp-main-teal));
}

.mystical-specialty-badge {
  display: inline-block;
  background: hsl(var(--wp-main-teal));
  color: hsl(var(--wp-pure-white));
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 500;
}

/* Rating Section */
.mystical-rating-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mystical-star {
  width: 16px;
  height: 16px;
  transition: var(--wp-transition);
}

.mystical-star-filled {
  color: hsl(var(--wp-accent-orange));
  animation: mystical-scale-in 0.2s ease-out;
}

.mystical-star-empty {
  color: hsl(var(--wp-muted));
}

.mystical-rating-value {
  margin-left: 8px;
  font-size: 14px;
  font-weight: bold;
  color: hsl(var(--wp-accent-orange));
  animation: mystical-fade-in 0.3s ease-out;
}

/* Actions Section */
.mystical-actions-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.mystical-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--wp-transition);
  border: none;
  cursor: pointer;
  width: 100%;
}

.mystical-btn-review {
  background: var(--wp-gradient-teal);
  color: hsl(var(--wp-pure-white));
  box-shadow: var(--wp-shadow-glow);
}

.mystical-btn-review:hover {
  box-shadow: var(--wp-shadow-teal);
  transform: scale(1.05);
}

.mystical-btn-comments {
  border: 1px solid hsl(var(--wp-main-teal), 0.3);
  color: #fff;
  background: #005066;
}

.mystical-btn-comments:hover {
  background: hsl(var(--wp-main-teal));
  color: hsl(var(--wp-pure-white));
  transform: scale(1.05);
}

.mystical-btn-comments svg {
  width: 16px;
  height: 16px;
}

/* Corner Decorations */
.mystical-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid hsl(var(--wp-main-teal), 0.3);
}

.mystical-corner-tl {
  top: 16px;
  left: 16px;
  border-right: none;
  border-bottom: none;
}

.mystical-corner-tr {
  top: 16px;
  right: 16px;
  border-left: none;
  border-bottom: none;
}

.mystical-corner-bl {
  bottom: 16px;
  left: 16px;
  border-right: none;
  border-top: none;
}

.mystical-corner-br {
  bottom: 16px;
  right: 16px;
  border-left: none;
  border-top: none;
}

/* Mystical Divider */
.mystical-divider {
  position: relative;
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mystical-divider-line {
  height: 1px;
  background: var(--wp-gradient-primary);
  opacity: 0.3;
  width: 100%;
}

.mystical-divider-icon {
    position: absolute;
    background: var(--wp-gradient-primary);
    border-radius: 50%;
    /* padding: 4px; */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
}

.mystical-divider-icon svg {
  width: 16px;
  height: 16px;
  color: hsl(var(--wp-pure-white));
}

/* Animations */
@keyframes mystical-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes mystical-scale-in {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes mystical-fade-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Additional hover effects */
.mystical-card:hover .mystical-avatar {
  box-shadow: var(--wp-shadow-teal);
}

.mystical-card:hover .mystical-sparkle {
  animation-duration: 1s;
}

/* Focus states for accessibility */
.mystical-btn:focus,
.mystical-avatar-link:focus,
.mystical-name-link:focus {
  outline: 2px solid hsl(var(--wp-accent-orange));
  outline-offset: 2px;
}

/* Mobile Esoterics Widget Styles */
.esoterics-widget {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

/* Background constellation pattern */
.esoterics-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('./src/assets/constellation-pattern.png');
  background-size: 400px 300px;
  background-repeat: repeat;
  opacity: 0.1;
  z-index: 1;
}

/* Header styling */
.esoterics-header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 32px;
}

.esoterics-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #005264 0%, #00a0b4 100%);
  border-radius: 9999px;
  box-shadow: 0 0 40px rgba(0, 160, 180, 0.4);
  margin-bottom: 16px;
}

.esoterics-title h2 {
  font-size: 18px;
  font-weight: bold;
  color: white;
  letter-spacing: 0.05em;
  margin: 0;
}

.esoterics-title .sparkle {
  width: 20px;
  height: 20px;
  color: #ff6b35;
  animation: pulse 2s infinite;
}

/* Cards container */
.esoterics-cards {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Individual card */
.esoteric-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(1px);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.esoteric-card:hover {
  box-shadow: 0 10px 30px rgba(0, 82, 100, 0.3);
  transform: translateY(-2px);
}

/* Card constellation background */
.esoteric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('./src/assets/constellation-pattern.png');
  background-size: 400px 300px;
  background-repeat: repeat;
  background-position: center;
  opacity: 0.1;
  z-index: 1;
}

/* Card content */
.card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Row 1: Position + Avatar + Verification */
.card-row-1 {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.position-badge {
  position: absolute;
  left: 0;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  z-index: 30;
}

.avatar-container {
  position: relative;
}

.topical-background {
  position: absolute;
  top: 0;
  left: -70px;
  width: 200px;
  height: 60px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  opacity: 0.6;
}

.topical-background.fortune-telling {
  background-image: url('./src/assets/fortune-telling-bg.jpg');
}

.topical-background.tarology {
  background-image: url('./src/assets/tarology-bg.jpg');
}

.topical-background.runology {
  background-image: url('./src/assets/runology-bg.jpg');
}

.practitioner-avatar {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #005264;
  box-shadow: 0 0 20px rgba(0, 82, 100, 0.4);
  z-index: 10;
}

.verification-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: linear-gradient(135deg, #005264 0%, #00a0b4 100%);
  border-radius: 50%;
  padding: 4px;
  z-index: 20;
}

.verification-badge svg {
  width: 12px;
  height: 12px;
  color: white;
}

/* Row 2: Name + Specialty */
.card-row-2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.practitioner-name {
  font-size: 16px;
  font-weight: bold;
  color: #005264;
  margin: 0;
}

.specialty-badge {
  background: #005264;
  color: white;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

/* Row 3: Rating + Actions */
.card-row-3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rating-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

.star {
  width: 14px;
  height: 14px;
  transition: all 0.3s ease;
}

.star.filled {
  color: #ff6b35;
  fill: #ff6b35;
  animation: scale-in 0.2s ease-out;
}

.star.empty {
  color: #d1d5db;
}

.rating-value {
  margin-left: 4px;
  font-size: 12px;
  font-weight: bold;
  color: #ff6b35;
  animation: fade-in 0.3s ease-out;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-primary {
  background: #005264;
  color: white;
}

.btn-primary:hover {
  background: #00a0b4;
  transform: scale(1.05);
}

.btn-outline {
  background: transparent;
  color: #005264;
  border: 1px solid transparent;
}

.btn-outline:hover {
  background: #005264;
  color: white;
  transform: scale(1.05);
}

.btn svg {
  width: 12px;
  height: 12px;
}

/* Animations */
@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

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

/* Mystical divider */
.mystical-divider {
  position: relative;
  z-index: 2;
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, #005264, transparent);
  width: 100%;
  opacity: 0.3;
}

.divider-icon {
  position: absolute;
  background: linear-gradient(135deg, #005264 0%, #00a0b4 100%);
  border-radius: 50%;
  padding: 8px;
}

.divider-icon svg {
  width: 16px;
  height: 16px;
  color: white;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .esoterics-widget {
    padding: 16px;
  }
  
  .esoterics-cards {
    gap: 12px;
  }
  
  .esoteric-card {
    padding: 12px;
  }
  
  .card-content {
    gap: 8px;
  }
  
  .topical-background {
    width: 180px;
    height: 50px;
    left: -60px;
  }
  
  .practitioner-avatar {
    width: 48px;
    height: 48px;
  }
}