/* ============================================================
   SOKONI Product Trust & Analytics UI  v1.0
   All classes prefixed pt- (product-trust)
   Designed for the dark SOKONI design system.
============================================================ */

/* ── Skeleton loader ── */
.pt-skeleton {
  height: 72px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  border-radius: 14px;
  animation: ptSkelShimmer 1.5s infinite;
  margin: 8px 0;
}
@keyframes ptSkelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ════════════════════════════════════════════════
   STATS BAR — views / sold / trending badges
════════════════════════════════════════════════ */
.pt-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  animation: ptFadeIn 0.4s ease;
}

.pt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: opacity 0.2s;
}
.pt-badge-icon { font-size: 13px; line-height: 1; }

.pt-badge--views {
  background: rgba(77, 184, 255, 0.10);
  border-color: rgba(77, 184, 255, 0.22);
  color: #4db8ff;
}
.pt-badge--sales {
  background: rgba(113, 255, 0, 0.09);
  border-color: rgba(113, 255, 0, 0.22);
  color: #71ff00;
}
.pt-badge--trending {
  background: rgba(255, 176, 32, 0.10);
  border-color: rgba(255, 176, 32, 0.25);
  color: #ffb020;
}
.pt-badge--recent {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.60);
}

/* Trending tag inside urgency bar area */
.pt-trend-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: rgba(255, 176, 32, 0.12);
  border: 1px solid rgba(255, 176, 32, 0.28);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #ffb020;
}

/* ════════════════════════════════════════════════
   PRICE HISTORY MODULE
════════════════════════════════════════════════ */
.pt-price-module {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
  margin: 20px 0;
  animation: ptFadeIn 0.4s ease;
}

.pt-price-module--minimal {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
}

.pt-pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 6px;
}
.pt-pm-title {
  font-size: 14px;
  font-weight: 800;
  color: white;
}
.pt-pm-updated {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}
.pt-pm-label {
  font-size: 13px;
  color: rgba(255,255,255,0.50);
  font-weight: 600;
}
.pt-pm-date {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  font-weight: 700;
}

/* Chart container */
.pt-pm-chart {
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
}

/* Grid of price stats */
.pt-pm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.pt-pm-cell {
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 10px 12px;
}
.pt-pm-cell-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 4px;
}
.pt-pm-cell-val {
  font-size: 13px;
  font-weight: 800;
  color: white;
}
.pt-pm-cell-val--low  { color: #71ff00; }
.pt-pm-cell-val--high { color: rgba(255,255,255,0.75); }

/* Change indicator */
.pt-pm-change {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.pt-pm-dir--down {
  background: rgba(113,255,0,0.08);
  border: 1px solid rgba(113,255,0,0.18);
  color: #71ff00;
}
.pt-pm-dir--up {
  background: rgba(255,77,77,0.08);
  border: 1px solid rgba(255,77,77,0.18);
  color: #ff4d4d;
}
.pt-pm-change-abs { opacity: 0.75; }

/* History table */
.pt-ph-table {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 10px;
}
.pt-ph-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.pt-ph-row:last-child { border-bottom: none; }
.pt-ph-date  { min-width: 72px; }
.pt-ph-arrow { font-weight: 800; }
.pt-ph-row--down .pt-ph-arrow { color: #71ff00; }
.pt-ph-row--up   .pt-ph-arrow { color: #ff4d4d; }
.pt-ph-prices { flex: 1; color: rgba(255,255,255,0.70); }
.pt-ph-reason { font-size: 11px; color: rgba(255,255,255,0.30); font-style: italic; }

/* ════════════════════════════════════════════════
   SELLER PERFORMANCE CARD
════════════════════════════════════════════════ */
.pt-seller-perf {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 20px;
  margin: 20px 0;
  animation: ptFadeIn 0.4s ease;
}
.pt-seller-perf--new {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}
.pt-sp-icon { font-size: 24px; }
.pt-sp-text { display: flex; flex-direction: column; gap: 2px; }
.pt-sp-label { font-size: 14px; font-weight: 800; color: white; }
.pt-sp-sub   { font-size: 12px; color: rgba(255,255,255,0.40); }

.pt-sp-header {
  font-size: 14px;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
}
.pt-sp-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pt-sp-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pt-sp-item--stat {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 9px 12px;
}
.pt-sp-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pt-sp-item-label {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
}
.pt-sp-item-val {
  font-size: 13px;
  font-weight: 800;
  color: white;
}

/* Progress bars */
.pt-sp-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.pt-sp-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: rgba(255,255,255,0.25);
  transition: width 0.6s ease;
}
.pt-sp-bar-fill--great { background: #71ff00; }
.pt-sp-bar-fill--warn  { background: #ffb020; }

/* Value colour helpers */
.pt-val--great { color: #71ff00; }
.pt-val--ok    { color: #ffb020; }
.pt-val--warn  { color: #ff4d4d; }

/* ════════════════════════════════════════════════
   BUYER TRUST PANEL
════════════════════════════════════════════════ */
.pt-trust-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 20px;
  margin: 20px 0;
  animation: ptFadeIn 0.4s ease;
}

.pt-trust-header {
  margin-bottom: 16px;
}
.pt-trust-title {
  font-size: 14px;
  font-weight: 800;
  color: white;
}

.pt-trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pt-trust-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 11px 12px;
  transition: border-color 0.2s;
}
.pt-trust-cell--verified {
  background: rgba(113,255,0,0.06);
  border-color: rgba(113,255,0,0.20);
}
.pt-trust-cell--secure {
  background: rgba(77,184,255,0.06);
  border-color: rgba(77,184,255,0.18);
}
.pt-trust-cell--great {
  background: rgba(113,255,0,0.05);
  border-color: rgba(113,255,0,0.15);
}

.pt-trust-icon {
  font-size: 16px;
  line-height: 1;
  margin-top: 1px;
  flex-shrink: 0;
}
.pt-trust-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pt-trust-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
}
.pt-trust-value {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.80);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-trust-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  text-align: center;
}

/* ── Shared animation ── */
@keyframes ptFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 400px) {
  .pt-trust-grid { grid-template-columns: 1fr; }
  .pt-pm-grid    { grid-template-columns: 1fr 1fr; }
  .pt-stats-bar  { gap: 6px; }
  .pt-badge      { font-size: 11px; padding: 5px 10px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .pt-skeleton { animation: none; }
  .pt-trust-panel,
  .pt-seller-perf,
  .pt-price-module,
  .pt-stats-bar { animation: none; }
  .pt-sp-bar-fill { transition: none; }
}
