/*
 * Ordenia dashboard hardening
 *
 * This stylesheet must be loaded in <head>, after the exported Framer CSS and
 * before the Framer runtime. It keeps every template dashboard invisible while
 * the final Ordenia image is decoded by ordenia-image-fix.js.
 */

[data-framer-name="Tab Image Wrapper"],
[data-framer-name^="tab " i][data-framer-name$="image" i] {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  background: #fff !important;
  contain: paint;
}

/* Never allow a Framer/Qarin image, picture or generated overlay to peek
   through the final dashboard layer. */
[data-framer-name="Tab Image Wrapper"]
  img:not(.ordenia-fixed-dashboard-image),
[data-framer-name^="tab " i][data-framer-name$="image" i]
  img:not(.ordenia-fixed-dashboard-image),
[data-framer-name="Tab Image Wrapper"] picture,
[data-framer-name^="tab " i][data-framer-name$="image" i] picture,
[data-framer-name="Tab Image Wrapper"] .ordenia-workflow-overlay,
[data-framer-name^="tab " i][data-framer-name$="image" i]
  .ordenia-cockpit-overlay {
  visibility: hidden !important;
  opacity: 0 !important;
}

[data-framer-name="Tab Image Wrapper"] [style*="background-image"],
[data-framer-name^="tab " i][data-framer-name$="image" i]
  [style*="background-image"] {
  background-image: none !important;
}

.ordenia-fixed-dashboard-overlay {
  position: absolute !important;
  z-index: 2147483000 !important;
  inset: 0 !important;
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  place-items: center !important;
  overflow: hidden !important;
  border-radius: inherit !important;
  background: #fff !important;
  pointer-events: none !important;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
  animation: none !important;
  transition: none !important;
}

.ordenia-fixed-dashboard-image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  border: 0 !important;
  background: #fff !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  animation: none !important;
  transition: none !important;
}

/*
 * The legacy stylesheet hides every image except its own temporary overlay
 * with a more specific :not() selector. Repeat the Framer frame selectors
 * here so the final decoded Ordenia bitmap always wins that cascade.
 */
[data-framer-name="Tab Image Wrapper"]
  .ordenia-fixed-dashboard-overlay
  .ordenia-fixed-dashboard-image,
[data-framer-name^="tab " i][data-framer-name$="image" i]
  .ordenia-fixed-dashboard-overlay
  .ordenia-fixed-dashboard-image {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* These labels were added on top of the old template dashboard and are the
   source of the duplicate logo/text visible during hydration. */
.ordenia-dashboard-brand,
.ordenia-dashboard-copy {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  .ordenia-fixed-dashboard-overlay,
  .ordenia-fixed-dashboard-image {
    animation: none !important;
    transition: none !important;
  }
}
