/**
 * Ranax marketing / auth UI (from Website/assets/css/style.css).
 * Loaded after app style.css so login + country dropdown + OTP match the static site.
 */

:root {
  --themeColor: #ba427d;
  --navBgColor: #f9fafb;
  --textcolor: #111827;
}

.themeColor {
  color: var(--themeColor) !important;
}

body.auth-website-page {
  overflow-x: hidden;
  overflow-y: auto !important;
  min-height: 100vh;
  height: auto !important;
}

.password-wrapper {
  position: relative;
}

/* ---------------- LOGIN PAGE ---------------- */
.login-wrapper {
  background: #fff6fb;
  overflow: hidden;
}

.login-bg-vector-left {
  left: -70px;
  transform: translateY(-50%);
  z-index: 1;
  bottom: 0;
  pointer-events: none;
}

.login-bg-vector-right {
  right: -70px;
  transform: translateY(-50%);
  z-index: 1;
  top: 100px;
  pointer-events: none;
}

.login-card {
  background: var(--whiteColor);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(237, 111, 173, 0.15);
  border: 1px solid #f3f4f6;
}

.login-logo img {
  width: 170px;
  height: auto;
}

.login-input {
  padding: 14px 18px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  color: var(--textcolor);
  transition: all 0.3s ease;
  background: #f9fafb;
}

.login-input:focus {
  border-color: var(--themeColor);
  box-shadow: 0 0 0 4px rgba(237, 111, 173, 0.1);
  background: var(--whiteColor);
  outline: none;
}

.login-input::placeholder {
  color: #9ca3af;
}

.password-toggle-btn,
.js-password-toggle {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  padding: 4px;
  transition: all 0.3s ease;
}

.password-toggle-btn img,
.js-password-toggle img {
  width: 20px;
  height: 20px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.password-toggle-btn:hover img,
.js-password-toggle:hover img {
  opacity: 0.8;
}

.form-check-input:checked {
  background-color: var(--themeColor);
  border-color: var(--themeColor);
}

.form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(237, 111, 173, 0.1);
  border-color: var(--themeColor);
}

.cursor-pointer {
  cursor: pointer;
}

.forgot-password-link {
  text-decoration: none;
  transition: all 0.3s ease;
}

.forgot-password-link:hover {
  opacity: 0.8;
}

.login-btn {
  position: relative;
  background: linear-gradient(135deg, var(--themeColor) 0%, #f48fb1 50%, var(--themeColor) 100%);
  background-size: 200% 200%;
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 600;
  animation: loginGradientShift 3s ease infinite, loginPulse 2s ease-in-out infinite;
  box-shadow: 0 8px 20px rgba(237, 111, 173, 0.35), 0 0 0 0 rgba(237, 111, 173, 0.45);
  transition: all 0.3s ease;
}

@keyframes loginGradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes loginPulse {
  0%,
  100% {
    box-shadow: 0 8px 20px rgba(237, 111, 173, 0.35), 0 0 0 0 rgba(237, 111, 173, 0.45);
  }

  50% {
    box-shadow: 0 12px 28px rgba(237, 111, 173, 0.55), 0 0 0 10px rgba(237, 111, 173, 0);
  }
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 120%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: loginShine 2.2s ease-in-out infinite;
}

@keyframes loginShine {
  0% {
    left: -120%;
  }

  50%,
  100% {
    left: 120%;
  }
}

.login-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 35px rgba(237, 111, 173, 0.6), 0 0 0 0 rgba(237, 111, 173, 0);
  animation: none;
  background-position: 100% 50%;
  color: var(--whiteColor);
}

.login-btn:active {
  transform: translateY(-1px) scale(0.97);
}

.divider-line {
  height: 1px;
  background: #e5e7eb;
}

.divider-text {
  white-space: nowrap;
}

.google-btn {
  background: var(--whiteColor);
  border: 1px solid var(--themeColor);
  border-radius: 12px;
  padding: 14px 24px;
  color: var(--themeColor);
  transition: all 0.3s ease;
}

