/* HOWE side panels: one shell for every panel that opens over the page (v20, 24 Nov).
   Guy's requirement (24 Nov): the drawers behave as one HOWE system. The reference is the site's existing Wishlist and Basket panel
   (howe-ui.css .hc-saved-*); the Filters drawer (howe-listing.css .fx-sheet--full) and the View pieces panel (ptp.css) follow it.
   Standalone handover build only: in production these rules replace the separate panel rules in howe-ui.css, howe-listing.css
   and ptp.css. Behaviour (focus, Escape, Back, reload) is in howe-panels.js and ptp.js. */
:root{
  --panel-w:min(420px,100vw);                 /* one width; full width on phones */
  --panel-pad:22px;                           /* header, content and footer inset */
  --panel-scrim:rgba(43,42,40,.28);
  --panel-in:.28s cubic-bezier(.22,.61,.36,1);   /* opens from the right; closes at once */
}

/* ---- the sheet ---- */
.hc-saved-panel,
.fx-panel.fx-sheet.fx-sheet--full,
.ptp-drawer .fdrawer-sheet{
  position:fixed;top:0;right:0;bottom:0;left:auto;height:100vh;height:100dvh;max-height:none;
  width:var(--panel-w);max-width:none;margin:0;padding:0;
  display:flex;flex-direction:column;overflow:hidden;
  background:var(--canvas);border:0;border-left:1px solid var(--border);border-radius:0;box-shadow:none;z-index:10000;
}
.hc-saved-panel[aria-hidden="true"],.hc-saved-panel:not([aria-hidden]){display:none;}
.fx-panel.fx-sheet.fx-sheet--full[hidden]{display:none;}

/* ---- the scrim ---- */
.hc-saved-backdrop,
.fx-scrim,
.ptp-drawer .fdrawer-scrim{position:fixed;inset:0;background:var(--panel-scrim);z-index:9999;}

/* ---- motion: the sheet comes in from the right, the scrim fades in; closing is immediate (all panels alike) ---- */
@keyframes howe-panel-in{from{transform:translateX(100%);}to{transform:none;}}
@keyframes howe-scrim-in{from{opacity:0;}to{opacity:1;}}
.hc-saved-panel[aria-hidden="false"],
.fx-panel.fx-sheet.fx-sheet--full:not([hidden]),
.ptp-drawer.is-open .fdrawer-sheet{animation:howe-panel-in var(--panel-in) both;}
.hc-saved-backdrop[aria-hidden="false"],
.fx-scrim,
.ptp-drawer.is-open .fdrawer-scrim{animation:howe-scrim-in .28s ease both;}
@media (prefers-reduced-motion:reduce){
  .hc-saved-panel,.fx-panel.fx-sheet.fx-sheet--full,.ptp-drawer .fdrawer-sheet,.hc-saved-backdrop,.fx-scrim,.ptp-drawer .fdrawer-scrim{animation:none !important;}
}

/* ---- header: title left, Close right, both on one centre line ---- */
.hc-saved-head,
.fx-panel.fx-sheet.fx-sheet--full .fx-panel-head,
.ptp-drawer .fdrawer-head{
  flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;min-height:0;
  padding:max(18px,env(safe-area-inset-top,0px)) var(--panel-pad) 18px;border-bottom:1px solid var(--border);background:var(--canvas);
}
.hc-saved-head h2,
.fx-panel.fx-sheet.fx-sheet--full .fx-panel-t,
.ptp-drawer .fdrawer-head h2{
  margin:0;min-width:0;font:400 20px/1.2 var(--ff-serif);letter-spacing:normal;text-transform:none;color:var(--ink);
}
.hc-saved-head h2:focus,.fx-panel.fx-sheet.fx-sheet--full .fx-panel-t:focus,.ptp-drawer .fdrawer-head h2:focus{outline:none;}   /* the heading takes focus on opening; it is not a control */
.hc-saved-close,
.fx-panel.fx-sheet.fx-sheet--full .fx-x,
.ptp-drawer .fdrawer-close{
  -webkit-appearance:none;appearance:none;flex:none;width:44px;height:44px;margin:0;padding:0;display:inline-flex;align-items:center;justify-content:center;
  background:none;border:1px solid var(--border);border-radius:0;color:var(--ink);font:18px/1 var(--ff-ui);cursor:pointer;
}
.hc-saved-close:hover,.hc-saved-close:focus-visible,
.fx-panel.fx-sheet.fx-sheet--full .fx-x:hover,.fx-panel.fx-sheet.fx-sheet--full .fx-x:focus-visible,
.ptp-drawer .fdrawer-close:hover,.ptp-drawer .fdrawer-close:focus-visible{background:var(--ink);color:var(--canvas);border-color:var(--ink);}
.hc-saved-close:focus-visible,.fx-panel.fx-sheet.fx-sheet--full .fx-x:focus-visible,.ptp-drawer .fdrawer-close:focus-visible{outline:2px solid var(--ink);outline-offset:3px;}
.hc-saved-close:focus:not(:focus-visible),.fx-panel.fx-sheet.fx-sheet--full .fx-x:focus:not(:focus-visible),.ptp-drawer .fdrawer-close:focus:not(:focus-visible){outline:none;}

/* ---- content: the one scrolling area, same inset ---- */
.hc-saved-list,
.fx-panel.fx-sheet.fx-sheet--full .fx-panel-body,
.ptp-drawer .fdrawer-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
.fx-panel.fx-sheet.fx-sheet--full .fx-panel-body{padding:8px var(--panel-pad) 12px;}
.ptp-drawer .ptp-dbody{padding:8px var(--panel-pad) 22px;}

/* ---- footer (where a panel has one): fixed under the content, same rule and inset ---- */
.fx-panel.fx-sheet.fx-sheet--full .fx-foot{flex:none;position:static;margin:0;padding:16px var(--panel-pad) max(16px,env(safe-area-inset-bottom,0px));border-top:1px solid var(--border);background:var(--canvas);}

/* ---- one scroll lock: Filters no longer move the page body (v21; the lock itself is in howe-listing.js in this build) ---- */
body.fx-locked{position:static !important;top:auto !important;left:auto !important;right:auto !important;width:auto !important;overflow:visible !important;}
