/* Cosmo Chart 0.11.28 — ergonomic timeframe favorites, distinct from the native OpenAlgo popup. */
.marketbar #cosmo-timeframes.timeframes{display:flex;align-items:center;max-width:min(500px,44vw);min-width:0;padding:2px 3px;gap:2px;flex:0 1 auto!important}
.cosmo-tf-quick{display:flex;align-items:center;gap:2px;min-width:0;overflow-x:auto;scrollbar-width:none}
.cosmo-tf-quick::-webkit-scrollbar{display:none}
.marketbar #cosmo-timeframes button{font-size:11px;line-height:1.1;white-space:nowrap;flex:0 0 auto;border:1px solid transparent;border-radius:6px;min-width:30px;min-height:30px;padding:6px 7px;background:transparent;color:var(--mono-text-muted,#9aaec3);font-weight:650;cursor:pointer}
.marketbar #cosmo-timeframes button:hover{color:var(--mono-text,#e5edf6);background:color-mix(in srgb,var(--mono-focus,#72b3ed) 10%,transparent)}
.marketbar #cosmo-timeframes .cosmo-tf-fast.active{color:#a4d8ff;background:color-mix(in srgb,#4597d2 23%,transparent);border-color:color-mix(in srgb,#4597d2 35%,transparent)}
.marketbar #cosmo-timeframes .cosmo-tf-toggle{display:inline-flex;align-items:center;gap:3px;justify-content:center;min-width:26px;border-left:1px solid var(--mono-border,#354252);border-radius:5px;padding:5px 5px}
.cosmo-tf-selected:empty{display:none}.cosmo-tf-chevron{font-size:18px;line-height:.7}
.marketbar #cosmo-timeframes .cosmo-tf-toggle.cosmo-tf-unpinned{color:#9fd0ff;background:color-mix(in srgb,#327db5 10%,transparent)}
.cosmo-tf-popover[hidden]{display:none!important}
.cosmo-tf-popover{position:fixed!important;left:var(--cosmo-tf-left,20px)!important;top:var(--cosmo-tf-top,80px)!important;width:min(360px,calc(100vw - 16px));max-height:min(440px,calc(100vh - 16px));overflow:hidden;display:flex;flex-direction:column;gap:8px;padding:14px;background:var(--mono-panel,#12191f);color:var(--mono-text,#e8eef3);border:1px solid var(--mono-border,#415161);border-radius:14px;box-shadow:0 16px 46px #0008;z-index:15000;box-sizing:border-box;font-family:system-ui,-apple-system,Segoe UI,sans-serif}
.cosmo-tf-heading{display:flex;justify-content:space-between;align-items:baseline;gap:5px;font-size:14px}
.cosmo-tf-heading span{color:var(--mono-text-muted,#8c9fae);font-size:11px}
.cosmo-tf-search{display:block;width:100%;box-sizing:border-box;min-height:34px;background:var(--mono-raise,#1c2833);border:1px solid var(--mono-border,#475566);border-radius:8px;padding:7px 10px;color:inherit;font:inherit;font-size:12px;outline:none}
.cosmo-tf-search:focus{border-color:#65a9e8;box-shadow:0 0 0 2px #65a9e822}
.cosmo-tf-list{overflow:auto;min-height:50px;overscroll-behavior:contain;scrollbar-width:thin;padding-right:1px}
.cosmo-tf-group{padding:0 0 9px}.cosmo-tf-group h3{margin:6px 0 7px;font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:var(--mono-text-muted,#8a9cad);font-weight:700}
.cosmo-tf-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.cosmo-tf-cell{min-width:0;display:flex;align-items:center;border:1px solid var(--mono-border,#3b495a);border-radius:8px;overflow:hidden;background:var(--mono-raise,#1b242e)}
.cosmo-tf-cell button{border:0;color:inherit;background:transparent;cursor:pointer;transition:background .12s,color .12s;min-height:37px}
.cosmo-tf-cell button:hover{background:color-mix(in srgb,#549dda 15%,transparent)}
.cosmo-tf-pick{flex:1;min-width:0;font-size:12px;font-weight:650;text-align:left;padding:9px 4px 9px 10px}
.cosmo-tf-pick.active{color:#9cd4ff;background:color-mix(in srgb,#2475b8 18%,transparent)}
.cosmo-tf-star{width:29px;min-width:29px;font-size:19px;line-height:1;border-left:1px solid var(--mono-border,#394b5d)!important;color:var(--mono-text-muted,#708398)!important}
.cosmo-tf-star.pinned{color:#e0b859!important}
.cosmo-tf-footer{border-top:1px solid var(--mono-border,#415161);padding-top:10px;text-align:center;font-size:10px;color:var(--mono-text-muted,#96a9b9)}
.cosmo-tf-empty{padding:15px;font-size:12px;text-align:center;color:var(--mono-text-muted,#96a9b9)}
.cosmo-tf-popover button:focus-visible,.marketbar #cosmo-timeframes button:focus-visible{outline:2px solid #76baff;outline-offset:-2px}
@media(max-width:1100px){.marketbar #cosmo-timeframes.timeframes{max-width:min(390px,43vw)}.marketbar #cosmo-timeframes button{padding:6px 5px}}
@media(max-width:700px){.marketbar #cosmo-timeframes.timeframes{max-width:55vw}.cosmo-tf-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.cosmo-tf-popover{padding:12px}}
@media(prefers-reduced-motion:reduce){.cosmo-tf-cell button{transition:none}}
/* Keep light-mode contrast: styles participate in Cosmo's theme variables. */
html[data-theme="light"] .cosmo-tf-popover{background:#ffffff;color:#26384c;box-shadow:0 10px 35px #17355a33}
html[data-theme="light"] .cosmo-tf-cell{background:#f5f8fc}
html[data-theme="light"] .cosmo-tf-search{background:#f8fbff;color:#21354a}
html[data-theme="light"] .marketbar #cosmo-timeframes .cosmo-tf-fast.active{color:#1765a3}
