/* =========================================
   TOOLS RESULTS STYLES
   ========================================= */

.results-container {
  margin-top: 2rem;
}

.result-stats {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.result-stats p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.results-table thead {
  background: #7c3aed;
  color: white;
}

.results-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.results-table td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
  color: #334155;
}

.results-table tr:last-child td {
  border-bottom: none;
}

.results-table tr:hover {
  background: #f8fafc;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-low {
  background: #dcfce7;
  color: #166534;
}

.badge-medium {
  background: #fef3c7;
  color: #92400e;
}

.badge-high {
  background: #fee2e2;
  color: #991b1b;
}

/* Niches Grid */
.niches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.niche-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.niche-card:hover {
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.15);
  border-color: #7c3aed;
  transform: translateY(-2px);
}

.niche-card h4 {
  margin: 0 0 1rem 0;
  color: #1e293b;
  font-size: 1.1rem;
}

.niche-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.niche-stats .stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.niche-stats .stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.stat-value {
  font-size: 0.9rem;
  color: #1e293b;
  font-weight: 600;
}

/* ASIN Details */
.asin-details {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e2e8f0;
}

.product-image {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.product-info h3 {
  margin: 0 0 1rem 0;
  color: #1e293b;
  font-size: 1.25rem;
  line-height: 1.4;
}

.product-info p {
  margin: 0.5rem 0;
  color: #64748b;
}

.product-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: #f1f5f9;
  transform: scale(1.02);
}

.stat-icon {
  font-size: 2rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-info .stat-label {
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stat-info .stat-value {
  font-size: 1.1rem;
  color: #1e293b;
  font-weight: 700;
}

/* BSR Results */
.bsr-results h3 {
  margin: 0 0 1.5rem 0;
  color: #1e293b;
  font-size: 1.3rem;
}

/* Generated Content */
.generated-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.content-header h3 {
  margin: 0;
  color: #1e293b;
  font-size: 1.25rem;
}

.content-text {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #7c3aed;
  line-height: 1.8;
  color: #334155;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.alert i {
  font-size: 1.25rem;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #dc2626;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border-left: 4px solid #16a34a;
}

/* Responsive */
@media (max-width: 768px) {
  .results-table {
    font-size: 0.8rem;
  }
  
  .results-table th,
  .results-table td {
    padding: 0.75rem 0.5rem;
  }
  
  .niches-grid {
    grid-template-columns: 1fr;
  }
  
  .product-header {
    flex-direction: column;
    text-align: center;
  }
  
  .product-image {
    width: 150px;
    height: 150px;
    margin: 0 auto;
  }
  
  .product-stats {
    grid-template-columns: 1fr;
  }
}
