/* ============================================
   Affiliate Section Styles - Single Row Layout
   ============================================ */

.affiliate-section {
  background: var(--bg-card);
  background-image: var(--gradient-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  transition: all var(--transition);
}

.affiliate-section::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 102, 0, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.affiliate-section:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-2px);
}

[data-theme="light"] .affiliate-section {
  background: rgba(255, 102, 0, 0.05);
  border-color: var(--primary);
}

.affiliate-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}

.affiliate-badge {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 102, 0, 0.1);
  border-radius: var(--radius-md);
  border: 1px solid var(--primary-border);
  white-space: nowrap;
}

.affiliate-discount {
  background: var(--gradient-hero);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
  animation: pulse 2s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.affiliate-code-wrapper {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.affiliate-code-display {
  background: var(--bg-input);
  border: 2px dashed var(--primary-border);
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  text-align: center;
  font-family: var(--font-mono);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: all;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  flex: 1;
}

.affiliate-code-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 102, 0, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.affiliate-code-display:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  transform: scale(1.02);
}

[data-theme="light"] .affiliate-code-display {
  background: white;
  border-color: var(--primary);
}

.btn-copy-code {
  background: var(--gradient-hero);
  color: white;
  padding: 16px 28px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  border: none;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.btn-copy-code::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width var(--transition), height var(--transition);
}

.btn-copy-code:hover::before {
  width: 300px;
  height: 300px;
}

.btn-copy-code:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-copy-code:active {
  transform: translateY(-1px);
}

.btn-copy-code.copied {
  background: var(--success) !important;
  pointer-events: none;
  animation: success-bounce 0.5s ease;
}

@keyframes success-bounce {
  0%, 100% {
    transform: translateY(-3px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .affiliate-section {
    flex-direction: column;
    align-items: center;
    padding: var(--space-xl);
    text-align: center;
  }
  
  .affiliate-header {
    justify-content: center;
    width: 100%;
  }
  
  .affiliate-code-wrapper {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .affiliate-section {
    padding: var(--space-lg);
  }
  
  .affiliate-header {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }
  
  .affiliate-code-wrapper {
    flex-direction: column;
  }
  
  .affiliate-code-display {
    font-size: 20px;
    padding: 14px 20px;
    letter-spacing: 2px;
    width: 100%;
  }
  
  .btn-copy-code {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .affiliate-section {
    padding: var(--space-md);
  }
  
  .affiliate-code-display {
    font-size: 18px;
    letter-spacing: 1.5px;
    padding: 12px 16px;
  }
  
  .affiliate-badge {
    font-size: 13px;
  }
  
  .affiliate-discount {
    font-size: 13px;
    padding: 6px 12px;
  }
}
