/*
 * Dr.Prompt · PSD regional visual convergence (P3)
 *
 * This layer is intentionally presentation-only. It puts the existing PSD
 * hero material behind the shared shell, then tunes transparency, gradient
 * falloff, panel proportion, and vertical rhythm. No controls, routes, data,
 * prompt text, or generation behavior are changed.
 */

:root {
  --psd-p3-hero-falloff: 720px;
  --psd-p3-glass-line: rgba(255, 255, 255, .18);
  --psd-p3-glass-top: rgba(255, 255, 255, .09);
  --psd-p3-glass-fill: rgba(14, 12, 17, .22);
  --psd-p3-panel-top: rgba(23, 19, 29, .76);
  --psd-p3-panel-bottom: rgba(7, 7, 10, .90);
}

/* -------------------------------------------------------------------------
   1. The hero belongs to the shell, not to an opaque child view. This lets
      the reference image remain visible behind the transparent topbar and
      around the first production surface, matching the PSD's layered canvas.
   ------------------------------------------------------------------------- */
#app#app[data-active-view="workbench"][data-creation-entry="fast"],
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .shell {
  background-color: #272727 !important;
  background-image:
    linear-gradient(
      180deg,
      rgba(10, 9, 12, .08) 0,
      rgba(10, 9, 12, .16) 180px,
      rgba(39, 39, 39, .18) 320px,
      rgba(39, 39, 39, .68) 500px,
      #272727 680px,
      #272727 100%
    ),
    url("assets/directorflow-global-background-dark-mosaic-v2.webp") !important;
  background-position: center top, center top !important;
  background-size: 100% 100%, 100% auto !important;
  background-repeat: no-repeat !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .view[data-view-panel="workbench"] {
  background-color: transparent !important;
  background-image: none !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .view[data-view-panel="workbench"]::before {
  background:
    radial-gradient(ellipse 58% 360px at 50% 220px, rgba(118, 72, 174, .13), transparent 70%),
    linear-gradient(180deg, transparent 0 420px, rgba(39, 39, 39, .24) 600px, rgba(39, 39, 39, .92) 760px, #272727 900px) !important;
}

/* -------------------------------------------------------------------------
   2. Transparent topbar: retain the existing geometry and actions while
      allowing the hero to read through the chrome. The navigation capsule
      remains legible through a second, quieter glass layer.
   ------------------------------------------------------------------------- */
#app#app[data-active-view] .topbar {
  border-color: var(--psd-p3-glass-line) !important;
  background:
    linear-gradient(180deg, rgba(22, 18, 25, .24), rgba(8, 8, 11, .10)) !important;
  -webkit-backdrop-filter: blur(18px) saturate(116%) !important;
  backdrop-filter: blur(18px) saturate(116%) !important;
  box-shadow:
    inset 0 1px 0 var(--psd-p3-glass-top),
    inset 0 -1px 0 rgba(0, 0, 0, .16),
    0 18px 48px rgba(6, 4, 9, .16) !important;
}

#app#app[data-active-view] .topbar::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .055), transparent 24% 72%, rgba(152, 111, 255, .07)),
    radial-gradient(circle at 18% -50%, rgba(255, 232, 207, .17), transparent 34%) !important;
}

#app#app[data-active-view] .topbar-navigation > .workspace-topnav {
  border-color: rgba(255, 255, 255, .13) !important;
  background: rgba(7, 6, 10, .18) !important;
  -webkit-backdrop-filter: blur(13px) saturate(112%) !important;
  backdrop-filter: blur(13px) saturate(112%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    inset 0 -1px 0 rgba(0, 0, 0, .14) !important;
}

/* -------------------------------------------------------------------------
   3. Regional panel calibration: more of the hero remains visible around the
      panels, while the working surfaces stay opaque enough for text contrast.
   ------------------------------------------------------------------------- */
#app#app[data-active-view="workbench"][data-creation-entry="fast"] .workbench-grid {
  padding-top: 26px !important;
  padding-bottom: 78px !important;
}


#app#app[data-active-view="workbench"][data-creation-entry="fast"] .output-panel {
  border-color: rgba(255, 255, 255, .16) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(180deg, rgba(18, 17, 22, .78), rgba(7, 7, 9, .91)) !important;
  -webkit-backdrop-filter: blur(22px) saturate(112%) !important;
  backdrop-filter: blur(22px) saturate(112%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .075),
    0 28px 82px rgba(8, 7, 12, .25) !important;
}

#app#app[data-active-view="workbench"][data-creation-entry="fast"] .prompt-card {
  border-color: rgba(255, 255, 255, .12) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(20, 18, 25, .74), rgba(7, 7, 10, .74)) !important;
}

/* Keep the purple and teal/green semantic accents restrained: the PSD uses
   color as a light source and state marker, not as a full panel fill. */
#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"] {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 0 0 1px rgba(167, 127, 255, .14),
    0 14px 32px rgba(63, 31, 126, .18) !important;
}

/* -------------------------------------------------------------------------
   4. Landing hero alignment: reuse the same extracted visual world so the
      shared topbar does not float over a disconnected black canvas.
   ------------------------------------------------------------------------- */
#app#app[data-active-view="home"] .shell {
  background-color: #09090b !important;
  background-image:
    linear-gradient(180deg, rgba(9, 9, 11, .04) 0, rgba(9, 9, 11, .18) 180px, rgba(9, 9, 11, .42) 360px, rgba(9, 9, 11, .82) 540px, #09090b 700px, #09090b 100%),
    url("assets/directorflow-global-background-dark-mosaic-v2.webp") !important;
  background-position: center top, center top !important;
  background-size: 100% 100%, 100% auto !important;
  background-repeat: no-repeat !important;
}

#app#app[data-active-view="home"] .home-view {
  background: transparent !important;
}

#app#app[data-active-view="home"] .home-hero-media-frame {
  border-color: rgba(255, 255, 255, .22) !important;
  background:
    linear-gradient(180deg, rgba(14, 12, 16, .10), rgba(8, 8, 11, .68)),
    url("assets/directorflow-global-background-dark-mosaic-v2.webp") center / cover no-repeat !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 28px 80px rgba(0, 0, 0, .28) !important;
}

#app#app[data-active-view="home"] .home-hero-media-frame::after {
  background:
    linear-gradient(180deg, transparent 0 38%, rgba(9, 9, 11, .12) 58%, rgba(9, 9, 11, .72) 100%),
    radial-gradient(circle at 74% 24%, rgba(155, 123, 255, .13), transparent 34%) !important;
}

/* The reference is a wide desktop composition. At smaller sizes, preserve
   the gradient falloff but keep the artwork from becoming a heavy crop. */
@media (max-width: 720px) {
  #app#app[data-active-view="workbench"][data-creation-entry="fast"],
  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .shell,
  #app#app[data-active-view="home"] .shell {
    background-size: auto 720px, auto 620px !important;
    background-position: center top, center top !important;
  }

  #app#app[data-active-view="workbench"][data-creation-entry="fast"] .workbench-grid {
    padding-top: 18px !important;
    padding-bottom: 56px !important;
  }

  #app#app[data-active-view="home"] .home-hero-media-frame {
    min-height: 300px !important;
  }
}
