/**
 * LiTong Electronics - Unified Icon Styles
 * Consistent icon sizing and styling across the site
 */

/* Base icon styles */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
}

/* Icon sizes */
.icon-xs { width: 16px; height: 16px; }
.icon-sm { width: 20px; height: 20px; }
.icon-md { width: 24px; height: 24px; }
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 48px; height: 48px; }
.icon-2xl { width: 64px; height: 64px; }

/* Icon colors */
.icon-primary { color: var(--primary-blue); }
.icon-secondary { color: var(--text-medium); }
.icon-white { color: #ffffff; }
.icon-success { color: #28a745; }
.icon-warning { color: #ffc107; }
.icon-danger { color: #dc3545; }

/* Icon with text */
.icon-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-text .icon {
  flex-shrink: 0;
}

/* Social icons */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

/* Feature icons */
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--bg-light);
  color: var(--primary-blue);
}

.feature-icon svg {
  width: 32px;
  height: 32px;
}

/* Product category icons */
.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  color: #ffffff;
}

.category-icon svg {
  width: 40px;
  height: 40px;
}

/* Contact icons */
.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-light);
  color: var(--primary-blue);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

/* Floating action icons */
.floating-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.floating-icon:hover {
  transform: scale(1.1);
}

.floating-icon svg {
  width: 28px;
  height: 28px;
}

/* Navigation icons */
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

/* Button icons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.btn-icon-right {
  margin-right: 0;
  margin-left: 8px;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
}

/* List icons */
.list-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  color: var(--primary-blue);
}

.list-icon svg {
  width: 100%;
  height: 100%;
}

/* Status icons */
.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.status-icon.success { color: #28a745; }
.status-icon.warning { color: #ffc107; }
.status-icon.error { color: #dc3545; }
.status-icon.info { color: var(--primary-blue); }

/* Animated icons */
.icon-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.icon-pulse {
  animation: pulse 2s ease-in-out infinite;
}

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

/* Icon buttons */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-medium);
}

.icon-btn:hover {
  background: var(--bg-light);
  color: var(--primary-blue);
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

/* Card icons */
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-light);
  color: var(--primary-blue);
  margin-bottom: 16px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

/* Breadcrumb home icon */
.breadcrumb-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.breadcrumb-home svg {
  width: 100%;
  height: 100%;
}

/* Tab icons */
.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.tab-icon svg {
  width: 100%;
  height: 100%;
}

/* Filter/Sort icons */
.filter-icon,
.sort-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
}

.filter-icon svg,
.sort-icon svg {
  width: 100%;
  height: 100%;
}

/* Data table icons */
.table-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-medium);
  transition: color 0.3s ease;
}

.table-action-icon:hover {
  color: var(--primary-blue);
}

.table-action-icon svg {
  width: 100%;
  height: 100%;
}
