/* Nebo auth page helpers — Dreams POS structure + CTF-specific behavior */

/* ─── 100vh shell + narrow auth column ─── */
html:has(body.nebo-dreams-auth) {
  height: 100%;
}

body.nebo-dreams-auth {
  min-height: 100vh;
}

body.nebo-dreams-auth .main-wrapper,
body.nebo-dreams-auth .account-content {
  min-height: 100vh;
}

body.nebo-dreams-auth .login-wrapper.login-new {
  min-height: 100vh;
  overflow: visible;
  padding: 1rem 0;
  align-items: center;
  justify-content: center;
  background-image: none;
}

body.nebo-dreams-auth .login-wrapper.login-new > .row {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  align-items: center;
}

/* Fixed auth column — overrides Dreams POS col-lg-5/6 + form width 70% */
body.nebo-dreams-auth .nebo-auth-column {
  max-width: 40rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  box-sizing: border-box;
}

body.nebo-dreams-auth .login-wrapper .login-content.user-login {
  height: auto !important;
  min-height: 0 !important;
  flex: 0 1 auto;
  width: 100% !important;
  padding: 0 !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
}

body.nebo-dreams-auth .login-wrapper .login-content.user-login form,
body.nebo-dreams-auth .login-wrapper .login-content.user-login > .card {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  margin: 0;
}

body.nebo-dreams-auth .login-wrapper .login-content.user-login .card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.07);
  overflow: visible;
}

body.nebo-dreams-auth .login-wrapper .login-content.user-login .card-body {
  flex: 0 1 auto;
  overflow: visible;
  padding: 1.25rem 1.5rem !important;
}

body.nebo-dreams-auth .nebo-auth-column,
body.nebo-dreams-auth .login-wrapper.login-new,
body.nebo-dreams-auth .account-content {
  overflow: visible;
}

body.nebo-dreams-auth .copyright-text {
  flex-shrink: 0;
  margin-top: 0.35rem !important;
  margin-bottom: 0 !important;
}

body.nebo-dreams-auth .copyright-text p {
  margin: 0;
  font-size: 0.6875rem;
  color: #94a3b8;
}

/* ─── Branding + headings ─── */
body.nebo-dreams-auth .login-logo {
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 0.5rem !important;
}

body.nebo-dreams-auth .login-logo img {
  max-height: 2.125rem;
  width: auto;
}

body.nebo-dreams-auth .login-userheading {
  margin-bottom: 0.875rem !important;
}

body.nebo-dreams-auth .login-userheading h3 {
  font-size: 1.25rem !important;
  margin-bottom: 0.35rem !important;
}

body.nebo-dreams-auth .login-userheading h4 {
  font-size: 0.8125rem !important;
  line-height: 1.45 !important;
}

