/* ============================================
   LEAN EDGE SPORTS — NBA Trades Page
   trades.css
============================================ */

/* --- PAGE HERO --- */
.page-hero {
  padding: 120px 60px 40px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.page-hero h1 {
  font-family: tahoma, sans-serif;
  font-size: 64px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 12px;
  line-height: 1;
}

.page-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- LAYOUT --- */
.trades-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}

/* --- CONTROLS BAR --- */
.trades-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.trades-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.meta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.3s;
}

.meta-dot.live {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
  animation: pulse-dot 2s infinite;
}

.meta-dot.loading {
  background: #f59e0b;
  animation: pulse-dot 0.8s infinite;
}

.meta-dot.error {
  background: var(--red);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--red);
  border: none;
  border-radius: 10px;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.refresh-btn:hover { background: #a50e28; transform: translateY(-1px); }
.refresh-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.refresh-btn .ti { font-size: 15px; }

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

.spinning { animation: spin 0.8s linear infinite; display: inline-block; }

/* --- DISCLAIMER --- */
.trades-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(46, 117, 182, 0.08);
  border: 1px solid rgba(46, 117, 182, 0.18);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 28px;
}

.trades-disclaimer .ti-shield-check {
  color: var(--mid-blue);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* --- LOADING STATE --- */
.trades-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.trades-loading p { font-size: 14px; }
.trades-loading .loading-sub { font-size: 12px; opacity: 0.6; margin-top: -8px; }

/* --- EMPTY STATE --- */
.trades-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 80px 20px;
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.trades-empty h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.trades-empty p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.6;
  margin: 0;
}

/* --- ERROR STATE --- */
.trades-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 20px;
  text-align: center;
}

.trades-error .ti-alert-circle {
  font-size: 40px;
  color: var(--red);
  opacity: 0.6;
}

.trades-error h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.trades-error p { font-size: 13px; color: var(--text-muted); max-width: 380px; line-height: 1.6; }

/* --- NO TRADES STATE --- */
.trades-none {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================
   TRADE CARDS
============================================ */

.trades-feed-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trade-card {
  background: var(--dark-navy);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.trade-card:hover { border-color: rgba(255,255,255,0.14); }

/* Card header — teams involved */
.trade-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}

.trade-teams {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

.trade-team-pill {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}

.trade-arrow {
  font-size: 14px;
  color: var(--text-muted);
}

.trade-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Card body — what was exchanged */
.trade-body {
  padding: 16px 22px;
}

.trade-summary {
  font-size: 14px;
  line-height: 1.7;
  color: var(--grey-font);
  margin-bottom: 14px;
}

/* Players/picks exchanged */
.trade-exchange {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.exchange-side {
  flex: 1;
  min-width: 180px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px 14px;
}

.exchange-team-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exchange-arrow-label { color: var(--mid-blue); font-size: 12px; }

.exchange-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exchange-item {
  font-size: 13px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

.item-pick {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Card footer — source */
.trade-footer {
  padding: 10px 22px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trade-source {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.trade-source .ti-link { font-size: 12px; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .trades-layout { padding: 24px 20px 60px; }
  .page-hero { padding: 100px 24px 30px; }
  .page-hero h1 { font-size: 44px; }
  .trades-controls { flex-direction: column; align-items: stretch; }
  .refresh-btn { justify-content: center; }
  .trade-exchange { flex-direction: column; }
}
