/* Auth popup — closer to original DanceBet auth layout */
#snapshot-auth-popup.popup-holder-bc.entrance-popup-bc {
  position: fixed;
  inset: 0;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 100dvh;
  max-height: 100dvh;
  z-index: 10080;
  display: block;
  background: #0f1c36;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto !important;
  touch-action: auto;
  -webkit-user-select: text;
  user-select: text;
  isolation: isolate;
}

#snapshot-auth-popup.popup-holder-bc.entrance-popup-bc.hidden {
  display: none !important;
}

#snapshot-auth-popup .popup-middleware-bc,
#snapshot-auth-popup .popup-inner-bc {
  min-height: 100%;
  background: #0f1c36;
  position: relative;
  pointer-events: auto !important;
}

#snapshot-auth-popup .e-p-close-icon-bc {
  position: absolute;
  top: 18px;
  left: 16px;
  z-index: 2;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

#snapshot-auth-popup .entrance-form-header-bc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 0;
  min-height: 58px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#snapshot-auth-popup .entrance-form-header-bc .hdr-logo-bc {
  width: 108px;
  height: 34px;
  object-fit: contain;
}

#snapshot-auth-popup .auth-head-switch {
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 5px;
  background: #1ba84f !important;
  border-color: #1ba84f !important;
  color: #fff !important;
  font-size: 13px;
}

#snapshot-auth-popup .entrance-form-actions-holder-bc {
  display: none;
  gap: 10px;
  padding: 8px 16px 0;
}

#snapshot-auth-popup .entrance-form-actions-holder-bc .btn.s-small {
  min-height: 34px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 5px;
}

#snapshot-auth-popup .entrance-form-content-bc {
  padding: 10px 10px 34px;
  overflow: visible !important;
}

#snapshot-auth-popup .entrance-form-text-bc {
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.8;
  margin: 8px 0 10px;
  text-align: right;
}

#snapshot-auth-popup .entrance-form-text-bc:first-child {
  color: rgba(255, 255, 255, 0.54);
  font-size: 14px;
}

#snapshot-auth-popup .popup-inner-bc {
  max-width: 420px;
  margin: 0 auto;
}

#snapshot-auth-popup .entrance-f-item-bc {
  margin: 0 0 20px;
  position: relative;
}

#snapshot-auth-popup .form-control-label-bc.inputs {
  display: block;
  position: relative;
  height: 74px;
  min-height: 74px;
  border-radius: 6px;
  background: #42506c !important;
  box-shadow: none !important;
  overflow: hidden;
}

#snapshot-auth-popup .form-control-input-bc,
#snapshot-auth-popup .form-control-select-bc {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 74px !important;
  min-height: 74px !important;
  padding: 26px 14px 8px !important;
  font-size: 16px !important;
  line-height: 1.35;
  border: 0 !important;
  border-radius: 6px;
  background: transparent !important;
  color: #fff !important;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-user-select: text !important;
  user-select: text !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
}

#snapshot-auth-popup .form-control-title-bc {
  position: absolute;
  right: 14px;
  top: 22px;
  color: rgba(255, 255, 255, 0.46) !important;
  font-size: 15px !important;
  pointer-events: none;
  transition: top 0.15s ease, font-size 0.15s ease;
  z-index: 1;
}

#snapshot-auth-popup .form-control-input-bc:focus + .form-control-input-stroke-bc + .form-control-title-bc,
#snapshot-auth-popup .form-control-input-bc:not(:placeholder-shown) + .form-control-input-stroke-bc + .form-control-title-bc,
#snapshot-auth-popup select.form-control-input-bc:focus + .form-control-input-stroke-bc + .form-control-title-bc,
#snapshot-auth-popup select.form-control-input-bc:valid + .form-control-input-stroke-bc + .form-control-title-bc {
  top: 10px;
  font-size: 12px !important;
}

#snapshot-auth-popup .form-control-input-bc:focus + .form-control-input-stroke-bc + .form-control-title-bc,
#snapshot-auth-popup .form-control-input-bc:not(:placeholder-shown) + .form-control-title-bc,
#snapshot-auth-popup select.form-control-input-bc:focus + .form-control-title-bc {
  top: 10px;
  font-size: 12px !important;
}

#snapshot-auth-popup .entrance-form-password-field-bc {
  padding-left: 44px !important;
}

#snapshot-auth-popup .password-toggle-bc {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 18px;
  padding: 6px;
  cursor: pointer;
  pointer-events: auto !important;
}

#snapshot-auth-popup .has-auth-error .form-control-label-bc.inputs {
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.85) inset !important;
}

#snapshot-auth-popup .auth-field-error {
  display: block;
  margin: 6px 6px 0 0;
  color: #ff5c69;
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

/* Legacy gb-auth-* fallback */
#snapshot-auth-popup .gb-auth-field {
  margin-top: 14px;
  margin-bottom: 12px;
  touch-action: manipulation;
}

#snapshot-auth-popup .gb-auth-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-bottom: 6px;
  text-align: right;
  direction: rtl;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#snapshot-auth-popup .gb-auth-input-wrap {
  position: relative;
}

