:root {
  --bg-color: #f0f0f3;
  --primary-color: #1abc9c; /* Lux green as requested */
  --primary-color-hover: #16a085; /* Slightly darker shade for hover */
  --hero-overlay: rgba(0, 0, 0, 0.35);
  --input-bg: #ecf0f1; /* Refined light blue-gray tone for inputs */
  --light-shadow: #ffffff;
  --dark-shadow: rgba(163, 177, 198, 0.6);
  --font-color: #2c3e50;
}

/* Global Reset and Base Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body, html {
  height: 100%;
  font-family: 'Poppins', sans-serif;
  background: var(--bg-color);
  font-size: 16px;
  color: var(--font-color);
}

/* Container splits the screen into hero & login sections */
.container {
  display: flex;
  height: 100vh;
}

/* Login Section Styling */
.login-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-box {
  background: var(--bg-color);
  padding: 40px 50px;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 8px 8px 16px var(--dark-shadow), -8px -8px 16px var(--light-shadow);
}

/* Hover lift removed to avoid animated movement */

h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--font-color);
}

/* Input Fields with a Light Blue-Gray Tone and Neumorphic Effect */
/* Neumorphic inputs: standalone text/tel/OTP — exclude composite sign-in phone + country search */
input[type="text"]:not(#loginPhoneInput):not(#loginCountrySearchInput),
input[type="tel"],
.otp-input {
  width: 100%;
  padding: 14px;
  margin-bottom: 25px;
  border: none;
  background: var(--input-bg);
  border-radius: 10px;
  box-shadow: inset 4px 4px 8px var(--dark-shadow), inset -4px -4px 8px var(--light-shadow);
  font-size: 1.1rem;
  transition: box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
}

input[type="text"]:not(#loginPhoneInput):not(#loginCountrySearchInput)::placeholder,
input[type="tel"]::placeholder {
  color: #7b8a97;
  opacity: 0.95;
}

input[type="text"]:not(#loginPhoneInput):not(#loginCountrySearchInput):focus,
input[type="tel"]:focus,
.otp-input:focus {
  outline: none;
  box-shadow: inset 2px 2px 4px var(--dark-shadow), inset -2px -2px 4px var(--light-shadow);
}

/* Embossed 3D Button Styling with Lux Green Color */
button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--primary-color), var(--primary-color-hover));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 7px 7px 14px var(--dark-shadow), -7px -7px 14px var(--light-shadow);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  background: linear-gradient(145deg, var(--primary-color-hover), var(--primary-color));
  box-shadow: 5px 5px 10px var(--dark-shadow), -5px -5px 10px var(--light-shadow);
}

button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* OTP Form Styling */
.otp-message {
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.otp-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 25px;
}

.otp-container .otp-input {
  width: 60px;
  margin-bottom: 0;
  text-align: center;
  font-size: 1.3rem;
}

.resend-link {
  display: block;
  text-align: center;
  margin-bottom: 25px;
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .hero, .login-container {
    flex: none;
    width: 100%;
  }
  .hero {
    height: 40vh;
  }
}

/* Reduce hero height further on mobile so form moves up */
@media (max-width: 576px) {
  /* Preserve full-viewport container so hero stays visible */
  .container {
    height: 100vh !important;
    flex-direction: column !important;
  }

  .hero {
    /* Fix flex so it doesn’t collapse, and set an explicit mobile height */
    flex: none !important;
    height: 45vh !important;      /* adjust this percentage as needed */
    min-height: 150px !important; /* ensures it never disappears */
    background-size: cover !important;
    background-position: top center !important;
  }

  .login-container {
    /* Pull the login box up into the freed space */
    position: relative;
    top: 5vh;                   /* tweak this to control vertical shift */
  }
}

/* Center the loader GIF */
#otp-loader img {
  display: inline-block;
  vertical-align: middle;
}

/* Respect user motion preference */
@media (prefers-reduced-motion: reduce) {
  .login-box,
  button {
    transition: none;
  }
  .login-box:hover,
  button:hover {
    transform: none;
  }
}



/* Password field (neumorphic, matches text inputs) */

.login-box input[type="password"] {
  display: block;
  width: 100%;
  padding: 14px;
  margin-bottom: 25px;
  border: 0;
  border-radius: 10px;
  background: var(--input-bg);
  font-size: 1.1rem;
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
  box-shadow: inset 4px 4px 8px var(--dark-shadow), inset -4px -4px 8px var(--light-shadow);
  transition: box-shadow 0.2s ease;
}

.login-box input[type="password"]:focus {
  outline: 0;
  box-shadow: inset 2px 2px 4px var(--dark-shadow), inset -2px -2px 4px var(--light-shadow);
}

.login-box input[type="password"]::placeholder {
  color: #7b8a97;
  opacity: 0.95;
}

