/* ═══════════════════════════════════════════════════════════
   market-pulse.css — Live Market Pulse section
   Desktop browser + overlapping phone mockup, both showing
   real live Nifty data from /api/market/nifty
   ═══════════════════════════════════════════════════════════ */

#market-pulse {
  padding: 5rem 1.5rem 6rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Device wrap (positioning context) ── */
#mp-device-wrap {
  position: relative;
  margin-top: 3rem;
  min-height: 460px;
}

/* ── Desktop browser mockup ── */
#mp-desktop {
  background: #0d1117;
  border: 1px solid #1e2836;
  border-radius: 10px;
  overflow: hidden;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}

#mp-desktop-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #080b0e;
  border-bottom: 1px solid #1e2836;
}

.mp-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1e2836;
}

#mp-desktop-url {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #5a7a96;
}

#mp-desktop-body {
  padding: 1.75rem 2rem;
}

#mp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.mp-live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e5c8;
  display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
  .mp-live-pulse { animation: mp-blink 1.6s ease-in-out infinite; }
}
@keyframes mp-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

#mp-dt-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--white);
}

#mp-dt-change {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 4px;
  color: #5a7a96;
}

#mp-dt-stats {
  margin-top: 1.4rem;
  display: flex;
  gap: 10px;
}

.mp-stat-box {
  flex: 1;
  background: #080b0e;
  border: 1px solid #1e2836;
  border-radius: 6px;
  padding: 0.65rem;
  text-align: center;
}

.mp-stat-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: #3d5068;
  margin-bottom: 4px;
}

.mp-stat-val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #5a7a96;
}

/* ── Phone mockup (overlapping, bottom-right) ── */
#mp-phone {
  position: absolute;
  bottom: -1.5rem;
  right: calc(50% - 310px);
  width: 185px;
  background: #0d1117;
  border: 7px solid #1a1f26;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 56px rgba(0,0,0,0.5);
}

#mp-phone-notch {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mp-phone-notch span {
  width: 50px;
  height: 5px;
  border-radius: 3px;
  background: #1e2836;
  display: block;
}

#mp-phone-body {
  padding: 0.9rem 0.8rem 1.1rem;
}

#mp-phone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.mp-tag, .mp-tag-sm {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5a7a96;
}
.mp-tag    { font-size: 0.6rem; }
.mp-tag-sm { font-size: 0.5rem; }

#mp-mb-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
}

#mp-mb-change {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  margin-top: 2px;
  color: #5a7a96;
}

#mp-mb-trend-box {
  margin-top: 0.65rem;
  background: #080b0e;
  border: 1px solid #1e2836;
  border-radius: 5px;
  padding: 0.4rem;
  text-align: center;
}

.mp-stat-label-sm {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: #3d5068;
}

.mp-stat-val-sm {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: #5a7a96;
}

/* ── "What's next" cards ── */
#mp-next-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.mp-next-card {
  background: #0d1117;
  border: 1px solid #1e2836;
  border-radius: 8px;
  padding: 1.1rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.mp-next-card:hover {
  border-color: rgba(0,229,200,0.35);
  transform: translateY(-2px);
}
.mp-next-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 6px;
}
.mp-next-desc {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.7;
}
.mp-next-badge {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
}
.mp-badge-live { color: #1ddd8a; border: 1px solid rgba(29,221,138,0.35); }
.mp-badge-next { color: #f5c018; border: 1px solid rgba(245,192,24,0.35); }
.mp-badge-soon { color: #5a7a96; border: 1px solid #1e2836; }

/* ── Mobile responsive ── */
@media (max-width: 720px) {
  #market-pulse { padding: 3rem 1rem 5rem; }
  #mp-device-wrap { min-height: 560px; }
  #mp-desktop { max-width: 100%; }
  #mp-desktop-body { padding: 1.25rem 1.25rem; }
  #mp-dt-price { font-size: 1.9rem; }
  #mp-phone {
    right: 0.5rem;
    bottom: -2.5rem;
    width: 150px;
  }
}

@media (max-width: 480px) {
  #mp-phone {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 1.5rem auto 0;
    width: 170px;
  }
  #mp-device-wrap { min-height: auto; }
}
