/* ByAgentX Release Production Adapters & Safe Preview Sheet (release-adapters.css)
 * Disjoint from design styles.css and hero release-hero.css.
 * Guarantees [hidden] invariant, canonical regina-chat.mjs compatibility, and #bx-release-sheet styling.
 */

[hidden] {
  display: none !important;
}

/* Guarantee non-blocking wrapper hitbox for canonical regina-chat.mjs & redesigned widget */
.regina-chat,
#regina-chat-root {
  pointer-events: none;
}

.regina-chat__trigger,
.regina-chat__panel {
  pointer-events: auto;
}

.regina-chat__trigger.cta-obstructed {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(12px);
}

/* Canonical regina-chat.mjs extra UI elements (status, error, retry, typing indicator) */
.regina-chat__status,
.regina-chat__error {
  margin: 0;
  padding: 6px 14px;
  font-size: 12px;
  line-height: 1.4;
}

.regina-chat__status {
  color: #9ba8ad;
}

.regina-chat__error {
  color: #ff8e8e;
  background: rgba(255, 107, 107, 0.08);
  border-top: 1px solid rgba(255, 107, 107, 0.2);
}

.regina-chat__retry {
  margin: 6px 14px 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(77, 226, 247, 0.35);
  background: rgba(77, 226, 247, 0.12);
  color: #e6f9fc;
  font: 600 12px/1.2 system-ui, -apple-system, sans-serif;
  cursor: pointer;
  align-self: flex-start;
}

.regina-chat__typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.85;
}

.regina-chat__typing-dots {
  display: inline-flex;
  gap: 3px;
}

.regina-chat__typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: bx-chat-dot 1.1s infinite ease-in-out;
}

.regina-chat__typing-dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.regina-chat__typing-dots span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes bx-chat-dot {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.visually-hidden {
  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;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Release Action & Preview Guard Sheet (#bx-release-sheet) */
#bx-release-sheet {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 6, 8, 0.82);
  color: #edf1f2;
  font-family: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, sans-serif;
}

#bx-release-sheet.open {
  display: flex;
}

#bx-release-sheet .bx-rs-box {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  padding: 26px 24px 22px;
  border-radius: 18px;
  background: #0e1316;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

#bx-release-sheet .bx-rs-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #edf1f2;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

#bx-release-sheet .bx-rs-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

#bx-release-sheet .bx-rs-kicker {
  display: inline-block;
  margin: 0 42px 8px 0;
  font: 600 11px/1.3 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4de2f7;
}

#bx-release-sheet h3 {
  margin: 0 0 8px;
  padding-right: 36px;
  font-size: 22px;
  line-height: 1.2;
  color: #ffffff;
}

#bx-release-sheet .bx-rs-sub {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #b4c0c5;
}

#bx-release-sheet .bx-rs-ledger {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: grid;
  gap: 8px;
  font-size: 13.5px;
}

#bx-release-sheet .bx-rs-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

#bx-release-sheet .bx-rs-row span {
  color: #9ba8ad;
}

#bx-release-sheet .bx-rs-row strong {
  color: #ffffff;
  text-align: right;
  font-weight: 600;
}

#bx-release-sheet .bx-rs-row.is-total {
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#bx-release-sheet .bx-rs-row.is-total strong {
  color: #4de2f7;
  font-size: 15px;
}

#bx-release-sheet .bx-rs-url {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #070a0c;
  border: 1px solid rgba(77, 226, 247, 0.22);
  font: 400 12px/1.45 'JetBrains Mono', ui-monospace, monospace;
  color: #a9e9f5;
  word-break: break-all;
}

#bx-release-sheet .bx-rs-notes {
  width: 100%;
  min-height: 64px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #edf1f2;
  font: inherit;
  font-size: 13.5px;
  resize: vertical;
}

#bx-release-sheet .bx-rs-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#bx-release-sheet .bx-rs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #edf1f2;
  font: 600 13.5px/1.2 inherit;
  text-decoration: none;
  cursor: pointer;
}

#bx-release-sheet .bx-rs-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

#bx-release-sheet .bx-rs-btn-primary {
  background: #dfb983;
  border-color: #dfb983;
  color: #090c0e;
}

#bx-release-sheet .bx-rs-btn-primary:hover {
  background: #ebd0a7;
}

#bx-release-sheet .bx-rs-btn-cy {
  background: #4de2f7;
  border-color: #4de2f7;
  color: #061013;
}

#bx-release-sheet .bx-rs-status {
  margin: 12px 0 0;
  min-height: 18px;
  font-size: 12.5px;
  color: #7ee3b3;
}

#bx-release-sheet .bx-rs-fine {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #8f9ea4;
}

/* Preview-mode voice call prompt helper inside #callm */
#callm .call-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

#callm .call-prompts button {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(77, 226, 247, 0.3);
  background: rgba(77, 226, 247, 0.08);
  color: #dff8fc;
  font-size: 12.5px;
  cursor: pointer;
}

#callm .call-prompts button:hover {
  background: rgba(77, 226, 247, 0.18);
}