/* Keep neumorphic look when browser autofills */
.login-box input[type="password"]:-webkit-autofill {
  -webkit-text-fill-color: var(--font-color);
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset, inset 4px 4px 8px var(--dark-shadow), inset -4px -4px 8px var(--light-shadow);
}

.reset-link {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.95rem;
}

/* Phone + country code — one recessed shell (same depth as password input) */
.login-phone-field {
  margin-bottom: 25px;
}

.login-box .phone-input-wrap {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-height: 52px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  overflow: visible;
  background: var(--input-bg);
  background-clip: padding-box;
  box-shadow: inset 4px 4px 8px var(--dark-shadow), inset -4px -4px 8px var(--light-shadow);
  transition: box-shadow 0.2s ease;
}

.login-box .phone-input-wrap:focus-within {
  box-shadow: inset 2px 2px 4px var(--dark-shadow), inset -2px -2px 4px var(--light-shadow);
}

.login-box .phone-input-wrap #loginPhoneInput,
.login-box .phone-input-wrap .login-phone-national {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 52px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  background-color: transparent;
  padding: 14px;
  font-size: 1.1rem;
  color: var(--font-color);
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
  color-scheme: light;
}

.login-box .phone-input-wrap #loginPhoneInput:focus,
.login-box .phone-input-wrap .login-phone-national:focus,
.login-box .phone-input-wrap #loginPhoneInput[readonly],
.login-box .phone-input-wrap .login-phone-national[readonly] {
  outline: none;
  box-shadow: none;
  background: transparent;
  cursor: text;
}

.login-box .phone-input-wrap #loginPhoneInput::placeholder {
  color: #7b8a97;
  opacity: 0.95;
}

.login-box .phone-input-wrap #loginPhoneInput:-webkit-autofill,
.login-box .phone-input-wrap #loginPhoneInput:-webkit-autofill:hover,
.login-box .phone-input-wrap #loginPhoneInput:-webkit-autofill:focus,
.login-box .phone-input-wrap #loginPhoneInput:-webkit-autofill:active {
  -webkit-text-fill-color: var(--font-color);
  caret-color: var(--font-color);
  color: var(--font-color);
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset, inset 4px 4px 8px var(--dark-shadow), inset -4px -4px 8px var(--light-shadow);
  box-shadow: none;
  background: transparent;
  background-color: transparent;
  transition: background-color 5000s ease-in-out 0s;
}

.login-box .country-picker {
  position: relative;
  z-index: 45;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  background: transparent;
  border-right: 1px solid rgba(44, 62, 80, 0.08);
  border-radius: 0;
}

.login-box button.country-picker-toggle,
.login-box .country-picker-toggle {
  position: relative;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  height: 100%;
  min-height: 52px;
  border: 0;
  padding: 10px 8px;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 0;
  line-height: 0;
  font-weight: 400;
  color: var(--font-color);
  background: transparent;
  cursor: pointer;
  border-radius: 10px 0 0 10px;
  box-shadow: none;
}

.login-box button.country-picker-toggle:hover,
.login-box button.country-picker-toggle:focus,
.login-box .country-picker-toggle:hover,
.login-box .country-picker-toggle:focus {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.login-box .country-picker-toggle:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}

.login-box .country-flag-img {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(44, 62, 80, 0.12);
  flex-shrink: 0;
}

.login-box .country-flag-img--toggle {
  width: 32px;
  height: 22px;
  border-radius: 3px;
  display: block;
}


.login-box .country-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 220px;
  background: var(--bg-color);
  border-radius: 10px;
  box-shadow: 8px 8px 16px var(--dark-shadow), -4px -4px 10px var(--light-shadow);
  z-index: 60;
  padding: 0.45rem;
  display: none;
}

.login-box .country-picker.open .country-picker-menu {
  display: block;
}

.login-box .country-search-input {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.52rem;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  color: var(--font-color);
  background: var(--input-bg);
  box-shadow: inset 2px 2px 4px var(--dark-shadow), inset -2px -2px 4px var(--light-shadow);
}

.login-box .country-search-input:focus {
  outline: none;
  box-shadow: inset 1px 1px 3px var(--dark-shadow), inset -1px -1px 3px var(--light-shadow);
}

.login-box .country-options-list {
  max-height: 212px;
  overflow-y: auto;
}

.login-box .country-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--font-color);
  padding: 0.48rem 0.56rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  font-size: 0.86rem;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: none;
}

.login-box .country-option-label {
  flex: 1;
  min-width: 0;
}

.login-box .country-option-dial {
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  color: #5a6b7a;
  flex-shrink: 0;
}

.login-box .country-option:hover {
  background: rgba(26, 188, 156, 0.08);
  transform: none;
  box-shadow: none;
}
