/* =============================================================
   AKU WORLD 2.0 · book ordering drawer  ·  styles/v2-order.css
   The live site's drawer (styles/pyra.css, ".bay") in the V2 design
   system. Side panel on desktop, bottom sheet on phones.
   The accent follows the world rule: Energy Green for Ibra, Starlight for Pyra.
   ============================================================= */
html.order-open, html.order-open body{ overflow:hidden; }
.order{ position:fixed; inset:0; z-index:900; --acc:var(--starlight); color:#fff; font-family:var(--body); }
.order[hidden]{ display:none; }
.order[data-book="ibra"]{ --acc:var(--energy); }
.order__sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.order__backdrop{ position:absolute; inset:0; background:rgba(11,10,18,.72); opacity:0; transition:opacity .3s ease; }
.order__panel{ position:absolute; top:0; right:0; bottom:0; width:min(500px,100vw); display:flex; flex-direction:column; background:var(--night); border-left:2px solid var(--acc); transform:translateX(100%); transition:transform .38s cubic-bezier(.2,.8,.2,1); outline:none; }
.order.is-open .order__backdrop{ opacity:1; }
.order.is-open .order__panel{ transform:none; }
.order__grab{ display:none; }
.order__head{ position:relative; flex:none; padding:28px 84px 20px 28px; }
.order__title{ margin:0; font-family:var(--ui); font-weight:800; font-size:1.6rem; line-height:1.1; letter-spacing:-.018em; }
.order__x{ position:absolute; top:20px; right:20px; width:48px; height:48px; display:grid; place-items:center; padding:0; border:2px solid rgba(255,255,255,.5); border-radius:var(--radius); background:transparent; color:#fff; font-size:28px; line-height:1; cursor:pointer; }
.order__x:hover{ background:#fff; color:var(--deep); border-color:#fff; }
.order :focus-visible{ outline:3px solid var(--starlight); outline-offset:2px; }
.order__scroll{ flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding:0 28px 20px; }
.order__tabs{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.order__tab{ appearance:none; text-align:left; cursor:pointer; min-height:48px; padding:12px 14px; border:2px solid rgba(255,255,255,.28); border-radius:var(--radius); background:transparent; color:rgba(255,255,255,.82); font-family:var(--ui); font-weight:800; font-size:15px; line-height:1.2; }
.order__tab span, .order__tab em{ display:block; font-style:normal; font-weight:500; font-size:13px; color:rgba(255,255,255,.72); }
.order__tab span{ margin-bottom:4px; } .order__tab em{ margin-top:4px; }
.order__tab:hover{ border-color:#fff; color:#fff; }
.order__tab[aria-selected="true"]{ color:#fff; border-color:var(--acc); background:rgba(255,255,255,.06); }
.order__tab[aria-selected="true"] span, .order__tab[aria-selected="true"] em{ color:var(--acc); }
.order__pane{ padding-top:24px; }
.order__pane[hidden]{ display:none; }
.order__book{ display:flex; align-items:center; gap:18px; margin-bottom:22px; }
.order__book img{ width:92px; height:auto; flex:none; border-radius:2px; box-shadow:6px 7px 0 var(--acc); margin:0 7px 7px 0; }
.order__k{ margin:0 0 4px; font-family:var(--ui); font-weight:500; font-size:14px; color:var(--acc); }
.order__name{ margin:0; font-family:var(--display); font-weight:900; text-transform:uppercase; font-size:1.2rem; line-height:1.05; }
.order__meta{ margin:8px 0 0; font-size:14px; line-height:1.4; color:rgba(255,255,255,.82); }
.order__lead{ margin:0 0 10px; font-family:var(--ui); font-weight:500; font-size:14px; color:rgba(255,255,255,.82); }
.order__stores{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.order__store{ display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:56px; padding:8px 14px; border:2px solid rgba(255,255,255,.28); border-radius:var(--radius); color:#fff; text-decoration:none; font-family:var(--ui); font-weight:800; font-size:15px; line-height:1.15; }
.order__go{ flex:none; color:var(--acc); }
.order__store:hover{ background:var(--acc); border-color:var(--acc); color:#15131C; }
.order__store:hover .order__go{ color:#15131C; }
.order__remind{ margin-top:18px; border-top:1px solid rgba(255,255,255,.2); }
.order__remind summary{ list-style:none; cursor:pointer; display:flex; align-items:center; min-height:48px; font-family:var(--ui); font-weight:500; font-size:14px; text-decoration:underline; text-underline-offset:4px; }
.order__remind summary::-webkit-details-marker{ display:none; }
.order__form-row{ display:flex; gap:8px; }
.order__form-row input{ flex:1; min-width:0; min-height:48px; padding:0 12px; border-radius:var(--radius); border:2px solid rgba(255,255,255,.4); background:#fff; color:var(--deep); font:inherit; font-size:16px; }
.order__form-row button{ flex:none; min-height:48px; padding:0 16px; border:0; border-radius:var(--radius); cursor:pointer; background:var(--starlight); color:#1B1608; font-family:var(--ui); font-weight:800; font-size:14px; text-transform:uppercase; letter-spacing:.02em; }
.order__consent{ display:flex; align-items:flex-start; gap:10px; margin-top:12px; cursor:pointer; font-size:14px; line-height:1.4; color:rgba(255,255,255,.85); }
.order__consent input{ flex:none; width:20px; height:20px; margin:0; accent-color:var(--starlight); }
.order__consent a{ color:#fff; }
.order__hp{ position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
.order__msg{ margin:10px 0 0; min-height:1.2em; font-size:14px; }
.order__form.is-error .order__msg{ color:#FFB4AE; }
.order__foot{ flex:none; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; padding:16px 28px calc(20px + env(safe-area-inset-bottom, 0px)); border-top:1px solid rgba(255,255,255,.2); font-size:14px; }
.order__foot a, .order__share{ display:inline-flex; align-items:center; min-height:44px; color:#fff; font-family:var(--ui); font-weight:500; font-size:14px; text-decoration:underline; text-underline-offset:4px; background:none; border:0; padding:0; cursor:pointer; }
.order__foot a:hover, .order__share:hover{ color:var(--acc); }

@media (max-width:760px){
  .order__panel{ top:auto; left:0; width:100%; max-height:90svh; border-left:0; border-top:2px solid var(--acc); transform:translateY(100%); }
  .order.is-dragging .order__panel{ transition:none; }
  .order__grab{ display:block; flex:none; width:44px; height:4px; margin:10px auto 0; border-radius:2px; background:rgba(255,255,255,.4); }
  .order__head{ padding:14px 76px 14px 20px; }
  .order__title{ font-size:1.3rem; }
  .order__x{ top:8px; right:12px; }
  .order__scroll{ padding:0 20px 16px; }
  .order__pane{ padding-top:18px; }
  .order__book{ margin-bottom:16px; gap:14px; }
  .order__book img{ width:68px; }
  .order__name{ font-size:1.05rem; }
  .order__tab{ padding:10px 12px; font-size:14px; }
  .order__store{ min-height:52px; padding:6px 12px; font-size:14px; }
  .order__foot{ padding:10px 20px calc(14px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion:reduce){ .order__panel, .order__backdrop{ transition:none; } }
/* phones: the close button sits clear of the book tabs */
@media (max-width:760px){
  .order__head{ min-height:64px; padding:18px 76px 18px 20px; display:flex; align-items:center; }
  .order__x{ top:8px; right:12px; }
  .order__tabs{ margin-top:8px; }
}
/* phones: shorter sheet as a baseline; js/v2-order.js then sizes it from the visible screen */
@media (max-width:760px){ .order__panel{ max-height:84svh; } }

/* phones: full-height sheet, everything visible at once, no scrolling (Micah, 2026-10-10).
   The store buttons share whatever height is left, so the list always fits. */
@media (max-width:760px){
  .order__panel{ top:0; bottom:0; height:100dvh; max-height:none; border-top:0; }
  .order__grab{ display:none; }
  .order__head{ padding-top:calc(14px + env(safe-area-inset-top, 0px)); min-height:calc(64px + env(safe-area-inset-top, 0px)); }
  .order__x{ top:calc(8px + env(safe-area-inset-top, 0px)); }
  .order__scroll{ display:flex; flex-direction:column; overflow:hidden; padding-bottom:12px; }
  .order__tabs{ flex:none; }
  .order__pane{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
  .order__book, .order__lead{ flex:none; }
  .order__stores{ flex:1 1 auto; min-height:0; grid-auto-rows:minmax(40px,1fr); max-height:420px; }
  .order__stores li{ display:flex; min-height:0; }
  .order__store{ flex:1; min-height:0; }
}
@media (max-width:760px) and (max-height:640px){
  .order__head{ min-height:52px; padding-top:10px; padding-bottom:10px; } .order__title{ font-size:1.15rem; } .order__x{ width:44px; height:44px; top:4px; }
  .order__tab{ min-height:0; padding:8px 10px; font-size:13px; } .order__tab em{ display:none; }
  .order__pane{ padding-top:12px; } .order__book{ margin-bottom:10px; } .order__book img{ width:48px; box-shadow:4px 5px 0 var(--acc); }
  .order__name{ font-size:.95rem; } .order__meta{ margin-top:4px; font-size:13px; } .order__lead{ margin-bottom:6px; }
  .order__store{ font-size:13px; padding:4px 10px; }
  .order__foot{ padding-top:6px; padding-bottom:calc(8px + env(safe-area-inset-bottom, 0px)); }
}
