/* Floating X button + CA box — Einstein landing */

#einstein-float {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  font-family: Orbitron, "DM Sans", system-ui, sans-serif;
}

#einstein-float * {
  box-sizing: border-box;
}

/* Top-right cluster: X + CA */
.ef-top-right {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  pointer-events: auto;
  max-width: min(92vw, 22rem);
}

/* X (Twitter) button */
.ef-x-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(8, 12, 28, 0.55);
  color: #e0f2fe;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
}

.ef-x-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(125, 211, 252, 0.75);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.ef-x-btn:active {
  transform: translateY(0);
}

.ef-x-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

/* CA box */
.ef-ca-box {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  border-radius: 0.85rem;
  border: 1px solid rgba(167, 139, 250, 0.4);
  background: linear-gradient(
    135deg,
    rgba(10, 12, 28, 0.78) 0%,
    rgba(20, 16, 48, 0.72) 55%,
    rgba(8, 24, 40, 0.78) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.08) inset,
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(139, 92, 246, 0.12);
  overflow: hidden;
}

.ef-ca-main {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem 0.55rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
}

.ef-ca-label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(165, 243, 252, 0.75);
}

.ef-ca-value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(250, 250, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.ef-ca-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0 0.85rem;
  border: none;
  border-left: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(56, 189, 248, 0.08);
  color: #a5f3fc;
  font-family: Orbitron, "DM Sans", system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ef-ca-copy:hover {
  background: rgba(56, 189, 248, 0.22);
  color: #ecfeff;
}

.ef-ca-copy.copied {
  background: rgba(52, 211, 153, 0.2);
  color: #a7f3d0;
}

.ef-ca-copy svg {
  width: 0.9rem;
  height: 0.9rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

/* Bottom-left X handle (optional secondary) — hide on very small if needed */
.ef-x-handle {
  position: absolute;
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  left: max(0.85rem, env(safe-area-inset-left));
  pointer-events: auto;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.85);
  text-decoration: none;
  text-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
  transition: color 0.15s ease;
}

.ef-x-handle:hover {
  color: #e9d5ff;
}

@media (max-width: 480px) {
  .ef-top-right {
    top: max(0.55rem, env(safe-area-inset-top));
    right: max(0.55rem, env(safe-area-inset-right));
    max-width: calc(100vw - 1.1rem);
  }

  .ef-ca-value {
    font-size: 0.65rem;
  }

  .ef-ca-copy span {
    display: none;
  }

  .ef-ca-copy {
    padding: 0 0.7rem;
  }
}
