/* GoldOrbit login: "Save username" + "Stay logged in" checkboxes
   and auto-login indicator. Themed to match the existing dark
   sci-fi login form (externalHome.css). */

/* The login form container (#div_login) is a fixed 254x76 box with
   #loginbar absolutely positioned at top:82 (Register/Login buttons) and
   #langbar at top:141. Place the remember-me controls in the empty
   strip between them, and shift langbar down to give a clean gap. */

#div_login #langbar { top: 175px; }

#div_login .loginOptions {
  position: absolute;
  left: 13px;
  right: 13px;
  top: 110px;
  margin: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

#div_login.is-auto-login .loginOptions { display: none; }

.loginOptionLabel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  font-size: 10px;
  letter-spacing: 0.2px;
  color: #afc9d3;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.12s ease;
}

.loginOptionLabel:hover { color: #ffffff; }

.loginOptionLabel input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 11px;
  height: 11px;
  margin: 0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(175, 201, 211, 0.45);
  border-radius: 2px;
  cursor: pointer;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.loginOptionLabel input[type="checkbox"]:hover {
  border-color: rgba(241, 200, 57, 0.65);
}

.loginOptionLabel input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #F1C839 0%, #c79e22 100%);
  border-color: #F1C839;
  box-shadow: 0 0 0 1px rgba(241, 200, 57, 0.25);
}

.loginOptionLabel input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 2px;
  top: -1px;
  width: 4px;
  height: 7px;
  border-right: 2px solid #0c1218;
  border-bottom: 2px solid #0c1218;
  transform: rotate(45deg);
}

#div_login .autoLoginIndicator {
  position: absolute;
  left: 13px;
  right: 13px;
  top: 108px;
  margin: 0;
  padding: 5px 8px 6px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(241, 200, 57, 0.40);
  border-radius: 3px;
  z-index: 3;
  animation: autoLoginIndicatorAppear 0.22s ease;
}

.autoLoginIndicator[hidden] { display: none; }

.autoLoginIndicatorRow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #F1C839;
}

.autoLoginIndicatorDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F1C839;
  box-shadow: 0 0 6px rgba(241, 200, 57, 0.7);
  animation: autoLoginDotPulse 1.2s ease-in-out infinite;
}

@keyframes autoLoginDotPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.autoLoginIndicatorBar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.autoLoginIndicatorBar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #F1C839 0%, #ffe27a 100%);
  box-shadow: 0 0 6px rgba(241, 200, 57, 0.5);
  animation: autoLoginBarFill 800ms ease-out forwards;
}

@keyframes autoLoginBarFill {
  from { width: 0%; }
  to   { width: 100%; }
}

@keyframes autoLoginIndicatorAppear {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.autoLoginCancelled {
  margin-top: 4px;
  font-size: 10px;
  color: #afc9d3;
  opacity: 0.75;
}

/* Cloudflare Turnstile (compact 150x140) sits under the remember-me strip;
   the language bar moves down only when the widget is on the page. */
#div_login #turnstileLogin {
  position: absolute;
  left: 52px;
  top: 135px;
  width: 150px;
  height: 140px;
  margin: 0 !important;
  z-index: 2;
}
#div_login #turnstileLogin:empty { display: none; }
#div_login:has(#turnstileLogin .cf-turnstile) #langbar { top: 282px; }
