/* The Project settings sheet, and the publish panel that lives inside it.

   Its own file because it is its own module: aly-workspace-sheet.js builds this
   surface, and the dock (aly-workspace.css) never styles it. The sheet is what
   the gear's "Project details" opens — the Project's name, its description, the
   files and data it is made of, publishing, and the way out.

   Same LUX/NEO tokens as the rest of ALY; nothing invents a colour. */

/* --- the sheet ------------------------------------------------------------ */

/* The bottom padding is clearance for the ALYSSIUN OS launcher, which floats
   over the bottom-centre of every page it decorates — exactly where this
   sheet's last control, a full-width Exit Project, ends up. ALY reserves room
   for it rather than fighting it for a z-index, the same way the composer, the
   Space panel and the usage panel already do. It is 0 when no launcher is
   there. */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.workspace-sheet {
  width: min(520px, 100%); max-height: calc(100dvh - 40px);
  display: flex; flex-direction: column;
  border: 1px solid var(--surface-line); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .40);
  overflow: hidden;
}
.sheet-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 22px 14px; border-bottom: 1px solid var(--surface-line);
}
.sheet-title { margin: 2px 0 0; font-size: 19px; font-weight: 300; }
.sheet-close { flex: none; min-height: 34px; min-width: 34px; }
/* `min-height: 0` is load-bearing. Without it this flex item will not shrink
   below its own content, so a tall sheet pushes .sheet-foot past the sheet's
   max-height and `overflow: hidden` clips Exit Project off the bottom. */
.sheet-body {
  flex: 1; min-height: 0;
  padding: 6px 22px 18px; overflow-y: auto; display: grid; gap: 4px;
}
.sheet-section { padding: 14px 0; border-bottom: 1px solid var(--hair); }
.sheet-section:last-child { border-bottom: none; }
.sheet-heading {
  margin: 0 0 10px; font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.sheet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.sheet-list li { color: var(--muted); word-break: break-all; }
/* The name owns the top of Project details. Without a rule under it, the name
   and the description read as one form with two save buttons. */
.sheet-detail-divider { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hair); }
.sheet-description-label { display: block; margin-bottom: 7px; font-size: 13px; }
.sheet-name-input { width: 100%; }
.sheet-description-input { width: 100%; resize: vertical; }
.sheet-description-note, .sheet-description-status { margin: 7px 0 0; font-size: 12px; }
.sheet-description-save { margin-top: 10px; }
.sheet-foot { padding: 14px 22px 18px; border-top: 1px solid var(--surface-line); }
.sheet-exit { width: 100%; justify-content: center; }

/* --- publishing, inside the sheet ----------------------------------------- */

.workspace-publish { margin: 0; }
.publish-panel h3 {
  margin: 0 0 10px; font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.publish-live { display: grid; gap: 8px; margin-bottom: 12px; }
.publish-label { margin: 0; font-size: 12px; color: var(--muted); }
.publish-url { font-size: 14px; word-break: break-all; }
.publish-visibility, .publish-store-space {
  width: 100%; padding: 9px 11px; border: 1px solid var(--surface-line); border-radius: 8px;
  background: var(--surface-2); color: var(--text); font: inherit; min-height: 0;
}
.publish-store-destination { display: grid; gap: 6px; margin-bottom: 12px; }
.publish-store-note { margin: 0; }
.publish-button { width: 100%; }
.publish-button:disabled { opacity: .5; cursor: not-allowed; }
.publish-history { margin-top: 16px; }
.publish-versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.publish-versions li {
  display: flex; align-items: center; gap: 10px; font-size: 13px;
  padding: 7px 9px; border: 1px solid var(--hair); border-radius: 6px; flex-wrap: wrap;
}
.publish-versions li.is-active { background: var(--surface-2); border-color: var(--surface-line); }
.publish-version { font-weight: 600; }
.publish-notes { flex: 1 1 100%; font-size: 12px; }
.publish-versions button { margin-left: auto; }

/* --- phones ----------------------------------------------------------------
   The sheet comes up from the bottom edge, where a thumb reaches, and reserves
   the launcher clearance itself — the backdrop drops its padding here, so the
   room has to be made on the sheet. Same shape as .space-modal. */
@media (max-width: 760px) {
  .sheet-backdrop { align-items: flex-end; padding: 0; }
  .workspace-sheet {
    width: 100%; max-height: 88dvh;
    border-radius: var(--radius) var(--radius) 0 0; border-bottom: none;
    padding-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--alyssiun-safe-bottom, 0px)));
  }
}
