/* ===================================================
   ticker_ymx_g1.css
   g1 PHP (ymx- 접두사) 전용 스타일
   =================================================== */

/* ===== wrap ===== */
.ymx-wrap {
  width: 100%;
  box-sizing: border-box;
}

/* ===== quicknav ===== */
.ymx-quicknav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 12px;
}
@media (max-width: 720px) {
  .ymx-quicknav { flex-wrap: wrap; }
}

.ymx-spacer { flex: 1; min-width: 12px; }
@media (max-width: 720px) {
  .ymx-spacer { display: none; }
}

/* ← Hub 버튼 */
.ymx-qbtn {
  background: #132840;
  border: 1px solid #1f3a5f;
  border-radius: 999px;
  padding: 12px 20px;
  color: #ffffff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s ease, transform .1s ease;
}
.ymx-qbtn:hover {
  background: #1b3a60;
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* Group 뱃지 */
.ymx-qgroup {
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: #0f2734;
  color: #bfe9ff;
  border: 1px solid rgba(255,255,255,.18);
  font-weight: 900;
  letter-spacing: .3px;
}

/* ticker / trFilter 드롭다운 공통 */
.ymx-sel {
  width: auto;
  flex: 0 0 auto;
  min-width: 160px;
  max-width: 240px;
  height: 44px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  padding: 10px 14px;
  margin-left: 8px;
  background: #ffffff;
  color: #0b1220;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  appearance: auto;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
.ymx-sel option {
  background: #ffffff;
  color: #0b1220;
}
.ymx-sel:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,130,246,.25);
}
@media (max-width: 720px) {
  .ymx-sel {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
}

/* trFilter는 작게 */
#sec-tr .ymx-controls .ymx-sel {
  height: auto;
  min-width: unset;
  max-width: 180px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 400;
  border-radius: 10px;
  margin-left: 0;
}

/* ===== 펀드 풀네임 제목 ===== */
.ymx-title {
  margin: 6px 0 12px 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

/* ===== 상단 badge 바 ===== */
.ymx-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ymx-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--br, #1e3a5f);
  border-radius: 999px;
  background: #0d1f33;
  font-size: 12px;
  color: #cfe0ff;
  white-space: nowrap;
}

.ymx-muted {
  color: #6b8aad;
  font-size: 11px;
}

