/* GENERATED by tools/component-css.mjs from components/sheet.js. Do not edit; edit the component. */
g-sheet { display: contents; }
/* contained: the sheet belongs to the positioned box it sits in, and its veil covers only that box */
g-sheet[contained] { position: absolute; inset: 0; z-index: 20; display: block; visibility: hidden; pointer-events: none; border-radius: inherit; container-type: inline-size; container-name: sheet; }
g-sheet[contained][data-open] { visibility: visible; pointer-events: auto; background: var(--scrim); animation: g-fade var(--d-dur) var(--ease); }

/* the surface is the library's .g-sheet at a big panel's corner: a column whose head and foot stay and whose middle scrolls */
g-sheet > dialog.g-sheet { position: fixed; inset: 0; width: min(100% - 48px, 560px); max-width: none; height: fit-content; max-height: calc(100% - 48px); margin: auto; padding: 0; border: 0; border-radius: var(--r3); overflow: hidden; color: var(--ink); transition: transform var(--d-glide) var(--ease), box-shadow var(--d-fade) var(--ease-out); }
g-sheet[contained] > dialog.g-sheet { position: absolute; }
g-sheet > dialog.g-sheet[open] { display: flex; flex-direction: column; animation: g-materialise var(--d-glide) var(--ease-out); }
/* growing out of what was pressed: the sheet's own arrival gives way to the growth */
g-sheet > dialog.g-sheet[open][data-from] { animation: none; }
/* a sheet opened over this one: it steps back, smaller and up, under the other's veil, and returns when that closes */
g-sheet > dialog.g-sheet[data-under] { transform: translateY(-16px) scale(.94); }
g-sheet > dialog.g-sheet::backdrop { background: var(--scrim, rgba(0, 0, 0, .5)); }
g-sheet > dialog.g-sheet:focus { outline: none; }
g-sheet > dialog.g-sheet:focus-visible { box-shadow: var(--focus), var(--shadow-pop); }

/* a drawer: from the right edge, the full height, beside the page */
g-sheet > dialog.g-sheet.right { width: min(92%, 480px); height: 100%; max-height: 100%; margin: 0 0 0 auto; border-radius: var(--r3) 0 0 var(--r3); }
g-sheet > dialog.g-sheet.right[open] { animation-name: g-sheet-slide; }

g-sheet .head { display: flex; align-items: center; gap: var(--s3); min-width: 0; padding: var(--s6) var(--s6) 0; }
g-sheet .head > h2 { flex: 1 1 auto; min-width: 0; font: 600 var(--t-m)/var(--lh-m) var(--f-ui); color: var(--ink); overflow-wrap: anywhere; }
/* what sits beside the name (a mark, a word, the way out) sits at the far end, never against the words */
g-sheet .head > .aside { flex: none; display: inline-flex; align-items: center; gap: var(--s2); margin-left: auto; }
/* the close button keeps the head's 24 px line and sits optically on the sheet's edge */
g-sheet .head > .x { flex: none; margin: calc(var(--s1) * -1) calc(var(--s2) * -1) calc(var(--s1) * -1) 0; }
g-sheet .body { flex: 1 1 auto; min-height: 0; padding: var(--s4) var(--s6) var(--s5); color: var(--ink); }
g-sheet > dialog.bare-head .body { padding-top: var(--s6); }
g-sheet > dialog.bare-foot .body { padding-bottom: var(--s6); }
g-sheet .body > .say { color: var(--ink-2); }
/* one surface, many steps: the next step's words fade in while the height travels */
g-sheet .body.stepped { animation: g-fade var(--d-dur) var(--ease); }
g-sheet .foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); padding: 0 var(--s6) var(--s6); }
g-sheet .foot > .g-error { flex: 1 0 100%; order: -1; }
g-sheet[aria-busy="true"] .foot { cursor: progress; }

@media (max-width: 520px) {
  g-sheet:not([contained]) > dialog.g-sheet { width: 100%; max-height: calc(100% - 48px); margin: auto 0 0; border-radius: var(--r3) var(--r3) 0 0; }
  g-sheet:not([contained]) > dialog.g-sheet[open] { animation-name: g-sheet-rise; }
  g-sheet:not([contained]) > dialog.g-sheet.right { height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  g-sheet:not([contained]) > dialog.g-sheet.right[open] { animation-name: g-sheet-slide; }
  g-sheet:not([contained]) .head, g-sheet:not([contained]) .body, g-sheet:not([contained]) .foot { padding-left: var(--s4); padding-right: var(--s4); }
  g-sheet:not([contained]) .foot { padding-bottom: calc(var(--s6) + env(safe-area-inset-bottom, 0px)); }
  g-sheet:not([contained]) .foot > .g-btn { flex: 1 1 auto; }
}
@container sheet (max-width: 520px) {
  g-sheet[contained] > dialog.g-sheet { width: 100%; max-height: calc(100% - 48px); margin: auto 0 0; border-radius: var(--r3) var(--r3) 0 0; }
  g-sheet[contained] > dialog.g-sheet[open] { animation-name: g-sheet-rise; }
  g-sheet[contained] > dialog.g-sheet.right { height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  g-sheet[contained] > dialog.g-sheet.right[open] { animation-name: g-sheet-slide; }
  g-sheet[contained] .head, g-sheet[contained] .body, g-sheet[contained] .foot { padding-left: var(--s4); padding-right: var(--s4); }
  g-sheet[contained] .foot > .g-btn { flex: 1 1 auto; }
}
@keyframes g-sheet-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes g-sheet-slide { from { opacity: 0; transform: translateX(24px); } }

/* the library's demo: a venue's screen at the close, with the sheet contained in it */
.g-sheet-demo { position: relative; display: block; width: 100%; height: 440px; overflow: hidden; border-radius: var(--r3); background: var(--ground); box-shadow: var(--ring); }
.g-sheet-demo .page { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); padding: var(--s6); }
.g-sheet-demo .total { font-size: var(--t-d2); line-height: var(--lh-d2); color: var(--ink); }
.g-sheet-demo .page > .g-btn { margin-top: var(--s4); }
