/* Lighter Process tab: folded steps and a compact workspace switch next to the
   title (script: js/process-compact.js). Loaded after the other tools styles. */

/* ---- workspace switch on the right of the page title (wide screens) ---- */
@media (min-width: 1400px) {
  body.page-tools.is-showcase-workspace .workspace-heading {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "title switch" "sub switch";
    align-items: center;
    column-gap: 32px;
    row-gap: 6px;
  }
  body.page-tools.is-showcase-workspace .workspace-heading .h-title { grid-area: title; }
  body.page-tools.is-showcase-workspace .workspace-heading .h-sub { grid-area: sub; margin: 0 !important; }
  body.page-tools.is-showcase-workspace .workspace-switch {
    grid-area: switch;
    justify-self: stretch;
    width: 100% !important;
    max-width: none !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
  }
  /* Owner reference IMAGE/2.png: the mode pair fills the space between the title and the links. */
  body.page-tools.is-showcase-workspace .workspace-switch__modes { flex: 1 1 auto; min-width: 0; }
  body.page-tools.is-showcase-workspace .workspace-switch__modes > button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 64px;
    padding: 10px 18px;
    gap: 12px;
  }
  body.page-tools.is-showcase-workspace .workspace-switch__modes > button b { font-size: 15px; line-height: 1.25; }
  body.page-tools.is-showcase-workspace .workspace-switch__modes > button small { font-size: 12px; opacity: .8; }
  body.page-tools.is-showcase-workspace .workspace-switch__modes > button [data-editor-icon] svg { width: 22px; height: 22px; }
}

