/* @ownership: experiment-runtime-recovery
 *
 * Normal-state layout and visual language belong to each experiment. This
 * stylesheet must stay visually dormant until recovery is needed.
 */

.lab-sr-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.lab-recovery[hidden] {
  display: none !important;
}

.lab-recovery {
  --lab-recovery-accent: #d8d8d8;
  position: fixed;
  z-index: 30000;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 10px;
  background: rgb(18 19 22 / 94%);
  color: #f5f5f1;
  box-shadow: 0 22px 64px rgb(0 0 0 / 42%);
  font-family: var(--font-sans, system-ui, sans-serif);
  transform: translate(-50%, -50%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.lab-shell[data-lab-kind='industrial'] .lab-recovery { --lab-recovery-accent: #4fc3f7; }
.lab-shell[data-lab-kind='nanocage'] .lab-recovery { --lab-recovery-accent: #ef7357; }
.lab-shell[data-lab-kind='three-body'] .lab-recovery { --lab-recovery-accent: #ffd33d; }
.lab-shell[data-lab-kind='solar'] .lab-recovery { --lab-recovery-accent: #ffd36b; }

.lab-recovery h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.45;
}

.lab-recovery p {
  margin: 10px 0 0;
  color: rgb(245 245 241 / 68%);
  font-size: 15px;
  line-height: 1.7;
}

.lab-recovery__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.lab-recovery__button,
.lab-recovery__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 6px;
  background: transparent;
  color: #f5f5f1;
  font: inherit;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.lab-recovery__button {
  border-color: color-mix(in srgb, var(--lab-recovery-accent) 54%, transparent);
  color: var(--lab-recovery-accent);
}

.lab-recovery :is(button, a):focus-visible {
  outline: 2px solid var(--lab-recovery-accent);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .lab-recovery {
    width: calc(100vw - 24px);
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lab-recovery {
    scroll-behavior: auto;
  }
}
