/* Child-window shell only. Authentication, profile and native access dialogs
   remain owned by the existing application and are never hidden here. */
.gp-native-tool-bar{box-sizing:border-box;position:relative;z-index:110;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:10px 14px;background:#07151d;border-bottom:1px solid #1d4a55;color:#d9f5f8;font:12px/1.45 Inter,Arial,sans-serif}
.gp-native-tool-heading{display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;min-width:0}
.gp-native-tool-heading strong{color:#5eead4;font-size:14px}
.gp-native-tool-market{color:#a9c6d1;overflow-wrap:anywhere}
.gp-native-tool-status{grid-column:1;grid-row:2;margin:0;color:#b7cbd5;overflow-wrap:anywhere}
.gp-native-tool-actions{grid-column:2;grid-row:1 / span 2;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.gp-native-tool-actions button,.gp-native-tool-actions a{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 10px;border:1px solid #29616b;border-radius:8px;background:#102a33;color:#e2f8ff;text-decoration:none;font:600 12px/1.2 Inter,Arial,sans-serif;cursor:pointer}
.gp-native-tool-actions button:disabled{opacity:.55;cursor:wait}
.gp-native-tool-actions :focus-visible{outline:2px solid #39dfcf;outline-offset:2px}
/* 065: compact native market control, only mounted in chart-first children. */
.gp-native-tool-pair-control{position:relative;display:flex;min-width:0;margin:0}
.gp-native-tool-pair-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#gp-native-tool-pair{box-sizing:border-box;width:100%;min-width:0;max-width:112px;min-height:36px;padding:6px;border:1px solid #29616b;border-radius:8px;background:#102a33;color:#e2f8ff;font:600 12px/1.2 Inter,Arial,sans-serif;cursor:pointer;color-scheme:dark}
#gp-native-tool-pair:disabled{opacity:.55;cursor:wait}
.gp-native-tool-bar[data-phase="error"] .gp-native-tool-status,.gp-native-tool-bar[data-phase="invalid"] .gp-native-tool-status,.gp-native-tool-bar[data-phase="denied"] .gp-native-tool-status{color:#ffd18a}
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) .gp-market-overview,
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) .gp-terminal-side,
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) .gp-mobile-quick-rail,
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) #gp-mobile-action-dock,
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) .bottom-nav,
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) .gp-terminal-bottom,
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) [data-tv-action="cleanChart"],
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) #gp-clean-flow,
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) [data-mobile-action="clean"],
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) .header > :not(#gp-auth-widget):not(.header__logo){display:none!important}
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) #app:not(.prime-hidden-app):not([hidden]):not([style*="display: none"]):not([style*="display:none"]){display:flex!important;flex-direction:column!important;grid-template-columns:none!important;grid-template-rows:none!important;gap:0!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;padding:0!important}
body.gp-native-tool-window #app.prime-hidden-app,body.gp-native-tool-window #app[hidden]{display:none!important}
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) .header{position:relative!important;top:auto!important;min-height:40px!important;height:auto!important;padding:4px 12px!important;flex:0 0 auto!important}
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) .main{margin:0!important;padding:0!important;min-width:0!important;min-height:420px!important;height:calc(100dvh - 126px)!important;max-height:none!important;flex:1 1 auto!important;width:100%!important}
body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) .chart-container{width:100%!important;min-width:0!important;min-height:400px!important;height:100%!important;max-height:none!important;margin:0!important}
body.gp-native-tool-window.gp-native-tool-preparing:is(.terminal-active,.gp-terminal-active) #app #chart-area,
body.gp-native-tool-window.gp-native-tool-preparing:is(.terminal-active,.gp-terminal-active) #app .chart-area{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
@media(max-width:600px){.gp-native-tool-bar{grid-template-columns:minmax(0,1fr);padding:9px 10px;gap:6px}.gp-native-tool-actions{grid-column:1;grid-row:3}.gp-native-tool-status{grid-column:1;grid-row:2}.gp-native-tool-actions button,.gp-native-tool-actions a{min-height:40px}.gp-native-tool-heading strong{font-size:13px}body.gp-native-tool-window:is(.terminal-active,.gp-terminal-active) .main{height:calc(100dvh - 196px)!important;min-height:390px!important}}

/* 064: dedicated native chart children share this layout; Script Lab does not.
   Its settings remain the original native panel, outside the chart flow. */
body.gp-native-chart-first-window.gp-native-chart-first-layout-active{display:flex!important;flex-direction:column!important;height:100vh!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important;margin:0!important;overflow:hidden!important}
body.gp-native-chart-first-window .gp-native-tool-bar{flex:0 0 auto;min-width:0}
body.gp-native-chart-first-window.gp-native-chart-first-layout-active #app:not(.prime-hidden-app):not([hidden]):not([style*="display: none"]):not([style*="display:none"]){flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:hidden!important;width:100%!important;margin:0!important}
body.gp-native-chart-first-window.gp-native-chart-first-layout-active #app > .main{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;padding-bottom:0!important;overflow:hidden!important}
/* Native signal cards and drawing controls use high z-indexes. Keep them
   inside each chart so Settings remains above it, below native dialogs. */
