/* ThresholdFeaturedItems Component Styles */
/* Modular featured items component following Threshold design system */

.featured-items-panel {
  background: var(--panel, #1a1d21);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 8px;
  box-shadow: var(--shadow, 0 8px 32px rgba(0,0,0,0.3));
  color: var(--text, #e8e8e8);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.featured-items-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 12px;
}

.featured-items-header::before {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gothic-gold, #d4af37);
  opacity: 0.3;
}

.featured-items-header h2 {
  color: var(--gothic-gold, #d4af37);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 1px;
  flex-shrink: 0;
  padding: 0 12px;
}

.featured-items-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gothic-gold, #d4af37);
  opacity: 0.3;
}

.featured-items-controls {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.1));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.featured-items-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.featured-items-search {
  flex: 1;
  max-width: 250px;
  margin: 0 16px;
}

.featured-items-search input {
  width: 100%;
  padding: 8px 12px;
  background: var(--panel-hover, #252932);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 4px;
  color: var(--text, #e8e8e8);
  font-size: 14px;
}

.featured-items-search input:focus {
  outline: none;
  border-color: var(--accent, #4a9eff);
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}


.filter-btn {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 4px;
  color: var(--muted, #8b949e);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: var(--panel-hover, #252932);
  color: var(--text, #e8e8e8);
}

.filter-btn.active {
  background: var(--accent, #4a9eff);
  color: white;
  border-color: var(--accent, #4a9eff);
}

.marketplace-btn {
  padding: 4px 8px;
  font-size: 11px;
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
  border: 1px solid #d4af37;
  color: #1a1a1a;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.marketplace-btn:hover {
  background: linear-gradient(135deg, #e6c547 0%, #d4af37 100%);
  border-color: #e6c547;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.featured-items-content {
  flex: 1;
  overflow: hidden;
  padding: 16px;
}

.featured-items-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.featured-items-carousel::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.featured-items-carousel.active {
  cursor: grabbing;
}

.featured-item {
  background: var(--granite-dark, #2d2d2d);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 6px;
  padding: 12px;
  min-width: 200px;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.featured-item:hover {
  border-color: var(--gothic-silver, #c0c0c0);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.item-image {
  width: 100%;
  height: 120px;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
}

.item-info {
  flex: 1;
  margin-bottom: 8px;
}

.item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #e8e8e8);
  margin-bottom: 4px;
  line-height: 1.3;
}

.item-author {
  font-size: 12px;
  color: var(--muted, #8b949e);
  cursor: pointer;
  transition: color 0.2s ease;
}

.item-author:hover {
  color: var(--accent, #4a9eff);
}

.item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--gothic-gold, #d4af37);
  text-align: center;
  padding: 8px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.item-price-sale {
  text-align: center;
  padding: 8px;
  background: rgba(255, 107, 71, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(255, 107, 71, 0.3);
}

.sale-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--warning-ember, #ff6b47);
  display: block;
}

.original-price {
  font-size: 12px;
  color: var(--muted, #8b949e);
  text-decoration: line-through;
  display: block;
  margin-top: 2px;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
  justify-content: center;
}

.tag-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-badge.on-sale {
  background: rgba(255, 107, 71, 0.2);
  color: var(--warning-ember, #ff6b47);
  border: 1px solid rgba(255, 107, 71, 0.4);
}

.tag-badge.new-release {
  background: rgba(74, 158, 255, 0.2);
  color: var(--accent, #4a9eff);
  border: 1px solid rgba(74, 158, 255, 0.4);
}

.tag-badge.coming-soon {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gothic-gold, #d4af37);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.featured-items-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--muted, #8b949e);
  font-style: italic;
}

.featured-items-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.marketplace-empty h4 {
  margin: 0 0 8px 0;
  color: var(--text, #e8e8e8);
  font-size: 18px;
}

.marketplace-empty p {
  margin: 0;
  color: var(--muted, #8b949e);
  font-size: 14px;
}

.featured-items-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.marketplace-error h4 {
  margin: 0 0 8px 0;
  color: var(--warning-ember, #ff6b47);
  font-size: 18px;
}

.marketplace-error p {
  margin: 0;
  color: var(--muted, #8b949e);
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .featured-items-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .featured-items-search {
    max-width: none;
  }
  
  .featured-items-filters {
    justify-content: center;
  }
  
  .featured-item {
    min-width: 180px;
    max-width: 180px;
  }
}

/* Theme Variations */
.featured-items-panel.campaignvtt-theme {
  --panel: #1a1d21;
  --border: rgba(255,255,255,0.1);
  --text: #e8e8e8;
  --muted: #8b949e;
  --accent: #4a9eff;
  --gothic-gold: #d4af37;
  --gothic-silver: #c0c0c0;
  --granite-dark: #2d2d2d;
  --panel-hover: #252932;
}
