/* Allocation Previews Styles */

.preview-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.preview-section--highlight {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
}

.preview-section__header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-section__title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.trader-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.trader-summary__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trader-summary__label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trader-summary__value {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}

.data-table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table--scrollable td {
  white-space: nowrap;
}

.data-table--allocations th:last-child,
.data-table--allocations td:last-child {
  min-width: 200px;
}

.row--highlighted {
  background: rgba(99, 102, 241, 0.1);
}

.signal-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.signal-badge--buy {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.signal-badge--sell {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.signal-badge--hold {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}

.action-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.action-badge--buy {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.action-badge--sell {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.action-badge--hold {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge--selected {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}

.confidence-bar {
  position: relative;
  width: 80px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.confidence-bar__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 10px;
}

.confidence-bar__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

.factor-value {
  font-weight: 500;
}

.factor-value.positive {
  color: #22c55e;
}

.factor-value.negative {
  color: #ef4444;
}

.recommendation-summary {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.recommendation-summary__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recommendation-summary__label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recommendation-summary__value {
  font-size: 15px;
  color: #fff;
  line-height: 1.5;
}

.strategy-reason {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
  font-size: 14px;
  color: #c7d2fe;
}

.detailed-reasoning {
  margin-top: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detailed-reasoning__title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 12px 0;
}

.detailed-reasoning__content {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
}

.text-muted {
  color: rgba(255, 255, 255, 0.4);
  margin-left: 8px;
  font-size: 12px;
}

.text-small {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.text-center {
  text-align: center;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.preview-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.data-table tfoot td {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 500;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.loading-state p {
  font-size: 14px;
  margin: 0;
}
