/* PSX Market Close Summary page (/market-close). All classes are mcs-* so nothing leaks to other pages. */

.mcs-root {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.mcs-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.mcs-lang {
  display: inline-flex;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  overflow: hidden;
}

.mcs-lang-btn {
  border: 0;
  background: #fff;
  color: #334155;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.mcs-lang-btn.is-active {
  background: #0f4c81;
  color: #fff;
}

/* Language switch: English by default, Urdu when the root has .is-ur */
.mcs-root .mcs-ur,
.mcs-root.is-ur .mcs-en {
  display: none;
}

.mcs-root.is-ur .mcs-headline,
.mcs-root.is-ur .mcs-overview,
.mcs-root.is-ur .mcs-item,
.mcs-root.is-ur .mcs-my-event,
.mcs-root.is-ur .mcs-card > p {
  direction: rtl;
  text-align: right;
}

.mcs-root.is-ur .mcs-ur {
  display: inline;
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
  line-height: 2;
}

.mcs-card {
  padding: 18px 20px;
  min-width: 0;
}

.mcs-empty {
  color: #475569;
}

.mcs-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.mcs-title small {
  font-weight: 400;
  color: #64748b;
  font-size: 12px;
}

.mcs-kse {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.mcs-kse-label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.mcs-kse-close {
  font-size: 28px;
  color: #0f172a;
}

.mcs-chg {
  font-size: 16px;
  font-weight: 600;
}

.mcs-mood {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}

.mcs-mood-bullish { background: #dcfce7; color: #166534; }
.mcs-mood-bearish { background: #fee2e2; color: #991b1b; }
.mcs-mood-mixed { background: #fef3c7; color: #92400e; }

.mcs-headline {
  margin: 10px 0 6px;
  font-size: 20px;
  line-height: 1.35;
  color: #0f172a;
}

.mcs-overview {
  margin: 0 0 14px;
  color: #334155;
  line-height: 1.6;
}

.mcs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.mcs-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mcs-stat span { font-size: 12px; color: #64748b; }
.mcs-stat strong { font-size: 15px; color: #0f172a; }
.mcs-stat em { font-size: 12px; font-style: normal; color: #64748b; }

.mcs-breadth {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}

.mcs-breadth-label { color: #64748b; }

.mcs-breadth-legend {
  display: flex;
  gap: 14px;
  font-weight: 600;
  color: #475569;
}

.mcs-root .is-up,
.mcs-stat em.is-up { color: #15803d; }
.mcs-root .is-down,
.mcs-stat em.is-down { color: #b91c1c; }

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

.mcs-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.mcs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mcs-item {
  padding: 9px 0 9px 12px;
  border-bottom: 1px solid #eef2f7;
  border-left: 3px solid #cbd5e1;
  margin-bottom: 6px;
  line-height: 1.55;
  color: #334155;
}

.mcs-item:last-child { border-bottom: 0; }
.mcs-tone-positive { border-left-color: #16a34a; }
.mcs-tone-negative { border-left-color: #dc2626; }

.mcs-sym {
  font-weight: 700;
  color: #0f4c81;
  margin-right: 6px;
  text-decoration: none;
}

.mcs-pill,
.mcs-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  margin-right: 6px;
  font-weight: 600;
}

.mcs-sectors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}

.mcs-sector {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  color: #334155;
}

.mcs-sector span { font-size: 13px; color: #334155; }
.mcs-sector strong { text-align: right; }
.mcs-sector em { font-size: 11px; font-style: normal; color: #64748b; }
.mcs-sector.is-up { border-left: 3px solid #16a34a; }
.mcs-sector.is-down { border-left: 3px solid #dc2626; }

.mcs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mcs-table th {
  text-align: left;
  color: #64748b;
  font-weight: 600;
  padding: 6px 4px;
  border-bottom: 1px solid #e2e8f0;
}

.mcs-table td {
  padding: 7px 4px;
  border-bottom: 1px solid #f1f5f9;
}

.mcs-table a { font-weight: 600; color: #0f4c81; text-decoration: none; }

.mcs-muted {
  color: #64748b;
  font-size: 13px;
}

.mcs-disclaimer {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

/* Your Day */
.mcs-my-summary {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  align-items: baseline;
}

.mcs-my-pnl {
  font-size: 22px;
  font-weight: 700;
}

.mcs-my-stock {
  border-bottom: 1px solid #eef2f7;
  padding: 8px 0;
}

.mcs-my-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.mcs-my-held {
  font-size: 11px;
  color: #0f4c81;
  background: #e0ecf8;
  border-radius: 999px;
  padding: 1px 7px;
}

.mcs-my-event {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: #475569;
}

.mcs-my-flag {
  font-size: 11px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  padding: 1px 7px;
}

@media (max-width: 600px) {
  .mcs-card { padding: 14px; }
  .mcs-kse-close { font-size: 24px; }
  .mcs-headline { font-size: 18px; }
  .mcs-grid,
  .mcs-grid-3 { grid-template-columns: 1fr; }
}
