/*
 * Dr.Prompt · PSD component language pass (P5)
 *
 * Presentation-only. The existing Creative Engine controls remain the same;
 * this pass makes the input module an explicit transparent outer frame with
 * solid inner surfaces, simplifies reference upload affordances, and carries
 * the same material language into the remaining product pages.
 */

:root {
  --df-p5-outer: rgba(255, 255, 255, .075);
  --df-p5-outer-line: rgba(255, 255, 255, .16);
  --df-p5-inner: rgba(13, 12, 17, .86);
  --df-p5-inner-soft: rgba(22, 19, 28, .78);
  --df-p5-inner-line: rgba(255, 255, 255, .12);
  --df-p5-active: rgba(145, 104, 242, .18);
  --df-p5-radius-outer: 20px;
  --df-p5-radius-inner: 14px;
}

/* -------------------------------------------------------------------------
   1. Creative Engine: transparent outer frame + solid inner text surface.
   ------------------------------------------------------------------------- */
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-stage {
  position: relative !important;
  margin: 0 18px !important;
  padding: 12px !important;
  border: 1px solid var(--df-p5-outer-line) !important;
  border-radius: var(--df-p5-radius-outer) !important;
  background: var(--df-p5-outer) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 12px 28px rgba(0, 0, 0, .12) !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .idea-input {
  min-height: clamp(188px, 21vw, 270px) !important;
  padding: 22px 22px 48px !important;
  border: 1px solid var(--df-p5-inner-line) !important;
  border-radius: var(--df-p5-radius-inner) !important;
  background:
    linear-gradient(145deg, rgba(27, 23, 34, .94), var(--df-p5-inner) 70%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .065),
    inset 0 0 0 1px rgba(255, 255, 255, .018),
    0 8px 22px rgba(0, 0, 0, .13) !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .idea-input:focus {
  border-color: rgba(177, 142, 255, .44) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 0 0 3px rgba(143, 101, 242, .10),
    0 12px 30px rgba(0, 0, 0, .18) !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-meta-readout-inline {
  right: 26px !important;
  bottom: 22px !important;
  padding: 4px 8px !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  border-radius: 8px !important;
  background: rgba(6, 6, 9, .58) !important;
}

/* Optional style selector follows the same inner-surface treatment. */
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .quick-start-style-dock,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .quick-start-wheel-trigger,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .quick-start-style-wheel {
  border-radius: var(--df-p5-radius-inner) !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .quick-start-wheel-trigger {
  border-color: rgba(255, 255, 255, .13) !important;
  background: rgba(7, 7, 10, .66) !important;
}

/* -------------------------------------------------------------------------
   2. Composer controls: identical vertical boundary and inner/outer rhythm.
   ------------------------------------------------------------------------- */
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-bottombar {
  margin: 14px 18px 18px !important;
  padding: 8px !important;
  border: 1px solid var(--df-p5-outer-line) !important;
  border-radius: var(--df-p5-radius-outer) !important;
  background: var(--df-p5-outer) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045) !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-bottom-left,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-bottom-right {
  align-items: center !important;
  min-height: 44px !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-bottom-left > .reference-upload-group,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-bottom-left > .composer-more-control,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-bottom-left > .composer-styles-trigger,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-bottom-left > .first-frame-toggle-compact {
  height: 44px !important;
  min-height: 44px !important;
  border: 1px solid var(--df-p5-inner-line) !important;
  border-radius: var(--df-p5-radius-inner) !important;
  background: var(--df-p5-inner-soft) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045) !important;
}

/* Size previously grew taller than the neighbouring controls. */
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-more-trigger,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-styles-trigger,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .first-frame-toggle-compact {
  height: 44px !important;
  min-height: 44px !important;
  padding-block: 0 !important;
  border-radius: var(--df-p5-radius-inner) !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-more-trigger {
  border: 0 !important;
  background: transparent !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-more-control:has(.composer-more-trigger[aria-expanded="true"]),
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-styles-trigger[aria-expanded="true"],
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .first-frame-toggle-compact:has(input:checked) {
  border-color: rgba(173, 139, 255, .42) !important;
  background: linear-gradient(145deg, rgba(57, 35, 89, .58), rgba(18, 14, 25, .86)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .075),
    0 0 0 2px rgba(145, 104, 242, .08) !important;
}

/* -------------------------------------------------------------------------
   3. Reference uploads: no Image 1/2/3 labels; use a simple image + plus mark.
   ------------------------------------------------------------------------- */
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .reference-upload-heading {
  display: none !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .reference-upload-slot {
  position: relative !important;
  display: grid !important;
  width: 44px !important;
  height: 44px !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 12px !important;
  background: rgba(8, 8, 11, .62) !important;
  color: transparent !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .reference-upload-slot::before {
  content: "" !important;
  position: absolute !important;
  width: 18px !important;
  height: 14px !important;
  border: 1.5px solid rgba(247, 245, 251, .80) !important;
  border-radius: 3px !important;
  transform: translateY(1px) !important;
  box-sizing: border-box !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .reference-upload-slot::after {
  content: "" !important;
  position: absolute !important;
  right: 8px !important;
  bottom: 6px !important;
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  border: 1px solid rgba(190, 164, 255, .72) !important;
  border-radius: 50% !important;
  background:
    linear-gradient(rgba(255, 255, 255, .96), rgba(255, 255, 255, .96)) center / 7px 1.5px no-repeat,
    linear-gradient(rgba(255, 255, 255, .96), rgba(255, 255, 255, .96)) center / 1.5px 7px no-repeat,
    #9d79f3 !important;
  box-shadow: 0 4px 12px rgba(103, 65, 185, .35) !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .reference-upload-slot > span,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .reference-upload-slot > small {
  display: none !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .reference-upload-slot:hover,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .reference-upload-slot:focus-visible {
  border-color: rgba(184, 155, 255, .56) !important;
  background: rgba(35, 25, 52, .86) !important;
  outline: none !important;
  transform: translateY(-1px) !important;
}

/* -------------------------------------------------------------------------
   4. Other product pages: carry the same PSD glass/inner-surface language.
   Existing routes and controls are untouched; only their surfaces are shared.
   ------------------------------------------------------------------------- */
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .page-scroll {
  width: min(1480px, calc(100% - clamp(28px, 4vw, 72px))) !important;
  margin-inline: auto !important;
  padding-top: 34px !important;
  padding-bottom: 96px !important;
}

#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .task-session-board,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .template-use-workspace,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .template-grid,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .schema-grid,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .agent-map-grid,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .workflow-board,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .api-grid,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .model-service-workspace,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .project-log-page,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .coming-soon-panel {
  border: 1px solid var(--df-p5-outer-line) !important;
  border-radius: var(--df-p5-radius-outer) !important;
  background: var(--df-p5-outer) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 24px 72px rgba(7, 5, 12, .16) !important;
}

#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .schema-card,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .band-card,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .template-use-editor-card,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .project-log-summary,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .provider-config,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .provider-guide {
  border-color: var(--df-p5-inner-line) !important;
  border-radius: var(--df-p5-radius-inner) !important;
  background: linear-gradient(145deg, rgba(28, 24, 36, .84), rgba(11, 10, 14, .86)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045) !important;
}

#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .primary-btn,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .ghost-btn,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .text-btn,
#app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .text-danger-btn {
  min-height: 40px !important;
  border-radius: 11px !important;
}

@media (max-width: 720px) {
  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-stage {
    margin-inline: 12px !important;
    padding: 9px !important;
  }

  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-bottombar {
    margin-inline: 12px !important;
    padding: 7px !important;
  }

  #app#app[data-active-view]:not([data-active-view="home"]):not([data-active-view="workbench"]) .page-scroll {
    width: calc(100% - 24px) !important;
    padding-top: 20px !important;
    padding-bottom: 56px !important;
  }
}

/* -------------------------------------------------------------------------
   P6 alignment correction: keep the solid input surface inside the glass frame.
   Textareas include padding/borders in their rendered width so the inner panel
   cannot extend beyond the outer composer-stage at any viewport width.
   ------------------------------------------------------------------------- */
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-stage {
  box-sizing: border-box !important;
  width: auto !important;
  max-width: calc(100% - 36px) !important;
  overflow: hidden !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .idea-input,
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .idea-input.studio-input {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

@media (max-width: 720px) {
  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-stage {
    max-width: calc(100% - 24px) !important;
  }
}

/* -------------------------------------------------------------------------
   P7 control grouping correction: the utility controls sit directly below
   the solid input surface; only the input keeps the transparent outer frame
   and solid inner frame. Individual controls retain their own compact hit
   areas, but no longer share a surrounding panel.
   ------------------------------------------------------------------------- */
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-bottombar {
  margin: 14px 18px 18px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 720px) {
  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .composer-bottombar {
    margin-inline: 12px !important;
    padding: 0 !important;
  }
}

