/* =============================================================
   FintechNewsPH — Market Data Sections (Forex, Crypto, Stocks)
   Reusable styles for live market data display.
   ============================================================= */

/* =========================
   MARKET SECTION LAYOUT
   ========================= */
.live-market {
  padding: 28px 0;
}

.live-market .section-title {
  font-family: var(--primary-heading, 'Montserrat', sans-serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-green, #16a34a);
  margin-bottom: 16px;
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

.live-forex .section-title {
  font-family: var(--primary-heading, 'Montserrat', sans-serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-green, #16a34a);
  margin-bottom: 16px;
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

/* =========================
   MARKET CARDS (reusable)
   ========================= */
.market-card {
  background: #fff;
  border-radius: var(--radius, 10px);
  padding: 20px;
  box-shadow: 0 3px 10px rgba(15, 15, 15, 0.06);
  border: 1px solid var(--border-color, #e7e7e7);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.market-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(15, 15, 15, 0.1);
}

.market-card__header {
  font-family: var(--primary-heading, 'Montserrat', sans-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--night-black, #0f0f0f);
  margin-bottom: 8px;
}

.market-card__value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--night-black, #0f0f0f);
  margin-bottom: 4px;
}

.market-card__change {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =========================
   MARKET POSITIVE / NEGATIVE
   ========================= */
.market-positive {
  color: var(--color-green, #16a34a);
}

.market-negative {
  color: var(--color-red, #dc2626);
}

/* =========================
   MARKET TABLE ENHANCEMENTS
   ========================= */
.market-table {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.market-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.market-table th {
  background: #f5f6f8;
  padding: 14px 16px;
  font-family: var(--primary-heading, 'Montserrat', sans-serif);
  font-weight: 700;
  font-size: 13px;
  color: var(--night-grey, #252C2B);
  border-bottom: 2px solid var(--color-green, #16a34a);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-table td {
  padding: 14px 16px;
  font-size: 15px;
  color: #333;
  border-bottom: 1px solid #f1f1f1;
  transition: background 0.2s ease;
}

.market-table tr:hover td {
  background: rgba(22, 163, 74, 0.04);
}

.market-table tr:last-child td {
  border-bottom: none;
}

/* =========================
   MARKET LOADING SKELETON
   ========================= */
.market-loading {
  background: #e8e8e8;
  border-radius: 8px;
  min-height: 200px;
}

@keyframes market-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =========================
   MARKET SECTION SPACING
   ========================= */
.market-section-gap {
  margin-top: 40px;
}

/* =========================
   DARK MODE: MARKET
   ========================= */
body.dark-mode .live-market .section-title,
body.dark-mode .live-forex .section-title {
  color: #22c55e;
}

body.dark-mode .market-card {
  background: #1e1e1e;
  border-color: #333;
}

body.dark-mode .market-card__value {
  color: #e0e0e0;
}

body.dark-mode .market-table {
  background: #1e1e1e;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .market-table th {
  background: #272727;
  color: #e0e0e0;
  border-bottom-color: #22c55e;
}

body.dark-mode .market-table td {
  color: #ccc;
  border-bottom-color: #333;
}

body.dark-mode .market-table tr:hover td {
  background: rgba(34, 197, 94, 0.06);
}

body.dark-mode .market-positive {
  color: #22c55e;
}

body.dark-mode .market-negative {
  color: #f87171;
}

body.dark-mode .market-loading {
  background: #2e2e2e;
}

/* =========================
   RESPONSIVE: MARKET
   ========================= */
@media (max-width: 1000px) {
  .live-market .section-title,
  .live-forex .section-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .market-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .market-table table {
    min-width: 420px;
  }

  .live-market .section-title,
  .live-forex .section-title {
    font-size: 1.2rem;
  }

  .market-card {
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .live-market,
  .live-forex {
    padding: 16px 0;
  }

  .live-market .section-title,
  .live-forex .section-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .market-section-gap {
    margin-top: 24px;
  }

  .market-table th {
    padding: 10px 12px;
    font-size: 12px;
  }

  .market-table td {
    padding: 10px 12px;
    font-size: 14px;
  }
}
