/* One photograph per workspace. The panel colors and the photo tint are independent. */
.wm-workshop-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: #f5efe5;
  background-image: var(--wm-graphite-sheen);
}
.wm-workshop-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--wm-workshop-photo, url("../backgrounds/workshop/overview.webp?v=2")) 54% center / cover no-repeat;
  opacity: .41;
  filter: sepia(.34) saturate(.82) brightness(1.08) contrast(.83);
}
/* Keep the workshop visible at the edges and give dashboard text a warm reading surface. */
.product-private .wm-workshop-scene:is([data-route="dashboard"], [data-route="mobile_home"]) {
  background: #e4d9c8;
}
.product-private .wm-workshop-scene:is([data-route="dashboard"], [data-route="mobile_home"])::before {
  opacity: .49;
  filter: sepia(.22) saturate(.87) contrast(.98);
  mask-image: linear-gradient(90deg, #000 5%, rgb(0 0 0 / .22) 26%,
    rgb(0 0 0 / .22) 78%, #000 100%);
}
@media (max-width: 860px) {
  .product-private .wm-workshop-scene:is([data-route="dashboard"], [data-route="mobile_home"])::before {
    opacity: .18;
    mask-image: none;
  }
}
.wm-entry-hero-wrap {
  /* Clip the viewport-sized photograph at the end of the growing form. */
  clip-path: inset(0);
}
.wm-entry-hero-wrap .wm-workshop-scene {
  z-index: -1;
}
.wm-mobile-shell > .wm-ai-background-credit {
  bottom: calc(65px + env(safe-area-inset-bottom));
}

.page-garage { --wm-workshop-photo: url("../backgrounds/workshop/garage.webp?v=2"); }
.page-service { --wm-workshop-photo: url("../backgrounds/workshop/capture.webp?v=2"); }
.page-invoice, .page-documents, .page-legal, .page-search { --wm-workshop-photo: url("../backgrounds/workshop/documents.webp?v=2"); }
.page-costs { --wm-workshop-photo: url("../backgrounds/workshop/costs.webp?v=2"); }
.page-help, .page-changelog { --wm-workshop-photo: url("../backgrounds/workshop/help.webp?v=2"); }
.page-admin, .page-database { --wm-workshop-photo: url("../backgrounds/workshop/settings.webp?v=2"); }
.page-feedback { --wm-workshop-photo: url("../backgrounds/workshop/feedback.webp?v=2"); }
.wm-access-page { --wm-workshop-photo: url("../backgrounds/workshop/login.webp?v=2"); }

/* Some workspaces share a layout class or have both a modern and a legacy URL. */
.wm-workshop-scene:is([data-route="mobile_book"], [data-route="garage_detail"], [data-route="motorcycle_detail"],
  [data-route^="vehicle_registration"], [data-route="vehicle_status_edit"], [data-route="service_detail"],
  [data-route="modification_detail"], [data-route="chronicle_edit"]) {
  --wm-workshop-photo: url("../backgrounds/workshop/servicebook.webp?v=2");
}
.wm-workshop-scene:is([data-route="dashboard_due"], [data-route^="reminder_"], [data-route$="_reminder_create"],
  [data-route="motorcycle_apply_presets"]) {
  --wm-workshop-photo: url("../backgrounds/workshop/reminders.webp?v=2");
}
.wm-workshop-scene[data-route="cost_export_overview"] { --wm-workshop-photo: url("../backgrounds/workshop/report.webp?v=2"); }
.wm-workshop-scene[data-route="dashboard_costs"] { --wm-workshop-photo: url("../backgrounds/workshop/costs.webp?v=2"); }
.wm-workshop-scene:is([data-route^="quick_"], [data-route="service_update"], [data-route="garage_modification_create"]) {
  --wm-workshop-photo: url("../backgrounds/workshop/capture.webp?v=2");
}
.wm-workshop-scene:is([data-route^="receipt_learning"], [data-route^="gross_learning"], [data-route="recognition_review_open"]) {
  --wm-workshop-photo: url("../backgrounds/workshop/documents.webp?v=2");
}
@media print, (forced-colors: active) {
  .wm-workshop-scene, .wm-ai-background-credit { display: none; }
}
