/* ═══════════════════════════════════════════════════════════════════
   PSX MARKET PORTAL — Mobile CSS (max-width: 768px)
   Separate file — NO conflicts with mobile.css, styles.css, tablet.css
   All selectors scoped with .psx- prefix
   ═══════════════════════════════════════════════════════════════════ */

.psx-portal {
  padding: 0 16px 40px;
}

/* ═══ HERO ═══ */
.psx-hero {
  border-radius: 14px;
  padding: 24px 20px;
  margin-bottom: 16px;
}

.psx-hero-inner {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.psx-hero-title {
  font-size: 24px;
}

.psx-hero-sub {
  font-size: 13px;
}

.psx-hero-right {
  text-align: left;
  align-items: flex-start;
  flex-direction: row;
  gap: 12px;
}

.psx-status-badge {
  padding: 8px 14px;
  font-size: 13px;
}

.psx-timer-val {
  font-size: 18px;
}

/* ═══ SUMMARY STRIP ═══ */
.psx-summary-inner {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.psx-summary-card {
  padding: 14px;
  gap: 10px;
  flex-wrap: wrap;
}

.psx-summary-icon {
  width: 36px;
  height: 36px;
  font-size: 16px;
  border-radius: 10px;
}

.psx-summary-val {
  font-size: 22px;
}

.psx-summary-bar { display: none; }

/* ═══ TOP MOVERS ═══ */
.psx-top-movers-inner {
  grid-template-columns: 1fr;
  gap: 10px;
}

.psx-mover-card {
  padding: 14px;
}

.psx-mover-symbol {
  font-size: 18px;
}

.psx-mover-price {
  font-size: 16px;
}

/* ═══ CONTROLS ═══ */
.psx-controls-bar {
  padding: 14px;
  border-radius: 12px;
}

.psx-search-wrap input {
  padding: 10px 14px 10px 40px;
  font-size: 13px;
}

.psx-sector-filters {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.psx-sector-filters::-webkit-scrollbar {
  display: none;
}

.psx-filter-btn {
  flex-shrink: 0;
  font-size: 11px;
  padding: 6px 12px;
}

.psx-sort-controls {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.psx-sort-select {
  width: 100%;
}

/* ═══ FETCH BAR ═══ */
.psx-fetch-bar {
  font-size: 11px;
}

/* ═══ TABLE VIEW (Mobile — card layout) ═══ */
.psx-stock-table-wrap {
  border-radius: 12px;
  overflow: hidden;
}

.psx-stock-table thead {
  display: none;
}

.psx-stock-table,
.psx-stock-table tbody {
  display: block;
}

.psx-stock-row {
  display: flex;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  gap: 4px;
  align-items: center;
}

.psx-stock-row:last-child {
  border-bottom: none;
}

.psx-stock-row td {
  border: none;
  padding: 0;
  font-size: 12px;
}

.psx-td-symbol { width: auto; margin-right: 8px; }
.psx-td-company { width: 100%; order: 3; margin-bottom: 4px; }
.psx-td-sector { display: none; }
.psx-td-price { width: auto; margin-left: auto; }
.psx-td-change { width: auto; }
.psx-td-pct { width: auto; margin-left: auto; }
.psx-td-vol { display: none; }

.psx-sym-badge {
  font-size: 11px;
  padding: 3px 8px;
}

.psx-company-name {
  font-size: 12px;
}

.psx-company-sector {
  font-size: 10px;
}

/* ═══ SECTORS VIEW (Mobile) ═══ */
.psx-sectors-view {
  grid-template-columns: 1fr;
  gap: 12px;
}

.psx-sector-group {
  border-radius: 12px;
}

.psx-sector-header {
  padding: 14px 16px;
}

.psx-sector-title h2 {
  font-size: 14px;
}

.psx-sector-stocks {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
}

.psx-stock-card {
  padding: 10px;
  border-radius: 8px;
}

.psx-card-symbol {
  font-size: 12px;
}

.psx-card-name {
  font-size: 11px;
}

.psx-card-price {
  font-size: 12px;
}

/* ═══ VIEW TOGGLE ═══ */
.psx-view-toggle {
  margin-bottom: 16px;
}

.psx-view-btn {
  padding: 8px 16px;
  font-size: 12px;
}

/* ═══ INFO FOOTER ═══ */
.psx-info-inner {
  grid-template-columns: 1fr;
  gap: 12px;
}

.psx-info-card {
  padding: 16px;
  border-radius: 12px;
}

.psx-info-card h3 {
  font-size: 14px;
}

.psx-info-card p {
  font-size: 12px;
}

.psx-data-stamp {
  padding: 16px;
  font-size: 11px;
}

/* ═══ DARK MODE ═══ */
body.dark .psx-stock-row {
  border-bottom-color: rgba(255,255,255,0.06);
}

/* CTA on mobile */
.psx-market-cta { padding: 16px; border-radius: 12px; margin-bottom: 16px; }
.psx-cta-icon { width: 40px; height: 40px; font-size: 18px; }
.psx-cta-title { font-size: 15px; }
.psx-cta-sub { font-size: 12px; }


/* Hero — light background override */
.psx-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e8edf4 100%) !important;
  border: 1px solid var(--psx-border);
}

.psx-hero-title {
  color: var(--psx-text) !important;
}

.psx-hero-sub {
  color: var(--psx-text2) !important;
}

.psx-hero-badge {
  background: rgba(214,168,79,0.1) !important;
}

.psx-timer-label {
  color: var(--psx-text2) !important;
}

.psx-timer-val {
  color: var(--psx-text) !important;
}

.psx-cta-title {
  color: var(--psx-text) !important;
}

.psx-cta-sub {
  color: var(--psx-text2) !important;
}

.psx-cta-arrow {
  color: var(--psx-text2) !important;
}

.psx-market-cta {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
  border: 1px solid var(--psx-border);
}


/* Logo image inside CTA icon */
.psx-cta-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