/* ---- step headers are the fold control (chevron left, hint right) ---- */
.page-tools .is-foldable > .process-fold__head { cursor: pointer; border-radius: 8px; transition: background .18s; margin-left: -8px !important; margin-right: -8px !important; padding: 6px 8px !important; }
.page-tools .is-foldable > .process-fold__head:hover { background: rgba(31, 201, 241, .07); }
.page-tools .is-foldable > .process-fold__head:focus-visible { outline: 2px solid #1fc9f1; outline-offset: 2px; }
.page-tools .process-fold__chevron { display: none; flex: none; place-items: center; width: 26px; height: 26px; border: 1px solid rgba(110, 170, 255, .3); border-radius: 7px; background: rgba(8, 16, 36, .85); color: #1fc9f1; transition: transform .2s ease, border-color .18s; }
.page-tools .is-foldable > .process-fold__head .process-fold__chevron { display: grid; }
.page-tools .is-foldable:not(.is-folded) > .process-fold__head .process-fold__chevron { transform: rotate(90deg); }
.page-tools .is-foldable > .process-fold__head:hover .process-fold__chevron { border-color: #1fc9f1; }
.page-tools .process-fold__hint { margin-left: auto; color: rgba(200, 214, 238, .55); font: 600 12px/1 Montserrat, "Segoe UI", Arial, sans-serif; letter-spacing: 0; text-transform: none; }
.page-tools .process-fold__hint:empty { display: none; }
.page-tools .is-foldable > .process-fold__head:hover .process-fold__hint { color: #6fe3ff; }
.page-tools #processDesignCard.is-folded { cursor: pointer; }

/* ---- step 1 folded: only the chosen files and the source check stay ---- */
.page-tools #processFilesCard.is-folded .drop,
.page-tools #processFilesCard.is-folded .process-link,
.page-tools #processFilesCard.is-folded .process-paste-hint,
.page-tools #processFilesCard.is-folded .process-sample,
.page-tools #processFilesCard.is-folded .asset-library-open { display: none !important; }
.page-tools #processFilesCard.is-folded #fileList { margin-top: 4px; }

/* ---- step 3 folded: header + one-line summary ---- */
.page-tools #processDesignCard > .process-fold__summary { display: none; }
.page-tools #processDesignCard.is-folded > :not(h2):not(.process-fold__summary) { display: none !important; }
.page-tools #processDesignCard.is-folded > h2 { cursor: pointer; margin-bottom: 10px !important; }
.page-tools #processDesignCard.is-folded > .process-fold__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}
.page-tools .process-fold__chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(110, 170, 255, .2);
  border-radius: 8px;
  background: rgba(8, 16, 36, .7);
  font-size: 12px;
  line-height: 1.2;
}
.page-tools .process-fold__chip small { color: rgba(200, 214, 238, .6); font-size: 11px; }
.page-tools .process-fold__chip b { color: #e9f3ff; font-weight: 700; }
.page-tools #processDesignCard.is-folded:hover .process-fold__chip { border-color: rgba(31, 201, 241, .4); }

/* ---- pinned title + preview (owner reference IMAGE/3.png) ----
   The page scrolls normally (wheel anywhere). The title row sticks under the
   tools header and the right column (preview + step 4) sticks under the title,
   so only the left column moves. When the left column ends, the grid ends and
   the page scrolls on to the footer. --pc-chrome / --pc-top / --pc-h are set by
   process-compact.js from the real header and title heights. */
@media (min-width: 1051px) {
  body.page-tools.pc-split.pc-process .main > .topbar {
    position: sticky;
    top: var(--pc-chrome, 109px);
    z-index: 20;
    background: transparent;
    padding-top: 12px !important;
    padding-bottom: 14px !important;
    margin-bottom: 0 !important;
  }
  /* Backdrop only while the title is pinned: same glass as the tools header,
     full window width, so it reads as part of the header (no black band). */
  body.page-tools.pc-split.pc-process .main > .topbar::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    z-index: -1;
    pointer-events: none;
    background: rgba(4, 9, 24, .9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(90, 150, 255, .12);
    opacity: 0;
    transition: opacity .2s ease;
  }
  body.page-tools.pc-split.pc-process .main > .topbar.is-stuck::before { opacity: 1; }
  body.page-tools.pc-split #tab-process.active > .process-preview-column {
    position: sticky !important;
    top: var(--pc-top, 250px) !important;
    align-self: start;
    max-height: var(--pc-h);
    overflow: hidden;
    grid-template-rows: none !important;
    grid-auto-rows: max-content !important;
    align-content: start !important;
  }
  /* Page end: the footer scrolls in normally. The right column is released by its
     grid row as the footer arrives; process-compact.js moves the pinned title up by
     the same amount, so the whole top part leaves together and nothing overlaps. */
  body.page-tools.pc-split.pc-process .main { padding-bottom: 0 !important; }
  body.page-tools.pc-split.pc-process #tab-process.active > .process-controls { padding-bottom: 24px !important; }

  /* The preview gets exactly the height left over in the column (--pc-canvas,
     measured by process-compact.js), so the whole right block fits the window. */
  body.page-tools.pc-split #tab-process #wmCanvasWrap {
    min-height: 0 !important;
    height: var(--pc-canvas, 360px);
  }
  body.page-tools.pc-split #tab-process #wmCanvasEmpty { min-height: 0; height: 100%; box-sizing: border-box; overflow: hidden; }
  body.page-tools.pc-split #tab-process #wmCanvas {
    max-height: 100%;
    width: auto !important;
    max-width: 100%;
    margin: 0 auto;
  }
  /* Room for the preview: the header already has "Home", step 4 chips already say the state. */
  body.page-tools.pc-split.pc-process .main > .back { display: none !important; }
  body.page-tools.pc-split #processNextHint { display: none !important; }
  body.page-tools.pc-split #processReadinessHint { padding: 10px 14px !important; margin-top: 10px !important; }
  body.page-tools.pc-split #processReadinessHint .btn { min-height: 34px !important; padding: 6px 14px !important; }
  /* Rotation: file name and buttons on one line. */
  body.page-tools.pc-split #processRotationPanel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
}

/* 1400-1599 px: the title row is tight, so the one-line hints move into tooltips and the links never wrap. */
@media (min-width: 1400px) and (max-width: 1599px) {
  body.page-tools.is-showcase-workspace .workspace-switch__modes > button small { display: none !important; }
  body.page-tools.is-showcase-workspace .workspace-switch__modes > button { min-height: 52px; }
}
@media (min-width: 1400px) {
  body.page-tools.is-showcase-workspace .workspace-switch > button,
  body.page-tools.is-showcase-workspace .workspace-switch > details summary { white-space: nowrap !important; }
}

/* Mode cards stay three in a row here (creator-os.css), so the horizontal
   85px+text layout from workspace-editor.css left 8-28 px for the text and
   titles broke letter by letter (e.g. 1080-wide portrait monitors). */
@media (min-width:801px) and (max-width:1300px){
  body.page-tools #processModeCard .mode{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;min-height:0!important}
  body.page-tools #processModeCard .mode-diagram{align-self:stretch!important;width:auto!important;margin:0 0 6px!important;grid-row:auto!important}
  body.page-tools #processModeCard .mode > *{min-width:0;overflow-wrap:break-word}
}

/* "Quality and format" (2026-09-28): several older sheets fought over this grid,
   so on tablets the switch labels ended up one letter per line.  One layout for
   every width: FPS | width, then the encoder, then the switches in a row. */
body.page-tools #processSettingsCard #processAdvanced>.process-basics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-areas:none!important;align-items:end!important;gap:12px!important}
body.page-tools #processSettingsCard #processAdvanced>.process-basics>.field{grid-column:auto!important;grid-area:auto!important;min-width:0!important}
body.page-tools #processSettingsCard #processAdvanced>.process-basics>.process-field--encoder,
body.page-tools #processSettingsCard #processAdvanced>.process-basics>.process-advanced__toggles,
body.page-tools #processSettingsCard #processAdvanced>.process-basics>.steam-opt-row{grid-column:1/-1!important}
/* The only rules for these switches (older duplicates in process-studio.css and workspace-editor.css were removed 2026-09-29). */
body.page-tools #processSettingsCard #processAdvanced .process-advanced__toggles{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:10px 24px!important;width:auto!important;min-width:0!important;justify-self:stretch!important;justify-content:flex-start!important;align-content:flex-start!important;margin:0!important}
body.page-tools #processSettingsCard #processAdvanced .process-advanced__toggles .process-switch{display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:10px!important;width:auto!important;min-height:30px;margin:0!important}
body.page-tools #processSettingsCard #processAdvanced .process-advanced__toggles .process-switch>span{display:inline!important;width:auto!important;white-space:nowrap!important;writing-mode:horizontal-tb!important;font-size:13px!important;line-height:1.2!important;overflow-wrap:normal!important}
@media (max-width:430px){
  body.page-tools #processSettingsCard #processAdvanced .process-advanced__toggles{flex-direction:column!important;align-items:flex-start!important;gap:8px!important}
}
/* Collapsed "Design" card: its heading and chips were min-content wide and got
   cut off at the card edge on 320-360 px phones. */
body.page-tools .process-design{grid-template-columns:minmax(0,1fr)!important}
body.page-tools .process-design>*{min-width:0!important;max-width:100%}
body.page-tools .process-fold__head{flex-wrap:wrap!important;row-gap:6px}
body.page-tools .process-fold__chip{max-width:100%;min-width:0}

/* Design from "Create a design": its own frame/colours, Process frame + grade are locked. */
body.page-tools .process-builder-lock{display:grid;gap:6px;margin:0 0 12px;padding:12px 14px;border-radius:12px;border:1px solid rgba(82,213,255,.35);background:linear-gradient(135deg,rgba(82,213,255,.1),rgba(138,98,255,.08))}
body.page-tools .process-builder-lock[hidden]{display:none!important}
body.page-tools .process-builder-lock b{font-size:14px;color:#e8f6ff}
body.page-tools .process-builder-lock span{font-size:13px;line-height:1.45;color:rgba(220,232,245,.78)}
body.page-tools .process-builder-lock button{justify-self:start;min-height:34px;padding:6px 12px;font-size:13px}
body.page-tools .is-builder-locked{opacity:.38;filter:grayscale(.6);pointer-events:none;user-select:none}

/* "Can take up to 2 minutes" note while a job runs (process-layout.js). */
.sm-progress .sm-wait-note{display:flex;align-items:flex-start;gap:12px;margin-top:12px;padding:12px 14px;border-radius:12px;border:1px solid rgba(255,196,80,.6);background:linear-gradient(135deg,rgba(255,180,40,.16),rgba(255,120,40,.08));box-shadow:0 0 0 1px rgba(255,196,80,.12),0 8px 24px rgba(0,0,0,.25)}
.sm-progress .sm-wait-note b{display:block;font-size:14px;color:#ffd27a}
.sm-progress .sm-wait-note span{display:block;margin-top:3px;font-size:12.5px;line-height:1.45;color:rgba(255,236,200,.85)}
.sm-progress .sm-wait-note i{flex:none;width:22px;height:22px;margin-top:1px;border-radius:50%;border:3px solid rgba(255,196,80,.25);border-top-color:#ffc450;animation:smWaitSpin .9s linear infinite}
.sm-progress.is-done .sm-wait-note{display:none}
@keyframes smWaitSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.sm-progress .sm-wait-note i{animation-duration:3s}}
