/* 12-mmx-topbar.css  |  MMX TOP BAR + BIGGER WORKSPACE (load it last, after 11-idcar.css)
   WHAT IT DOES: a teal top bar like id-print.html. Logo + Send to ID Print on the left, every tool button in its usual order,
                 and Donate/Feedback/Review, Install, Dark mode and the legal links inside the ⋮ menu. The page area loses its
                 1300px limit so the grid uses the whole screen.
   WHAT YOU CAN SAFELY CHANGE: the bar colours in the first block. Wide screens (1360px+) show one row, smaller screens two rows,
                 phones keep the 7-column button grid from file 07.
   NEEDS: index.html header with #moreWrap. To go back to the old look, remove the <link> to this file. */

/* ---------- bar colours (follow light / dark mode like 01-base.css) ---------- */
:root{--bar:#0e6b73;--bar-ink:#fff;--bar-btn:rgba(255,255,255,.14);--bar-btn-h:rgba(255,255,255,.26);--bar-pri-bg:#fff;--bar-pri-ink:#0e6b73}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--bar:#0b3f45;--bar-ink:#e6f6f7;--bar-btn:rgba(255,255,255,.1);--bar-btn-h:rgba(255,255,255,.2);--bar-pri-bg:#3fb6c0;--bar-pri-ink:#07191b}}
:root[data-theme="dark"]{--bar:#0b3f45;--bar-ink:#e6f6f7;--bar-btn:rgba(255,255,255,.1);--bar-btn-h:rgba(255,255,255,.2);--bar-pri-bg:#3fb6c0;--bar-pri-ink:#07191b}

/* ---------- the bar: logo | tool buttons | ⋮   (stays sticky at the top, as in 01-base.css) ---------- */
header{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"logo tb more";align-items:center;gap:8px 10px;
  padding:7px 12px!important;background:var(--bar)!important;color:var(--bar-ink)!important;border-bottom:0!important;box-shadow:0 2px 8px rgba(0,0,0,.22)}
header h1{grid-area:logo;display:flex;align-items:center;gap:10px;margin:0!important;font-size:15px!important;font-weight:800;color:var(--bar-ink);white-space:nowrap}
header h1 button{height:34px;margin:0;padding:0 12px;border:0;border-radius:9px;background:var(--bar-btn);color:var(--bar-ink);font-size:12px;font-weight:600}
header h1 button:hover{background:var(--bar-btn-h)}
#moreWrap{grid-area:more;position:relative}
@media (max-width:1359px){
  header{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"logo more" "tb tb"}
}

/* ---------- tool buttons: same order, icon above label, every button visible ---------- */
header .tb{grid-area:tb;order:0!important;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(58px,1fr));gap:5px;
  flex:none!important;width:auto!important;min-width:0;margin:0;overflow:visible!important;align-items:stretch}
header .tb .sep{display:none!important}
header .tb button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%!important;min-width:0!important;
  min-height:44px!important;padding:4px 2px!important;border:0!important;border-radius:9px;background:var(--bar-btn)!important;color:var(--bar-ink)!important;
  font-size:11px!important;line-height:1.15;font-weight:600;box-shadow:none}
header .tb button b{font-size:16px!important;font-weight:400;line-height:1;color:inherit}
header .tb button:hover:not(:disabled){background:var(--bar-btn-h)!important}
header .tb button.primary{background:var(--bar-pri-bg)!important;color:var(--bar-pri-ink)!important}
header .tb button:disabled{opacity:.4!important}

/* ---------- ⋮ menu (a card that follows light / dark mode) ---------- */
#moreBtn{width:38px;height:36px;border:0;border-radius:9px;background:var(--bar-btn);color:var(--bar-ink);font-size:20px;line-height:1;padding:0}
#moreBtn:hover{background:var(--bar-btn-h)}
#moreMenu{display:none;position:absolute;right:0;top:calc(100% + 10px);z-index:30;width:min(300px,calc(100vw - 16px));max-height:calc(100vh - 90px);overflow-y:auto;
  background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:14px;padding:12px;box-shadow:0 16px 40px rgba(0,0,0,.3)}
@supports(height:100dvh){#moreMenu{max-height:calc(100dvh - 90px)}}
#moreMenu.open{display:flex;flex-direction:column;gap:10px}
#moreMenu .support{display:flex!important;flex-direction:column!important;flex:none!important;gap:8px!important;margin:0!important;padding:0!important;width:100%!important;justify-content:flex-start}
#moreMenu .support button,#moreMenu #install,#moreMenu #theme{width:100%!important;margin:0!important}
#moreMenu .copy2{margin:0!important;padding:8px 2px 0!important;border-top:1px solid var(--line);font-size:11px!important;line-height:1.5;color:var(--mute)!important;text-align:left!important;white-space:normal!important}
#moreMenu .copy2 .lnk{font-size:11px!important}

/* ---------- bigger workspace (02 already makes the page grid its own scroll area; this only removes the 1500px limit) ---------- */
main{max-width:none!important;margin:0!important;padding:12px 14px!important}

/* ---------- phone: keep the 7-column grid from file 07, just recoloured ---------- */
@media (max-width:860px){
  header{padding:6px 8px!important;gap:6px 8px}
  header h1{font-size:13px!important;gap:6px}
  header h1 button{padding:0 9px}
  header .tb{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:4px}
  header .tb button{min-height:42px!important;padding:3px 1px!important;font-size:10px!important}
  header .tb button b{font-size:15px!important}
  main{padding:8px!important}
}
/* ---------- options pop-up: Edit page / Sheet layout / Compress ... buttons ----------
   Same compact, rounded, one-row look as the top bar. Colours, backgrounds, borders and hover are NOT set here,
   so they stay exactly as in 01-base.css (white button, accent border on hover, accent fill when selected). */
aside nav.tabs{flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden;gap:6px!important;padding:10px 16px!important;
  border-bottom:1px solid var(--line);scrollbar-width:none;-ms-overflow-style:none}
aside nav.tabs::-webkit-scrollbar{display:none}
aside nav.tabs button{flex:1 0 auto!important;white-space:nowrap;height:36px;min-height:0!important;padding:0 14px!important;
  border-radius:9px!important;font-size:13px!important;font-weight:600;line-height:1}
aside .ohead button{height:36px;padding:0 14px;border-radius:9px;font-weight:600}
@media (max-width:860px){aside nav.tabs{padding:8px 10px!important}aside nav.tabs button{padding:0 12px!important}}
/* One top row in the pop-up: [title]  [ tab buttons ...... ]  [Close]  (tabs are moved here by the script in index.html) */
aside .ohead{gap:10px!important;padding:10px 16px!important;padding-top:calc(10px + env(safe-area-inset-top,0px))!important}
aside .ohead h2{flex:none!important;margin:0;font-size:16px!important;white-space:nowrap}
aside .ohead nav.tabs{flex:1 1 auto;min-width:0;padding:0!important;border-bottom:0!important}
aside .ohead #oclose{flex:none;margin-left:14px}
@media (max-width:1299px){aside .ohead h2{display:none}}
@media (max-width:860px){aside .ohead{gap:8px!important;padding:8px 10px!important;padding-top:calc(8px + env(safe-area-inset-top,0px))!important}aside .ohead #oclose{margin-left:6px;padding:0 10px}}
aside .ohead{flex-wrap:nowrap!important}
aside .box .tabtitle{display:none!important}
@media print{#moreWrap{display:none!important}}