#snapshot-auth-popup .gb-auth-input,
#snapshot-auth-popup .gb-auth-select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 50px;
  padding: 12px 14px;
  font-size: 16px !important;
  line-height: 1.35;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgb(31, 46, 68) !important;
  color: #fff !important;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-user-select: text !important;
  user-select: text !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  position: relative;
  z-index: 2;
}

#snapshot-auth-popup .gb-auth-input-password {
  padding-left: 44px;
}

#snapshot-auth-popup .gb-auth-eye {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 18px;
  padding: 6px;
  cursor: pointer;
  pointer-events: auto !important;
}

#snapshot-auth-popup .gb-auth-checkbox-wrap {
  margin-top: 16px;
}

#snapshot-auth-popup .gb-auth-checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  direction: rtl;
  text-align: right;
  position: relative;
  padding: 6px 0;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#snapshot-auth-popup .gb-auth-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  inset-inline-start: 0;
  top: 4px;
  z-index: 2;
  pointer-events: auto !important;
  cursor: pointer;
}

#snapshot-auth-popup .gb-auth-checkbox-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  pointer-events: none;
}

#snapshot-auth-popup .gb-auth-checkbox-input:checked + .gb-auth-checkbox-box {
  background: #16a34a;
  border-color: #16a34a;
}

#snapshot-auth-popup .gb-auth-checkbox-input:checked + .gb-auth-checkbox-box::after {
  content: "";
  display: block;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

#snapshot-auth-popup .checkbox-control-text-bc {
  flex: 1;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
}

#snapshot-auth-popup .checkbox-control-input-bc.gb-auth-checkbox-input {
  pointer-events: auto !important;
  opacity: 0 !important;
}

#snapshot-auth-popup .gb-auth-checkbox-row {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  direction: rtl;
  text-align: right;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  line-height: 1.5;
}

#snapshot-auth-popup .gb-auth-checkbox {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 1px;
  accent-color: #16a34a;
  pointer-events: auto !important;
}

#snapshot-auth-popup .gb-auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  background: #19aa51 !important;
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

@media (min-width: 760px) {
  #snapshot-auth-popup.popup-holder-bc.entrance-popup-bc {
    background: rgba(0, 0, 0, 0.62) !important;
    padding: 40px 16px;
  }

  #snapshot-auth-popup .popup-inner-bc {
    min-height: auto;
    margin-top: 36px;
    margin-bottom: 36px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  }

  #snapshot-auth-popup .form-control-label-bc.inputs,
  #snapshot-auth-popup .form-control-input-bc,
  #snapshot-auth-popup .form-control-select-bc {
    height: 80px !important;
    min-height: 80px !important;
  }

  #snapshot-auth-popup .form-control-title-bc {
    font-size: 16px !important;
    top: 26px;
  }
}

@media (max-width: 759px) {
  #snapshot-auth-popup .popup-inner-bc {
    max-width: none;
  }

  #snapshot-auth-popup .e-p-close-icon-bc {
    position: fixed;
  }
}

#snapshot-auth-popup .btn.s-small.sign-in,
#snapshot-auth-popup .btn.s-small.register {
  opacity: 0.55;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}

#snapshot-auth-popup .btn.s-small.sign-in.active,
#snapshot-auth-popup .btn.s-small.register.active {
  opacity: 1;
  background: #16a34a;
  border-color: #16a34a;
}

#snapshot-auth-popup .entrance-form-link-bc {
  display: block;
  text-align: right;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  margin-top: 8px;
  text-decoration: none;
  direction: rtl;
}

#snapshot-auth-popup .entrance-f-error-message-bc {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 8px;
}

#snapshot-auth-popup .entrance-form-support-bc {
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#snapshot-auth-popup .gb-password-rules {
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

#snapshot-auth-popup .gb-password-rules li.is-valid {
  color: #4ade80;
}

#snapshot-auth-popup .gb-password-rules li.is-invalid {
  color: #f87171;
}

#snapshot-auth-popup .entrance-form-terms-block-bc {
  margin-top: 8px;
}

#snapshot-auth-popup .entrance-form-terms-title-bc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  margin: 10px 0 6px;
  text-align: right;
}

/* Scroll lock — keep auth full-screen; hide homepage behind popup */
body.auth-popup-open {
  overflow: hidden;
  background: rgb(15, 28, 54);
}

body.auth-popup-open #root,
body.auth-popup-open #app {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.auth-popup-keyboard {
  overflow: hidden;
  background: rgb(15, 28, 54);
}

body.auth-popup-open #snapshot-auth-popup,
body.auth-popup-keyboard #snapshot-auth-popup {
  visibility: visible !important;
  pointer-events: auto !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100dvh !important;
  max-height: none !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Vue auth popup inside #app */
#app .popup-holder-bc.entrance-popup-bc .gb-auth-input,
#app .popup-holder-bc.entrance-popup-bc .gb-auth-select,
#app .popup-holder-bc.entrance-popup-bc input.form-control-input-bc,
#app .popup-holder-bc.entrance-popup-bc select.form-control-select-bc {
  font-size: 16px !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

#app.layout-bc .popup-holder-bc.entrance-popup-bc {
  -webkit-user-select: text !important;
  user-select: text !important;
  pointer-events: auto !important;
}
