/* Step 604 — targeted consistency fixes.

   This layer deliberately does not alter the historical global/card/dropdown
   interaction systems. Those remain intact for the interaction-state audit.
   Step 604 owns only:
   - canonical Archive/Workspace Preview paint,
   - glass help/message cards,
   - their dismiss action material.
*/

html[data-visionx-theme] body.visionx-shell {
  --visionx-step604-help-glass:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, .044),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      rgba(18, 19, 15, .46),
      rgba(6, 7, 5, .40)
    );
}

/* Error and success help cards use one translucent glass construction in every
   appearance. Semantic red/green survives only as tint and edge colour. */
html[data-visionx-theme] body.visionx-shell .message {
  border-color: rgba(239, 154, 147, .52) !important;
  background:
    linear-gradient(
      rgba(112, 35, 32, .15),
      rgba(80, 22, 20, .08)
    ),
    var(--visionx-step604-help-glass) !important;
  background-clip: padding-box !important;
  box-shadow:
    0 1rem 2.6rem rgba(0, 0, 0, .30),
    inset 0 1px rgba(255, 225, 221, .045) !important;
  -webkit-backdrop-filter: blur(18px) saturate(112%) !important;
  backdrop-filter: blur(18px) saturate(112%) !important;
}

html[data-visionx-theme] body.visionx-shell .message.success {
  border-color: rgba(154, 218, 170, .52) !important;
  background:
    linear-gradient(
      rgba(31, 92, 49, .14),
      rgba(20, 62, 33, .075)
    ),
    var(--visionx-step604-help-glass) !important;
  box-shadow:
    0 1rem 2.6rem rgba(0, 0, 0, .30),
    inset 0 1px rgba(225, 255, 233, .045) !important;
}

/* The help-card action is glass as well. Hover brightens the existing semantic
   edge instead of replacing the card with a solid red or green button fill. */
html[data-visionx-theme] body.visionx-shell .message .message-dismiss {
  color: inherit !important;
  border-color: color-mix(in srgb, currentColor 58%, transparent) !important;
  background:
    linear-gradient(
      rgba(255, 255, 255, .032),
      rgba(255, 255, 255, .012)
    ),
    rgba(5, 6, 4, .14) !important;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, .032),
      rgba(255, 255, 255, .012)
    ) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .035) !important;
  -webkit-backdrop-filter: blur(10px) saturate(108%) !important;
  backdrop-filter: blur(10px) saturate(108%) !important;
  transform: none !important;
}

html[data-visionx-theme] body.visionx-shell .message .message-dismiss:is(
  :hover:not(:disabled),
  :focus-visible
) {
  color: inherit !important;
  border-color: color-mix(in srgb, currentColor 82%, white 18%) !important;
  outline-color: color-mix(in srgb, currentColor 44%, transparent) !important;
  background:
    linear-gradient(
      rgba(255, 255, 255, .058),
      rgba(255, 255, 255, .022)
    ),
    rgba(5, 6, 4, .16) !important;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, .058),
      rgba(255, 255, 255, .022)
    ) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .055),
    0 0 1rem color-mix(in srgb, currentColor 15%, transparent) !important;
  transform: none !important;
}

/* Safari already presents the canonical panel reflection at the intended
   strength. Opera/GX renders the same translucent layer flatter, so strengthen
   only the existing sheen there without changing the underlying panel material,
   opacity, geometry, blur or interaction states. */
html[data-visionx-opera-gx-sheen="true"][data-visionx-theme="classic"]
body.visionx-shell {
  --visionx-tab-surface-sheen:
    radial-gradient(
      circle at 0 0,
      rgba(244, 207, 100, .125),
      transparent 22rem
    ),
    linear-gradient(
      120deg,
      rgba(255, 255, 255, .034),
      transparent 34%
    );
}
/* Custom-gradient column bars deliberately use a quieter rendering of the
   operator-selected gradient than cards/tabs. The colours remain identical,
   but their contribution is reduced at runtime and a neutral dark veil keeps
   the square header bar integrated with the surrounding Glass material. */
html[data-visionx-theme][data-visionx-custom-tabs="true"]
body.visionx-shell {
  --visionx-table-header-surface:
    linear-gradient(
      rgba(5, 6, 4, .24),
      rgba(5, 6, 4, .24)
    ),
    var(--visionx-runtime-table-header-sheen),
    var(--visionx-runtime-table-header-gradient);
}
