/* M6-B Part E — Mobile symbol search (header icon + typeahead overlay) */

.m-search-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(30, 144, 255, 0.35);
  background: rgba(30, 144, 255, 0.12);
  color: #7ec8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-right: 6px;
}

.m-search-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.m-search-btn:active {
  background: rgba(30, 144, 255, 0.22);
}

.m-search-overlay {
  position: fixed;
  inset: 0;
  max-width: 428px;
  margin: 0 auto;
  top: var(--dtbb-h, 0px);
  background: rgba(0, 0, 0, 0.72);
  z-index: 650;
  display: none;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 16px;
}

.m-search-overlay.open {
  display: flex;
}

.m-search-panel {
  background: #0d1320;
  border: 1px solid rgba(30, 144, 255, 0.28);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
}

.m-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.m-search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(30, 144, 255, 0.28);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  /* iOS Safari auto-zooms focused inputs under 16px — keep ≥16px sitewide. */
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  outline: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.m-search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-size: 16px;
}

.m-search-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.m-search-results {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.m-search-row {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.m-search-row:last-child {
  border-bottom: none;
}

.m-search-row:active {
  background: rgba(30, 144, 255, 0.12);
}

.m-search-sym {
  font: 800 14px/1.2 Inter, sans-serif;
  color: #fff;
  letter-spacing: 0.03em;
}

.m-search-name {
  font: 500 11px/1.35 Inter, sans-serif;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

.m-search-empty,
.m-search-hint {
  padding: 18px 14px;
  font: 600 12px/1.4 Inter, sans-serif;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* Injected mobile QC shell (gamma/news pages without inline QC markup) */
.m-qc-shell .qc-overlay {
  position: fixed;
  inset: 0;
  max-width: 428px;
  margin: 0 auto;
  top: var(--dtbb-h, 0px);
  background: rgba(0, 0, 0, 0.6);
  z-index: 700;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.m-qc-shell .qc-overlay.open {
  display: flex;
}

.m-qc-shell .qc-popup {
  width: 100%;
  background: #0d1320;
  border-radius: 16px 16px 0 0;
  border-top: 1px solid rgba(30, 144, 255, 0.25);
  padding: 18px 16px 24px;
  max-height: 80vh;
  overflow-y: auto;
}

.m-qc-shell .qc-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.m-qc-shell .qc-sym {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.m-qc-shell .qc-name {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.m-qc-shell .qc-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
}

.m-qc-shell .qc-price {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}

.m-qc-shell .qc-chg {
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
}

.m-qc-shell .qc-chart-shell {
  position: relative;
  width: 100%;
  margin: 14px 0 0;
}

.m-qc-shell .qc-chart-wrap {
  width: 100%;
  height: 168px;
  margin: 0;
}

.m-qc-shell .qc-brand-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 0 12px;
}

.m-qc-shell .qc-brand-lockup {
  height: 22px;
  width: auto;
  max-width: 200px;
  opacity: 0.95;
  display: block;
  pointer-events: none;
}

.m-qc-shell .qc-stamp {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  line-height: 1.2;
}

.m-qc-shell .qc-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
}

.m-qc-shell .qc-share-btn {
  text-align: center;
  padding: 11px 12px;
  border-radius: 8px;
  background: #1E90FF;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
}

.m-qc-shell .qc-share-btn:active {
  background: #4DA6FF;
}
