/* ===========================================================================
   Bitghost Wallet — Frictionless Auth modal (v2.4.0)
   22px-bordered, draggable, dark-mode login / register modal. Pais palette.
   =========================================================================== */
.bgw-auth-overlay {
  --pais-1:#EFA3A9; --pais-2:#E63946; --pais-3:#C1272D; --pais-4:#8B1A1F;
  position: fixed; inset: 0; z-index: 999999;
  background: rgba(0,0,0,.72); backdrop-filter: blur(4px);
}
.bgw-auth-overlay[hidden] { display: none; }
.bgw-auth-overlay *, .bgw-auth-overlay *::before { box-sizing: border-box; }

.bgw-auth-modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 28px));
  background: #000;
  /* The signature Bitghost 22px border (responsive down to 14px on mobile). */
  border: 22px solid #000;
  border-radius: 26px;
  box-shadow: 0 0 0 2px var(--pais-3), 0 24px 70px rgba(0,0,0,.6), 0 0 60px rgba(230,57,70,.25);
  overflow: hidden;
}

.bgw-auth-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: grab; user-select: none;
  background: linear-gradient(135deg, var(--pais-2), var(--pais-4));
  border-radius: 14px 14px 0 0;
  position: relative; overflow: hidden;
}
.bgw-auth-bar.is-dragging { cursor: grabbing; }
.bgw-auth-bar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%);
  background-size: 220% 100%; animation: bgwAuthShim 3.4s linear infinite;
}
@keyframes bgwAuthShim { 0% { background-position: 140% 0; } 100% { background-position: -40% 0; } }
@media (prefers-reduced-motion: reduce) { .bgw-auth-bar::after { animation: none; } }
.bgw-auth-cube { font-size: 18px; position: relative; z-index: 1; }
.bgw-auth-title { font-weight: 900; font-size: 15px; color: #fff; letter-spacing: .3px; position: relative; z-index: 1; }
.bgw-auth-x {
  margin-left: auto; position: relative; z-index: 1;
  border: 0; background: rgba(0,0,0,.25); color: #fff; cursor: pointer;
  width: 30px; height: 30px; border-radius: 9px; font-size: 20px; line-height: 1;
}
.bgw-auth-x:hover { background: rgba(0,0,0,.45); }

.bgw-auth-body { background: linear-gradient(180deg, #140406, #000); padding: 18px 16px 16px; }

.bgw-auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.bgw-auth-tab {
  flex: 1; border: 1px solid #1d2027; background: #0d0f12; color: var(--pais-1);
  border-radius: 12px; padding: 10px; font-weight: 800; font-size: 14px; cursor: pointer;
}
.bgw-auth-tab.is-active { background: linear-gradient(135deg, var(--pais-2), var(--pais-4)); color: #fff; border-color: transparent; }

.bgw-auth-field { display: block; margin-bottom: 12px; }
.bgw-auth-field > span { display: block; font-size: 12px; font-weight: 700; color: #cdbabd; margin-bottom: 6px; letter-spacing: .4px; }
.bgw-auth-field input {
  width: 100%; background: #0d0f12; border: 1px solid #1d2027; border-radius: 12px;
  color: #fff; font-size: 16px; padding: 12px 14px; outline: none;
}
.bgw-auth-field input:focus { border-color: var(--pais-2); box-shadow: 0 0 0 3px rgba(230,57,70,.18); }

.bgw-auth-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #cdbabd; margin: 4px 0 14px; }
.bgw-auth-remember input { width: 16px; height: 16px; }

.bgw-auth-submit {
  width: 100%; border: 0; cursor: pointer; border-radius: 12px; padding: 13px;
  font-weight: 900; font-size: 15px; color: #fff; letter-spacing: .4px;
  background: linear-gradient(135deg, var(--pais-2), var(--pais-4));
  box-shadow: 0 10px 24px rgba(230,57,70,.32);
}
.bgw-auth-submit:hover { transform: translateY(-1px); }
.bgw-auth-submit[disabled] { opacity: .6; cursor: progress; transform: none; }

.bgw-auth-lost { display: inline-block; margin-top: 12px; color: var(--pais-1); font-size: 12px; text-decoration: none; }
.bgw-auth-lost:hover { text-decoration: underline; }

.bgw-auth-status { font-size: 13px; margin-top: 12px; min-height: 18px; }
.bgw-auth-status.ok { color: #46d17f; font-weight: 700; }
.bgw-auth-status.err { color: var(--pais-1); font-weight: 600; }

@media (max-width: 480px) {
  .bgw-auth-modal { border-width: 14px; }
}