/* ─── Compact form controls ─── */
body.nebo-dreams-auth .form-label {
  font-size: 0.8125rem;
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

body.nebo-dreams-auth .mb-3 {
  margin-bottom: 0.6rem !important;
}

body.nebo-dreams-auth .row.g-2 {
  --bs-gutter-y: 0.45rem;
  --bs-gutter-x: 0.65rem;
}

body.nebo-dreams-auth .input-group .form-control,
body.nebo-dreams-auth .input-group .form-select,
body.nebo-dreams-auth .pass-group .form-control {
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  border-radius: 0.35rem;
}

body.nebo-dreams-auth .input-group .input-group-text {
  padding: 0.35rem 0.55rem;
  font-size: 0.875rem;
  line-height: 1;
}

body.nebo-dreams-auth .input-group .form-select {
  background-color: #fff;
  border-color: #e6eaed;
  padding-right: 1.75rem;
  background-position: right 0.4rem center;
  background-size: 12px 9px;
}

body.nebo-dreams-auth .input-group .form-control:focus,
body.nebo-dreams-auth .input-group .form-select:focus,
body.nebo-dreams-auth .pass-group .form-control:focus {
  box-shadow: none;
  border-color: rgba(16, 185, 129, 0.45);
}

body.nebo-dreams-auth .pass-group .toggle-password,
body.nebo-dreams-auth .pass-group .toggle-passwords {
  width: 1.625rem;
  height: 1.625rem;
  font-size: 0.875rem;
  right: 0.4rem;
}

body.nebo-dreams-auth .form-login {
  margin-bottom: 0.6rem !important;
}

body.nebo-dreams-auth .form-login .btn {
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
  min-height: 2.25rem;
}

body.nebo-dreams-auth .signinform h4 {
  font-size: 0.8125rem !important;
  margin: 0;
  line-height: 1.45;
}

body.nebo-dreams-auth .authentication-check .checkboxs,
body.nebo-dreams-auth .authentication-check label {
  font-size: 0.75rem !important;
  line-height: 1.4 !important;
}

body.nebo-dreams-auth .authentication-check .checkboxs {
  padding-left: 1.5rem !important;
}

body.nebo-dreams-auth .nebo-field-help,
body.nebo-dreams-auth .password-strength {
  font-size: 0.6875rem;
  margin-top: 0.2rem;
  line-height: 1.35;
}

body.nebo-dreams-auth .nebo-field-error,
body.nebo-dreams-auth .nebo-field-status {
  font-size: 0.6875rem;
  margin-top: 0.2rem;
  line-height: 1.35;
}

body.nebo-dreams-auth .nebo-field-status--success {
  color: #15803d;
}

body.nebo-dreams-auth .nebo-field-status--error {
  color: #b91c1c;
}

body.nebo-dreams-auth .nebo-field-status--neutral {
  color: #64748b;
}

body.nebo-dreams-auth #submitBtn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

@media (max-height: 760px) {
  body.nebo-dreams-auth .nebo-auth-column {
    padding: 0.25rem 0;
  }

  body.nebo-dreams-auth .login-logo img {
    max-height: 1.5rem;
  }

  body.nebo-dreams-auth .login-wrapper .login-content.user-login .card-body {
    padding: 1rem 1.25rem !important;
  }

  body.nebo-dreams-auth .mb-3 {
    margin-bottom: 0.5rem !important;
  }

  body.nebo-dreams-auth .input-group .form-control,
  body.nebo-dreams-auth .input-group .form-select,
  body.nebo-dreams-auth .pass-group .form-control {
    height: 2.125rem;
    min-height: 2.125rem;
    font-size: 0.78125rem;
  }
}

.nebo-field-error {
  color: #f87171;
}

.nebo-field-help {
  color: #94a3b8;
}

.password-strength.weak {
  color: #f87171;
}

.password-strength.medium {
  color: var(--token-brand-primary-light);
}

.password-strength.strong {
  color: #4ade80;
}

/* Submit button loading spinner */
@keyframes nebo-auth-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.nebo-auth-spin {
  animation: nebo-auth-spin 1s linear infinite;
  display: inline-block;
}

/* OTP verification — see nebo-components.css (.nebo-otp) for shared boxed input styles */

.nebo-otp-timer.expired .badge {
  background: rgba(248, 113, 113, 0.12) !important;
  color: #f87171 !important;
}

.nebo-otp-timer.active .badge {
  background: var(--token-brand-primary-muted) !important;
  color: var(--token-brand-primary) !important;
}

.nebo-auth-email-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

body.nebo-dreams-auth .nebo-otp-help {
  font-size: 0.8125rem;
}

body.nebo-dreams-auth .nebo-otp-timer .badge {
  font-size: 0.6875rem;
  margin-bottom: 0.35rem !important;
}

@media (max-width: 575.98px) {
  body.nebo-dreams-auth .nebo-auth-column {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body.nebo-dreams-auth .login-wrapper .login-content.user-login .card-body {
    padding: 1rem !important;
  }

  body.nebo-dreams-auth .authentication-check .checkboxs {
    padding-left: 1.35rem !important;
  }
}

/* ─── Bordered auth dropdown (country, etc.) ─── */
.nebo-auth-dropdown {
  width: 100%;
}

.nebo-auth-dropdown__wrap {
  position: relative;
  width: 100%;
}

.nebo-auth-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0.35rem 2rem 0.35rem 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: left;
  background: #fff !important;
  border: 1px solid #e6eaed;
  border-radius: 0.35rem;
  color: #334155 !important;
  box-shadow: none !important;
  cursor: pointer;
  position: relative;
}

.nebo-auth-dropdown__trigger::after {
  content: '';
  position: absolute;
  right: 0.65rem;
  top: 50%;
  width: 0;
  height: 0;
  margin-left: 0;
  border-left: 0.28rem solid transparent;
  border-right: 0.28rem solid transparent;
  border-top: 0.32rem solid #64748b;
  transform: translateY(-25%);
  opacity: 1;
  pointer-events: none;
}

.nebo-auth-dropdown__wrap.is-open .nebo-auth-dropdown__trigger::after {
  transform: translateY(-25%) rotate(180deg);
}

.nebo-auth-dropdown__trigger.is-placeholder .nebo-auth-dropdown__label {
  color: #94a3b8;
}

.nebo-auth-dropdown__trigger:focus,
.nebo-auth-dropdown__trigger:focus-visible {
  border-color: rgba(16, 185, 129, 0.45);
  outline: none;
  box-shadow: none;
}

.nebo-auth-dropdown__wrap.is-open .nebo-auth-dropdown__trigger {
  border-color: rgba(16, 185, 129, 0.45);
}

.nebo-auth-dropdown__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #64748b;
  font-size: 0.875rem;
}

.nebo-auth-dropdown__label {
  flex: 1 1 auto;
  min-width: 0;
}

.nebo-auth-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  max-height: min(14rem, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12);
  padding: 0.35rem 0;
}

.nebo-auth-dropdown__menu[hidden] {
  display: none !important;
}

.nebo-auth-dropdown__option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 0.8125rem;
  padding: 0.45rem 0.75rem;
  color: #334155;
  white-space: normal;
  cursor: pointer;
}

.nebo-auth-dropdown__option:hover,
.nebo-auth-dropdown__option:focus,
.nebo-auth-dropdown__option:focus-visible,
.nebo-auth-dropdown__option.is-active {
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.nebo-auth-dropdown__option.is-placeholder {
  color: #94a3b8;
}

@media (max-width: 575.98px) {
  body.nebo-dreams-auth .nebo-auth-dropdown__menu {
    max-height: min(12rem, 45vh);
  }
}
