/**
 * PicZFlip Icon System — Lucide Icons + Styled Containers
 * Warm palette with cream/tan containers on dark backgrounds.
 *
 * Sizes: sm (32px), md (48px), lg (64px)
 * Colors: warm tan (#C4A77D) primary, cream (#E8DCC8) light
 */

/* ── Lucide base reset ── */
[data-lucide] {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: middle;
}

/* ── Inline icon (used in text, buttons, labels) ── */
.pzf-inline-icon {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  margin-right: 0.3em;
  color: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}

/* ── Icon containers ── */
.pzf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(196, 167, 125, 0.10);
  color: #C4A77D;
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
}

/* Size variants */
.pzf-icon-sm {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 20px;
}
.pzf-icon-sm [data-lucide] {
  width: 20px;
  height: 20px;
}

.pzf-icon-md {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  font-size: 28px;
}
.pzf-icon-md [data-lucide] {
  width: 28px;
  height: 28px;
}

.pzf-icon-lg {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  font-size: 40px;
}
.pzf-icon-lg [data-lucide] {
  width: 40px;
  height: 40px;
}

/* Hover state for interactive containers */
a .pzf-icon,
button .pzf-icon,
.pzf-icon-hover {
  cursor: pointer;
}
a:hover .pzf-icon,
button:hover .pzf-icon,
.pzf-icon-hover:hover {
  background: rgba(196, 167, 125, 0.18);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(196, 167, 125, 0.12);
}

/* ── Color variants ── */
.pzf-icon-accent {
  background: rgba(126, 217, 87, 0.12);
  color: #7ed957;
}
.pzf-icon-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
}
.pzf-icon-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
}
.pzf-icon-muted {
  background: rgba(160, 160, 176, 0.08);
  color: #a0a0b0;
}

/* ── Bottom navigation icons ── */
.bottom-nav .nav-icon {
  font-size: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bottom-nav .nav-icon [data-lucide] {
  width: 22px;
  height: 22px;
  color: #a0a0b0;
  transition: color 0.2s;
}
.bottom-nav .bottom-nav-item.active .nav-icon [data-lucide],
.bottom-nav .bottom-nav-item:hover .nav-icon [data-lucide] {
  color: #7ed957;
}
.bottom-nav .bottom-nav-item.scan-tab .nav-icon [data-lucide] {
  width: 26px;
  height: 26px;
}

/* ── How-it-works step icons ── */
.hiw6-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hiw6-emoji .pzf-icon {
  background: rgba(196, 167, 125, 0.12);
  color: #C4A77D;
}

/* ── Feature cards icons ── */
.feature-card .pzf-icon,
.category-card .pzf-icon {
  margin-bottom: 0.75rem;
}

/* ── Section tag inline icons ── */
.section-tag .pzf-inline-icon,
.hiw6-label .pzf-inline-icon,
.yt-label .pzf-inline-icon {
  opacity: 1;
}

/* ── Filter tab inline icons ── */
.filter-tab .pzf-inline-icon {
  margin-right: 0.25em;
  opacity: 0.9;
}

/* ── Action button icons ── */
.copy-btn .pzf-inline-icon,
.share-btn .pzf-inline-icon,
.sell-this-btn .pzf-inline-icon,
.capture-btn .pzf-inline-icon,
.identify-btn .pzf-inline-icon,
.retry-btn .pzf-inline-icon,
.download-photo-btn .pzf-inline-icon,
.back-to-results-btn .pzf-inline-icon {
  margin-right: 0.35em;
  opacity: 0.9;
  width: 1em;
  height: 1em;
}

/* ── Upload zone icon ── */
.upload-icon .pzf-icon {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  background: rgba(196, 167, 125, 0.08);
  color: #C4A77D;
}
.upload-icon .pzf-icon [data-lucide] {
  width: 48px;
  height: 48px;
}

/* ── Loading pulse icon ── */
.loading-pulse-icon .pzf-icon {
  background: rgba(126, 217, 87, 0.12);
  color: #7ed957;
  animation: pulse-glow 1.5s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* ── Error icon ── */
.error-icon .pzf-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
}

/* ── Profile menu icons ── */
.profile-menu-item .pzf-inline-icon,
.settings-item .pzf-inline-icon {
  margin-right: 0.5em;
  opacity: 0.7;
}

/* ── Social icons (footer, share) — monochrome ── */
.social-icons [data-lucide],
.footer-social [data-lucide] {
  width: 20px;
  height: 20px;
  color: #a0a0b0;
  transition: color 0.2s, transform 0.2s;
}
.social-icons a:hover [data-lucide],
.footer-social a:hover [data-lucide] {
  color: #C4A77D;
  transform: scale(1.1);
}

/* ── Popular scan chips ── */
.popular-scan-chip .pzf-inline-icon {
  margin-right: 0.2em;
}

/* ── Listing guide icons ── */
.photo-card-header .pzf-inline-icon {
  color: inherit;
  opacity: 0.8;
}

/* ── Ensure Lucide SVGs don't overflow containers ── */
.pzf-icon svg,
.pzf-inline-icon svg {
  display: block;
}

/* ── Responsive adjustments ── */
@media (max-width: 768px) {
  .pzf-icon-lg {
    width: 72px;
    height: 72px;
  }
  .pzf-icon-lg [data-lucide] {
    width: 36px;
    height: 36px;
  }
  .pzf-icon-md {
    width: 48px;
    height: 48px;
  }
  .pzf-icon-md [data-lucide] {
    width: 24px;
    height: 24px;
  }
}
