/* The question asked before a tab with unsaved work closes (D-340, unsaved-tabs.mjs): a small floating card under
   the tab's button, in the menus' own glass (DESIGN-SYSTEM.md "Real glass", shell/src/styles/ui.css), never over a
   dimmed window. Its question, a line under it, then Don't save at the left and Cancel and Save at the right, Save
   the main action. A save that fails says why in the error colour, and the card stays. */
body.wb-shell .wl-ui.wl-close-ask {
  position: fixed; z-index: var(--layer-menu, 65); box-sizing: border-box; max-width: calc(100vw - 2 * var(--sp-4));
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  border: 1px solid color-mix(in srgb, var(--wl-text) 14%, transparent); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--wl-surface) 58%, transparent);
  -webkit-backdrop-filter: blur(var(--wl-glass-blur)) saturate(1.35); backdrop-filter: blur(var(--wl-glass-blur)) saturate(1.35);
  box-shadow: var(--wl-elev-pop); color: var(--wl-text); font: 400 var(--t-ui)/1.45 var(--wl-font-ui);
  animation: wl-in var(--wl-short) var(--wl-ease-out);
}
body.wb-shell .wl-ui.wl-close-ask.is-leaving { animation: wl-out var(--wl-short-out) var(--wl-ease-out) forwards; pointer-events: none; }
body.wb-shell .wl-close-ask-title { margin: 0; font-weight: 600; color: var(--wl-text); }
body.wb-shell .wl-close-ask-detail { margin: var(--sp-1) 0 0; color: var(--wl-text-2); font-size: var(--t-help); }
body.wb-shell .wl-close-ask-problem { margin: var(--sp-2) 0 0; color: var(--wl-danger); font-size: var(--t-help); }
body.wb-shell .wl-close-ask-problem[hidden] { display: none; }
body.wb-shell .wl-close-ask-actions { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
body.wb-shell .wl-close-ask-gap { flex: 1 1 auto; }
body.wb-shell .wl-ui.wl-close-ask .wl-button { height: 32px; padding: 0 var(--sp-3); }
/* Across the top on a phone: the buttons share the width, Don't save on its own line above. */
@media (max-width: 559px) {
  body.wb-shell .wl-close-ask-actions { flex-wrap: wrap; }
  body.wb-shell .wl-close-ask-gap { display: none; }
  body.wb-shell .wl-ui.wl-close-ask .wl-button { flex: 1 1 0; }
  body.wb-shell .wl-ui.wl-close-ask .wl-close-ask-drop { flex-basis: 100%; order: 3; }
}
@media (pointer: coarse) { body.wb-shell .wl-ui.wl-close-ask .wl-button { height: 44px; } }
@media (prefers-reduced-transparency: reduce) {
  body.wb-shell .wl-ui.wl-close-ask { background: var(--wl-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
