/* Platform branch gate — self-contained.
   It loads before any app's stylesheet, so nothing here relies on that app's
   tokens; the palette is written out. Everything is namespaced .ebg- so it can
   never collide with the five bundles it sits in front of. */

.ebg-locked { overflow: hidden; }

.ebg-ov {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0));
  font-family: "Heebo", system-ui, sans-serif; direction: rtl;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(14,165,233,.12), transparent 60%),
    #F5F5F6;
  animation: ebgFade .2s ease both;
  overflow-y: auto;
}
.ebg-ov.ebg-out { animation: ebgFadeOut .26s ease both; }
@keyframes ebgFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes ebgFadeOut { to { opacity: 0; transform: scale(1.01) } }

.ebg-card {
  width: 100%; max-width: 400px; background: #fff;
  border: 1px solid #F0F1F3; border-radius: 18px;
  box-shadow: 0 30px 70px -34px rgba(17,17,17,.35), 0 2px 8px -4px rgba(17,17,17,.08);
  padding: 26px 22px 22px;
  animation: ebgIn .42s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes ebgIn { from { opacity: 0; transform: translateY(12px) scale(.985) } to { opacity: 1; transform: none } }

.ebg-mark {
  width: 52px; height: 52px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px; color: #0369A1; background: #F0F9FF;
  box-shadow: inset 0 0 0 1px rgba(14,165,233,.18);
}
.ebg-title { margin: 0; text-align: center; font-size: 20px; font-weight: 800; color: #111; }
.ebg-sub { margin: 5px 0 18px; text-align: center; font-size: 13px; color: #6B7280; }

.ebg-form { display: flex; flex-direction: column; gap: 13px; }
.ebg-field { display: flex; flex-direction: column; gap: 6px; }
.ebg-lbl { font-size: 12px; font-weight: 700; color: #374151; }

.ebg-input {
  display: flex; align-items: center; gap: 9px;
  padding: 0 13px; height: 46px; background: #F9FAFB;
  border: 1.5px solid #F0F1F3; border-radius: 12px;
  transition: border-color .24s cubic-bezier(.4,0,.2,1),
              background .24s cubic-bezier(.4,0,.2,1),
              box-shadow .24s cubic-bezier(.4,0,.2,1);
}
.ebg-input:focus-within { border-color: #0EA5E9; background: #fff; box-shadow: 0 0 0 4px #F0F9FF; }
.ebg-input select, .ebg-input input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 15px; color: #111;
}
.ebg-eye {
  border: 0; background: transparent; cursor: pointer; padding: 4px 6px;
  color: #6B7280; font-size: 12px; font-weight: 600; border-radius: 8px;
}
.ebg-eye:hover { color: #111; background: #F3F4F6; }

.ebg-msg {
  padding: 10px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  background: #FEF2F2; color: #B91C1C;
}
.ebg-msg.warn { background: #FFFBEB; color: #B45309; }
.ebg-shake { animation: ebgShake .32s cubic-bezier(.4,0,.2,1); }
@keyframes ebgShake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-4px) } 75% { transform: translateX(4px) } }

.ebg-go {
  height: 48px; margin-top: 4px; border: 0; cursor: pointer; border-radius: 12px;
  background: #0EA5E9; color: #fff; font: inherit; font-size: 15px; font-weight: 700;
  transition: background .24s, opacity .24s, transform .14s;
}
.ebg-go:hover:not(:disabled) { background: #0284C7; }
.ebg-go:active:not(:disabled) { transform: scale(.985); }
.ebg-go:disabled { opacity: .45; cursor: not-allowed; }
.ebg-go.busy { color: transparent; position: relative; }
.ebg-go.busy::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: ebgSpin .7s linear infinite;
}
@keyframes ebgSpin { to { transform: rotate(360deg) } }

/* ---- the way out ---- */
.ebg-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; cursor: pointer; font-family: inherit;
  border-radius: 30px; padding: 6px 12px;
  font-size: 12px; font-weight: 600; line-height: 1;
  transition: background .24s, color .24s, transform .14s, max-width .3s;
  max-width: 190px; white-space: nowrap; overflow: hidden;
}
.ebg-chip.in-bar { background: rgba(255,255,255,.12); color: #F3F4F6; margin-inline-start: 8px; }
.ebg-chip.in-bar:hover { background: rgba(255,255,255,.2); }
.ebg-chip.floating {
  position: fixed; top: 10px; inset-inline-start: 10px; z-index: 2147482000;
  background: #fff; color: #374151; box-shadow: 0 6px 20px rgba(17,17,17,.14);
}
.ebg-chip:active { transform: scale(.95); }
.ebg-chip.confirm { background: #B91C1C; color: #fff; }
.ebg-chip-n { overflow: hidden; text-overflow: ellipsis; }
.ebg-chip-x { opacity: .7; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .ebg-ov, .ebg-card, .ebg-msg { animation: none; }
  .ebg-input, .ebg-go, .ebg-chip { transition: none; }
}
