/* LexPortal iframe parent UI — external CSS (CSP style-src 'self'). */
.lex-iframe-frame {
  position: fixed;
  right: max(8px, env(safe-area-inset-right, 0px));
  bottom: max(8px, env(safe-area-inset-bottom, 0px));
  border: none;
  outline: none;
  max-width: min(100vw, 480px);
  max-height: min(85vh, 820px);
  z-index: 2147483645;
  background: transparent;
  color-scheme: normal;
  overflow: visible;
}
.lex-iframe-frame--hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.lex-iframe-loader {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2147483646;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: wait;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
  animation: lexIframePulse 1.2s ease-in-out infinite;
}
@keyframes lexIframePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.88;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.lex-iframe-status {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 2147483644;
  max-width: 280px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  font: 12px/1.35 system-ui, sans-serif;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.lex-iframe-status--visible {
  opacity: 1;
}

.lex-iframe-fail {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147483646;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1e293b;
  color: #f8fafc;
  font: 13px/1.4 system-ui, sans-serif;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.lex-iframe-fail__retry {
  margin-top: 10px;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font: inherit;
}
