/* The bar at the top of the pages (views/plan-bar.js, app.js syncPlanBar): 7 days before a plan paid with credit ends, and after it has ended. It is the first thing of the page area (a
   sibling above the page, not inside it), centred, and scrolls away with the page: not sticky. Its surface is the one of the portal's cards, its shadow is the portal's yellow (style.css
   --yellow, the same in both modes), the text is the colour of the text, and the button is a glass one (liquid/button.js lqButton: glass only where the switch is on). */
.plan-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px;
  margin: 18px var(--page-pad-r) 0 var(--page-pad-l); padding: 12px 20px;
  border-radius: 18px; background: var(--surface); color: var(--text); text-align: center;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--yellow) 55%, transparent), 0 6px 30px -4px color-mix(in srgb, var(--yellow) 60%, transparent);
}
/* A glass button is glass only over the page's own picture: an ancestor that paints a fill keeps it on its CSS look (liquid/picture.js paintsBetween). So where the glass is on
   (data-cards="new", which low graphics takes away) the bar paints no fill of its own: its edge and its yellow light are what draw it, as the page title beside it stands on the picture. */
:root[data-cards="new"] .plan-bar { background: transparent; }
.plan-bar-text { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; text-wrap: balance; }
.plan-bar-btn { flex: none; }

/* The frame: the bar is a row of the page column, above the page; the sidebar stands beside both. With no bar the frame is what shell.css says. */
@media (min-width: 761px) {
  .shell.has-plan-bar { grid-template-rows: auto minmax(0, 1fr); }
  .shell.has-plan-bar > .sidebar { grid-row: 1 / span 2; }
  .shell.has-plan-bar > .plan-bar { grid-column: 2; grid-row: 1; }
  .shell.has-plan-bar > .page { grid-column: 2; grid-row: 2; }
}
/* A phone: the bar is under the top bar of the shell (a row of its own, in the flow) and above the page; the tab bar at the bottom is fixed and has nothing to do with it. */
@media (max-width: 760px) {
  .plan-bar { margin: 12px 16px 0; padding: 12px 16px; }
}