body.gp-native-chart-first-window.gp-native-chart-first-layout-active #app > .main{isolation:isolate!important}
body.gp-native-chart-first-window.gp-native-chart-first-layout-active #app .chart-container{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;padding-bottom:0!important;overflow:hidden!important}
body.gp-native-chart-first-window.gp-native-chart-first-layout-active #app #chart-area{flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important}
body.gp-native-chart-first-window.gp-native-chart-first-layout-active #app .gp-chart-card-head,
body.gp-native-chart-first-window.gp-native-chart-first-layout-active #app #timeframes,
body.gp-native-chart-first-window.gp-native-chart-first-layout-active #app #analytics{flex:0 0 auto!important}
body.gp-native-chart-first-window.gp-native-chart-first-layout-active #app #cvd-chart{flex:0 1 auto!important;min-height:0!important;max-height:25%!important}
body.gp-native-chart-first-window.gp-native-chart-first-layout-active #app > #sidebar{display:none!important}
/* .open is repeatedly set by the native owner after activation. It must not
   reveal settings until the user presses this window's Settings button. */
body.gp-native-chart-first-window #app #tools-panel{display:none!important}
body.gp-native-chart-first-window.gp-native-chart-first-layout-active.gp-native-orderflow-settings-open #app #tools-panel{box-sizing:border-box!important;display:flex!important;flex-direction:column!important;position:fixed!important;inset:auto!important;top:var(--gp-native-orderflow-drawer-top,0px)!important;right:10px!important;bottom:max(10px,env(safe-area-inset-bottom))!important;left:auto!important;width:min(420px,calc(100vw - 20px))!important;min-width:0!important;max-width:calc(100vw - 20px)!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important;transform:none!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;z-index:105!important;border:1px solid #29616b!important;border-radius:12px!important;background:#07151d!important;box-shadow:0 12px 40px #0009!important}
body.gp-native-chart-first-window #app #tools-panel .tools-panel__header{display:flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding:10px 12px!important;min-height:0!important}
body.gp-native-chart-first-window #app #tools-panel .tools-panel__header > div{min-width:0!important}
body.gp-native-chart-first-window #app #tools-panel .tools-panel__header strong{font-size:13px!important}
body.gp-native-chart-first-window #app #tools-panel .tools-panel__header span{display:block!important;font-size:11px!important;overflow-wrap:anywhere!important}
body.gp-native-chart-first-window #app #tools-panel #tools-panel-close{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 40px!important;width:40px!important;height:40px!important;min-height:40px!important}
body.gp-native-chart-first-window #app #tools-panel .tools-panel__body{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-width:0!important;min-height:0!important;max-height:none!important;padding:10px 12px!important;gap:12px!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable}
body.gp-native-chart-first-window #app #tools-panel .tools-panel__body > *{flex-shrink:0!important;min-width:0!important;max-width:100%!important}
body.gp-native-chart-first-window #app #tools-panel .gp-layer-toggles{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;width:100%!important}
body.gp-native-chart-first-window #app #tools-panel :focus-visible{outline:2px solid #39dfcf!important;outline-offset:2px}
body.gp-native-chart-first-window #gp-native-tool-settings[aria-expanded="true"]{background:#15535b;border-color:#5eead4;color:#fff}
@media(max-width:1000px){
 body.gp-native-chart-first-window .gp-native-tool-actions{grid-row:1}
 body.gp-native-chart-first-window .gp-native-tool-status{grid-column:1 / -1;grid-row:2}
}
@media(max-width:600px){
 body.gp-native-chart-first-window .gp-native-tool-bar{grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:7px 8px}
 body.gp-native-chart-first-window .gp-native-tool-heading{grid-column:1;grid-row:1;align-content:center;gap:3px;font-size:11px}
 body.gp-native-chart-first-window .gp-native-tool-heading strong{font-size:12px}
 body.gp-native-chart-first-window .gp-native-tool-actions{grid-column:2;grid-row:1;display:grid;grid-template-columns:minmax(0,1fr) 90px minmax(0,1fr);gap:4px;width:228px;max-width:72vw}
 body.gp-native-chart-first-window .gp-native-tool-actions button,body.gp-native-chart-first-window .gp-native-tool-actions a{min-height:36px;padding:5px 7px;font-size:11px}
 body.gp-native-chart-first-window #gp-native-tool-pair{min-height:36px;max-width:none;padding:5px 2px;font-size:11px}
 /* Pair repeats the symbol; native chart/time controls retain the interval.
    Keep the longer descriptive market line available to assistive readers. */
 body.gp-native-chart-first-window .gp-native-tool-market{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
 body.gp-native-chart-first-window .gp-native-tool-status{grid-column:1 / -1;grid-row:2;font-size:11px;line-height:1.35}
}
@media(max-height:500px){
 /* Short landscape charts cannot reserve the legacy 166px around Info.
    Keep the original help panel below its reachable Info/close button and
    let its text scroll within the remaining chart, without moving the chart. */
 body.gp-native-chart-first-window.gp-native-chart-first-layout-active #gp-prime-walls-overlay #gp-prime-walls-mode-help{top:64px!important;max-height:calc(100% - 70px)!important;padding:6px 10px!important;overscroll-behavior:contain}
}
.gp-native-feed-report{grid-column:1 / -1;font-size:11px;min-width:0;color:#a8c8cd}
.gp-native-feed-report summary{cursor:pointer;min-height:22px;line-height:22px}
.gp-native-feed-report textarea{display:block;box-sizing:border-box;width:100%;max-height:180px;margin:4px 0;padding:8px;background:#07151d;color:#d9ecee;border:1px solid #29616b;font:11px/1.4 ui-monospace,monospace;resize:vertical}
.gp-native-feed-report button{padding:5px 8px;margin-right:8px;border:1px solid #29616b;border-radius:5px;background:#12323d;color:#d9ecee;cursor:pointer}
.gp-native-feed-report :focus-visible{outline:2px solid #39dfcf;outline-offset:2px}
