/*
 * EmRuth 2026 drawer.css (Package C, contract 7.5). Every page except cart and checkout.
 * The cart drawer body: design groups, other lines, next-break box, one-tap add-ons, foot, empty block.
 * The sheet itself (phone bottom sheet, 440px desktop panel) is F's .em2-sheet.
 */

.em2-drawer .em2-sheet-body { display:flex; flex-direction:column; gap:16px; padding-bottom:0; }
.em2-drawer-added { display:inline-flex; align-items:center; gap:8px; }
.em2-drawer-added svg { flex:none; width:22px; height:22px; color:var(--green); }
.em2-drawer-loading { flex:none; width:100%; background:var(--band); }
.em2-drawer-error { flex:none; }

/* Lines */
.em2-drawer-lines { display:flex; flex-direction:column; }
.em2-drawer-group { display:grid; grid-template-columns:88px minmax(0, 1fr); gap:12px; padding:16px 0; }
.em2-drawer-group:first-child { padding-top:4px; }
.em2-drawer-group + .em2-drawer-group { border-top:2px solid var(--line); }
.em2-drawer-tile { width:88px; padding:6px; align-self:start; }
.em2-drawer-tile img { width:100%; height:auto; aspect-ratio:1 / 1; object-fit:contain; }
.em2-drawer-info { display:flex; flex-direction:column; gap:4px; min-width:0; }
.em2-drawer-info .em2-note { margin-top:8px; font-size:15px; }
.em2-drawer-actions { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; gap:4px 12px; margin-top:4px; }
.em2-drawer-actions > .em2-row { gap:0 16px; }
.em2-drawer-actions .em2-link { min-height:44px; display:inline-flex; align-items:center; }
.em2-drawer-actions .em2-price { align-self:end; padding-bottom:12px; }
.em2-drawer-remove { height:44px; padding:0 4px; font-size:14px; }
.em2-drawer-data dl { display:grid; grid-template-columns:auto minmax(0, 1fr); gap:2px 6px; margin:0; }
.em2-drawer-data dt { font-weight:700; color:var(--ink); }
.em2-drawer-data dd { margin:0; }
.em2-drawer-data p { margin:0; }

/* Next quantity break */
.em2-drawer-next { grid-column:1 / -1; display:flex; flex-direction:column; gap:8px; padding:12px; border:2px solid var(--ink); }
.em2-drawer-nudge { font:500 15px/1.35 var(--body); color:var(--ink); }
.em2-drawer-nudge b { font-weight:800; }
.em2-drawer-nudge .em2-mono { font-weight:700; }
.em2-drawer-next .em2-btn { flex:none; }

/* Same design, one tap */
.em2-drawer-addons { display:flex; flex-direction:column; gap:8px; }
.em2-drawer-addon { padding:8px 12px; }
.em2-drawer-addon-tile { flex:none; width:48px; padding:2px; }
.em2-drawer-addon .em2-btn { flex:none; }
.em2-drawer-addon .em2-col { min-width:0; }
.is-new.em2-drawer-addons, .is-new.em2-drawer-next { animation:em2-drawer-in var(--t-base) var(--ease) 1 both; }
@keyframes em2-drawer-in { from { opacity:0; } to { opacity:1; } }

/* Foot: always reachable at the bottom of the drawer */
.em2-drawer-foot { position:sticky; bottom:0; z-index:1; margin-top:auto; display:flex; flex-direction:column; gap:12px; padding:0 0 max(24px, env(safe-area-inset-bottom)); background:var(--paper); }
.em2-drawer-sum { display:flex; flex-direction:column; gap:6px; padding-top:12px; }
.em2-drawer-sum .em2-green { font-weight:700; }
.em2-drawer-pay { text-align:center; }

/* Empty block (also on /cart/, styled again in commerce.css) */
.em2-cart-empty { display:flex; flex-direction:column; align-items:flex-start; gap:16px; padding:8px 0 24px; }
.em2-cart-empty .em2-grid { width:100%; }
.em2-drawer .em2-cart-picks { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:24px 12px; }
.em2-drawer .em2-grid-caption { margin-bottom:-4px; }

/* The Echoes donation tile (decision 20): a neutral square with the word "Donation". Light in both modes, like the photo tiles (5.9). */
.em2-cart-gift { display:grid; place-items:center; width:100%; aspect-ratio:1 / 1; background:var(--tile); color:#111428; }
.em2-cart-gift .em2-lbl { color:inherit; }
.em2-drawer-addon-tile .em2-cart-gift .em2-lbl { display:none; }

@media (min-width:1024px) {
  .em2-drawer-foot { padding-bottom:24px; }
}