/* ===== 카드 ===== */
.ymx-card {
  background: var(--card, #0d1b2a);
  border: 1px solid var(--br, #1e3a5f);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

/* ===== 그리드 ===== */
.ymx-grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.ymx-grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .ymx-grid4 { grid-template-columns: repeat(2, 1fr); }
  .ymx-grid2 { grid-template-columns: 1fr; }
}

/* ===== box / label / value / sub ===== */
.ymx-box {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--br, #1e3a5f);
  border-radius: 12px;
  padding: 12px 14px;
}
.ymx-label {
  font-size: 11px;
  color: #6b8aad;
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.ymx-value {
  font-size: 20px;
  font-weight: 800;
  color: #e6f0ff;
  line-height: 1.2;
}
.ymx-sub {
  font-size: 12px;
  color: #6b8aad;
  margin-top: 4px;
}

/* 양수/음수 */
.ymx-good { color: #4ade80; }
.ymx-bad  { color: #f87171; }

/* ===== note (Derived 알림) ===== */
.ymx-note {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #101f30;
  border: 1px solid #1e3a5f;
  font-size: 12px;
  color: #9fb0c3;
  line-height: 1.5;
}

/* ===== controls (섹션 헤더 행) ===== */
.ymx-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ymx-h2 {
  font-size: 15px;
  font-weight: 800;
  color: #e6f0ff;
  margin: 0;
}

/* Holdings 모드 chip */
.ymx-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--br, #1e3a5f);
  border-radius: 999px;
  background: #0f1b2b;
  font-size: 11px;
  color: #cfe0ff;
}

/* ===== 테이블 ===== */
.ymx-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border: none;
  outline: none;
  box-shadow: none;
}
.ymx-table thead,
.ymx-table tbody,
.ymx-table tfoot { border: none; }
.ymx-table th,
.ymx-table td {
  border: none;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  vertical-align: top;
  white-space: nowrap;
  color: #cfe0ff;
}
.ymx-table th {
  font-size: 12px;
  font-weight: 700;
  color: #6b8aad;
  text-align: left;
  position: relative;
  padding-right: 20px;
  user-select: none;
}
.ymx-table th[data-key]::after {
  content: "↕";
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  opacity: .35;
}
.ymx-table tbody tr:hover {
  background: rgba(255,255,255,.03);
}

/* tfoot 합계 행 */
.ymx-sum td {
  font-weight: 700;
  color: #e6f0ff;
  border-top: 1px solid var(--br, #1e3a5f) !important;
  padding-top: 10px;
}
.ymx-center { text-align: center; }
.ymx-right  { text-align: right; }

/* 테이블 가로 스크롤 (모바일) */
#sec-tr,
#sec-h {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#sec-tr .ymx-table,
#sec-h .ymx-table { min-width: 860px; }

@media (max-width: 768px) {
  .ymx-table th,
  .ymx-table td {
    padding: 10px 10px;
    font-size: 13px;
  }
}

/* ===== 정렬 화살표 (Trades #tr) ===== */
#tr[data-sort-key="date"][data-sort-dir="asc"]     th[data-key="date"]::after    { content:"▲"; opacity:.9; }
#tr[data-sort-key="date"][data-sort-dir="desc"]    th[data-key="date"]::after    { content:"▼"; opacity:.9; }
#tr[data-sort-key="expiry"][data-sort-dir="asc"]   th[data-key="expiry"]::after  { content:"▲"; opacity:.9; }
#tr[data-sort-key="expiry"][data-sort-dir="desc"]  th[data-key="expiry"]::after  { content:"▼"; opacity:.9; }
#tr[data-sort-key="type"][data-sort-dir="asc"]     th[data-key="type"]::after    { content:"▲"; opacity:.9; }
#tr[data-sort-key="type"][data-sort-dir="desc"]    th[data-key="type"]::after    { content:"▼"; opacity:.9; }
#tr[data-sort-key="legs"][data-sort-dir="asc"]     th[data-key="legs"]::after    { content:"▲"; opacity:.9; }
#tr[data-sort-key="legs"][data-sort-dir="desc"]    th[data-key="legs"]::after    { content:"▼"; opacity:.9; }
#tr[data-sort-key="side"][data-sort-dir="asc"]     th[data-key="side"]::after    { content:"▲"; opacity:.9; }
#tr[data-sort-key="side"][data-sort-dir="desc"]    th[data-key="side"]::after    { content:"▼"; opacity:.9; }
#tr[data-sort-key="qty"][data-sort-dir="asc"]      th[data-key="qty"]::after     { content:"▲"; opacity:.9; }
#tr[data-sort-key="qty"][data-sort-dir="desc"]     th[data-key="qty"]::after     { content:"▼"; opacity:.9; }
#tr[data-sort-key="pin"][data-sort-dir="asc"]      th[data-key="pin"]::after     { content:"▲"; opacity:.9; }
#tr[data-sort-key="pin"][data-sort-dir="desc"]     th[data-key="pin"]::after     { content:"▼"; opacity:.9; }
#tr[data-sort-key="pout"][data-sort-dir="asc"]     th[data-key="pout"]::after    { content:"▲"; opacity:.9; }
#tr[data-sort-key="pout"][data-sort-dir="desc"]    th[data-key="pout"]::after    { content:"▼"; opacity:.9; }
#tr[data-sort-key="settle"][data-sort-dir="asc"]   th[data-key="settle"]::after  { content:"▲"; opacity:.9; }
#tr[data-sort-key="settle"][data-sort-dir="desc"]  th[data-key="settle"]::after  { content:"▼"; opacity:.9; }
#tr[data-sort-key="badges"][data-sort-dir="asc"]   th[data-key="badges"]::after  { content:"▲"; opacity:.9; }
#tr[data-sort-key="badges"][data-sort-dir="desc"]  th[data-key="badges"]::after  { content:"▼"; opacity:.9; }

/* ===== 정렬 화살표 (Holdings #hOpt) ===== */
#hOpt[data-sort-key="expiry"][data-sort-dir="asc"]    th[data-key="expiry"]::after   { content:"▲"; opacity:.9; }
#hOpt[data-sort-key="expiry"][data-sort-dir="desc"]   th[data-key="expiry"]::after   { content:"▼"; opacity:.9; }
#hOpt[data-sort-key="dte"][data-sort-dir="asc"]       th[data-key="dte"]::after      { content:"▲"; opacity:.9; }
#hOpt[data-sort-key="dte"][data-sort-dir="desc"]      th[data-key="dte"]::after      { content:"▼"; opacity:.9; }
#hOpt[data-sort-key="type"][data-sort-dir="asc"]      th[data-key="type"]::after     { content:"▲"; opacity:.9; }
#hOpt[data-sort-key="type"][data-sort-dir="desc"]     th[data-key="type"]::after     { content:"▼"; opacity:.9; }
#hOpt[data-sort-key="side"][data-sort-dir="asc"]      th[data-key="side"]::after     { content:"▲"; opacity:.9; }
#hOpt[data-sort-key="side"][data-sort-dir="desc"]     th[data-key="side"]::after     { content:"▼"; opacity:.9; }
#hOpt[data-sort-key="strike"][data-sort-dir="asc"]    th[data-key="strike"]::after   { content:"▲"; opacity:.9; }
#hOpt[data-sort-key="strike"][data-sort-dir="desc"]   th[data-key="strike"]::after   { content:"▼"; opacity:.9; }
#hOpt[data-sort-key="qty"][data-sort-dir="asc"]       th[data-key="qty"]::after      { content:"▲"; opacity:.9; }
#hOpt[data-sort-key="qty"][data-sort-dir="desc"]      th[data-key="qty"]::after      { content:"▼"; opacity:.9; }
#hOpt[data-sort-key="notional"][data-sort-dir="asc"]  th[data-key="notional"]::after { content:"▲"; opacity:.9; }
#hOpt[data-sort-key="notional"][data-sort-dir="desc"] th[data-key="notional"]::after { content:"▼"; opacity:.9; }
#hOpt[data-sort-key="potcash"][data-sort-dir="asc"]   th[data-key="potcash"]::after  { content:"▲"; opacity:.9; }
#hOpt[data-sort-key="potcash"][data-sort-dir="desc"]  th[data-key="potcash"]::after  { content:"▼"; opacity:.9; }

/* ===== 타입/사이드 배지 (unprefixed — legacy/g2 compat) ===== */
.btype { border-radius:999px; padding:3px 10px; font-weight:600; font-size:11px; display:inline-flex; align-items:center; gap:6px; border:1px solid var(--br,#1e3a5f); position:relative; }
.btype-CC      { background:#0f2734; color:#bfe9ff; }
.btype-CSPREAD { background:#182a1f; color:#c7f7d9; }
.btype-PSPREAD { background:#2a1a1a; color:#ffd1d1; }
.btype-DIA     { background:#241b2f; color:#e3d6ff; }
.btype-SYN     { background:#1f2634; color:#e6f0ff; }
.btype-DERIVED { background:#1c1c2a; color:#d0d0ff; }

.bside { border-radius:999px; padding:3px 10px; font-weight:700; font-size:11px; display:inline-flex; align-items:center; gap:6px; border:1px solid var(--br,#1e3a5f); position:relative; }
.bside-S  { background:#2a1717; color:#ffbdbd; }
.bside-B  { background:#0f2a21; color:#bdfce0; }
.bside-CR { background:#102c19; color:#c6ffd9; }
.bside-DB { background:#2c1a10; color:#ffd0b9; }

.pill { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border:1px solid var(--br,#1e3a5f); border-radius:999px; background:#0f1b2b; font-size:11px; position:relative; }
.pill.good { background:#0f271f; border-color:#1d3b2f; color:#a7f3c3; }
.pill.bad  { background:#2a1212; border-color:#3a1a1a; color:#ffb3b3; }

.btype:hover::after, .bside:hover::after, .pill:hover::after {
  content: attr(data-tip);
  position: absolute; left: 0; top: 125%;
  background: #0b1322; border: 1px solid #253044; border-radius: 10px; padding: 10px 12px;
  color: #dbe8ff; width: max-content; max-width: 240px; line-height: 1.45; z-index: 100;
  box-shadow: 0 10px 24px rgba(0,0,0,.35); white-space: nowrap; overflow: hidden;
}

/* ===== 타입/사이드 배지 (ymx- 접두사 — g1 JS 전용) ===== */
.ymx-btype { border-radius:999px; padding:3px 10px; font-weight:600; font-size:11px; display:inline-flex; align-items:center; gap:6px; border:1px solid var(--br,#1e3a5f); position:relative; white-space:nowrap; }
.ymx-btype-CC      { background:#0f2734; color:#bfe9ff; }
.ymx-btype-CSPREAD { background:#182a1f; color:#c7f7d9; }
.ymx-btype-PSPREAD { background:#2a1a1a; color:#ffd1d1; }
.ymx-btype-DIA     { background:#241b2f; color:#e3d6ff; }
.ymx-btype-SYN     { background:#1f2634; color:#e6f0ff; }
.ymx-btype-DERIVED { background:#1c1c2a; color:#d0d0ff; }

.ymx-bside { border-radius:999px; padding:3px 10px; font-weight:700; font-size:11px; display:inline-flex; align-items:center; gap:6px; border:1px solid var(--br,#1e3a5f); position:relative; white-space:nowrap; }
.ymx-bside-S  { background:#2a1717; color:#ffbdbd; }
.ymx-bside-B  { background:#0f2a21; color:#bdfce0; }
.ymx-bside-CR { background:#102c19; color:#c6ffd9; }
.ymx-bside-DB { background:#2c1a10; color:#ffd0b9; }

/* tag (Badges 컬럼 pill) */
.ymx-tag { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border:1px solid var(--br,#1e3a5f); border-radius:999px; background:#0f1b2b; font-size:11px; position:relative; white-space:nowrap; color:#cfddf0; }
.ymx-tag.good { background:#0f271f; border-color:#1d3b2f; color:#a7f3c3; }
.ymx-tag.bad  { background:#2a1212; border-color:#3a1a1a; color:#ffb3b3; }

/* tooltip (hover) — ymx-prefixed badges */
.ymx-btype:hover::after,
.ymx-bside:hover::after,
.ymx-tag:hover::after {
  content: attr(data-tip);
  position: absolute; left: 0; top: 125%;
  background: #0b1322; border: 1px solid #253044; border-radius: 10px; padding: 10px 12px;
  color: #dbe8ff; width: max-content; max-width: 240px; line-height: 1.45; z-index: 100;
  box-shadow: 0 10px 24px rgba(0,0,0,.35); white-space: nowrap; overflow: hidden;
}

/* ===== Ad slot ===== */
.ymx-ad-slot { margin: 14px 0; }
.ymx-ad-slot:empty { display: none; }
.ymx-ad-primary {
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.14);
  background: rgba(255,255,255,.02);
}
@media (max-width: 720px) {
  .ymx-ad-slot { margin: 10px 0; }
}

/* ===========================
   SSR text blocks (Top/Bottom)
   =========================== */
.tkr-ssr {
  padding: 14px 2px 12px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--br, #1e3a5f);
}
.tkr-ssr__title {
  font-size: 20px;
  font-weight: 900;
  color: #eaf2ff;
  margin: 0 0 10px;
  letter-spacing: .2px;
}
.tkr-ssr__lead {
  font-size: 13px;
  color: var(--mut, #6b8aad);
  line-height: 1.75;
  margin: 0 0 10px;
}
.tkr-ssr__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.tkr-ssr__link {
  font-size: 12px;
  color: #cfe0ff;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--br, #1e3a5f);
  border-radius: 999px;
  background: #10233a;
}
.tkr-ssr__link:hover { border-color: rgba(56,189,248,.35); }
.tkr-ssr__noscript {
  margin-top: 10px;
  font-size: 12px;
  color: #ffb3b3;
  padding: 8px 12px;
  border: 1px solid #401c1c;
  border-radius: 8px;
  background: #1a0a0a;
}

/* ===== quicknav (G2와 동일 — ymx- 접두사 없는 클래스명 기준) ===== */
.quicknav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
  margin-bottom:12px;
}
@media(max-width:720px){
  .quicknav{ flex-wrap:wrap; }
}

.quicknav .spacer{ flex:1; min-width:12px; }
@media(max-width:720px){
  .quicknav .spacer{ display:none; }
}

.quicknav .qgroup{
  height:30px;
  display:inline-flex;
  align-items:center;
}

/* ← Hub / base button */
.qbtn{
  background:#132840;
  border:1px solid #1f3a5f;
  border-radius:999px;
  padding:12px 20px;
  color:#ffffff;
  text-decoration:none;
  font-size:17px;
  font-weight:800;
  line-height:1;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:background .15s ease, transform .1s ease;
}
.qbtn:hover{
  background:#1b3a60;
  transform:translateY(-1px);
  filter:brightness(1.08);
}
.qbtn-back{ /* semantic hook only — inherits .qbtn */ }

/* ticker dropdown: G2와 동일 */
.quicknav #tickerSel{
  width:auto;
  flex:0 0 auto;
  min-width:160px;
  max-width:240px;
  height:44px;
  font-size:16px;
  font-weight:800;
  line-height:1;
  padding:10px 14px;
  margin-left:8px;
  background:#ffffff;
  color:#0b1220;
  border:1px solid #cbd5e1;
  border-radius:999px;
  appearance:auto;
}
.quicknav #tickerSel option{
  background:#ffffff;
  color:#0b1220;
}
.quicknav #tickerSel:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(59,130,246,.25);
}
@media(max-width:720px){
  .quicknav #tickerSel{
    width:100%;
    max-width:none;
    margin-left:0;
  }
}

#groupFixed.badge.qgroup{
  height:44px;
  display:inline-flex;
  align-items:center;
  padding:0 16px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
}

.tkr-notes p {
  font-size: 13px;
  color: var(--mut, #6b8aad);
  line-height: 1.75;
  margin: 0 0 12px;
}
.tkr-notes__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.tkr-notes__link {
  font-size: 12px;
  color: #cfe0ff;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--br, #1e3a5f);
  border-radius: 999px;
  background: #10233a;
}
.tkr-notes__link:hover { border-color: rgba(56,189,248,.35); }
.tkr-notes__disclaimer {
  font-size: 11px;
  color: #6b7a8d;
  margin: 8px 0 0;
}

@media (max-width: 520px) {
  .tkr-ssr__title { font-size: 18px; }
}

/* mobile overflow patch */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* ===== Fund blurb collapsible ===== */
.fund-blurb-details {
  border: 1px solid var(--br, #1e3a5f);
  border-radius: 12px;
  background: #0d1b2a;
  margin: 14px 0 8px;
  padding: 0 16px;
}
.fund-blurb-summary {
  cursor: pointer;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 700;
  color: #9fb0c3;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.fund-blurb-summary::-webkit-details-marker { display: none; }
.fund-blurb-summary::before {
  content: "▶";
  font-size: 9px;
  transition: transform .2s ease;
  color: #6b8aad;
}
.fund-blurb-details[open] .fund-blurb-summary::before {
  transform: rotate(90deg);
}
.fund-blurb-details .fund-intro p {
  font-size: 13px;
  color: var(--mut, #6b8aad);
  line-height: 1.75;
  margin: 0 0 10px;
}