.google-btn img {
  width: 20px;
  height: 20px;
}

.google-btn:hover:not(:disabled) {
  border-color: var(--themeColor);
  background: rgba(237, 111, 173, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(237, 111, 173, 0.15);
}

.google-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-form {
  position: relative;
  z-index: 10;
}

.circle-points {
  background-color: #f3f4f6;
  border-radius: 50%;
  height: 12px;
  width: 12px;
}

/* Country code dropdown */
.flag-img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.country-code-wrapper {
  position: relative;
  flex: 0 0 auto;
  width: 110px;
}

.country-code-display {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
}

.country-code-display:hover {
  border-color: var(--themeColor);
}

.country-code-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  background: var(--whiteColor);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 4px;
  display: none;
}

.country-code-dropdown.show {
  display: block;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.country-option:hover {
  background-color: #f0f0f0;
}

.dropdown-arrow {
  transition: transform 0.3s ease;
  font-size: 12px;
}

.dropdown-arrow.open {
  transform: rotate(180deg);
}

/* OTP */
.otp-container {
  max-width: 100%;
}

.otp-input {
  width: clamp(2.5rem, 4vw + 1rem, 4rem);
  height: clamp(2.5rem, 4vw + 1rem, 4rem);
  border: 1px solid #707070;
  border-radius: 12px;
  background: #f9fafb;
  transition: all 0.3s ease;
  outline: none;
}

.otp-input:focus {
  border-color: var(--themeColor);
  background: var(--whiteColor);
  box-shadow: 0 0 0 4px rgba(237, 111, 173, 0.1);
}

.otp-input:not(:placeholder-shown) {
  background: var(--whiteColor);
}

/* Required marker + server validation (message under field, not red input borders) */
.req-asterisk {
  color: #dc2626;
  font-weight: 600;
  margin-left: 2px;
}

/* Checkbox / inline labels: star before text */
.req-asterisk.req-asterisk--lead {
  margin-left: 0;
  margin-right: 6px;
}

.form-field-error {
  color: #b91c1c;
  line-height: 1.35;
}

.btn-send-otp {
  width: 100%;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--themeColor);
  background: var(--whiteColor);
  border: 1.5px solid var(--themeColor);
  transition: all 0.2s ease;
}

.btn-send-otp:hover:not(:disabled) {
  background: rgba(237, 111, 173, 0.08);
}

.btn-send-otp:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-verify-otp {
  width: 100%;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--whiteColor);
  background: var(--themeColor);
  border: none;
  transition: opacity 0.2s ease;
}

.btn-verify-otp:hover:not(:disabled) {
  opacity: 0.92;
}

.btn-verify-otp:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.register-otp-section {
  display: none;
}

.register-otp-section.is-visible {
  display: block;
}

#register-otp-timer {
  min-height: 1.25rem;
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
  transform: none;
  box-shadow: 0 6px 16px rgba(237, 111, 173, 0.2);
}

.login-btn:disabled::before {
  display: none;
}

.register-otp-success-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  margin-top: 4px;
}

.register-otp-success-banner.d-none {
  display: none !important;
}

.register-otp-success-icon {
  flex-shrink: 0;
  line-height: 0;
}

.register-submit-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(17, 24, 39, 0.45);
}

.register-submit-overlay.d-none {
  display: none !important;
}

.register-submit-overlay-card {
  max-width: 360px;
  background: var(--whiteColor);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Neutralise Bootstrap invalid styling on auth marketing inputs */
body.auth-website-page .form-control.is-invalid,
body.auth-website-page .form-check-input.is-invalid {
  border-color: #e5e7eb;
  background-color: #f9fafb;
  box-shadow: none;
}

body.auth-website-page .form-control.login-input.is-invalid:focus,
body.auth-website-page .country-code-display.is-invalid:focus {
  border-color: var(--themeColor);
  box-shadow: 0 0 0 4px rgba(237, 111, 173, 0.1);
  background: var(--whiteColor);
}
