/* Base typography */
* {
  font-family: Raleway, sans-serif;
  font-weight: 400;
  font-size: 16px;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #ffffff, #9fd5ff);
  background-size: cover;
  background-position: center;
  font-family: tahoma;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 200px 0;
}

@media (max-width: 768px) {
  body {
    padding: 10px 0;
  }
}

/* Container */
.signup {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: nowrap;
  width: 800px;
  max-width: 95vw;
  background: linear-gradient(90deg, #ffffff, #379deb);
  border-radius: 35px;
  box-shadow: 0 0 24px #185a8b;
  overflow: visible;
  max-height: 600px;
}

/* Tablet and below - stack vertically */
@media (max-width: 850px) {
  .signup {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    max-height: none;
    border-radius: 20px;
    margin: 0 10px;
  }
}

/* Phone - smaller border radius, less padding */
@media (max-width: 480px) {
  .signup {
    border-radius: 15px;
    margin: 0 5px;
    box-shadow: 0 0 15px #185a8b;
  }
}

/* Left panel */
.signup-connect,
.signup-classic {
  width: 60%;
  padding: 60px 50px;
  border-radius: 35px;
}

.signup-connect {
  background: #a2cef0;
  color: #000;
}

.hero {
  color: black;
  font-family: Inter, sans-serif;
  font-size: 20px;
  font-weight: bold;
}
.blurb {
  font-size: 20px;
}
.bullets {
  font-family: Inter, sans-serif;
  font-size: 20px;
}

/* Mobile adjustments for left panel */
@media (max-width: 850px) {
  .signup-connect,
  .signup-classic {
    width: 100%;
    padding: 30px 25px;
    border-radius: 20px 20px 0 0;
  }

  .hero {
    font-size: 18px;
  }

  .blurb {
    font-size: 16px;
  }

  .bullets {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .signup-connect,
  .signup-classic {
    padding: 20px 15px;
    border-radius: 15px 15px 0 0;
  }

  .hero {
    font-size: 16px;
    margin: 10px 0;
  }

  .blurb {
    font-size: 14px;
    margin: 8px 0;
  }

  .bullets {
    font-size: 14px;
    margin: 10px 0;
  }

  .bullets li {
    padding: 5px 0;
  }
}

/* Right panel (form) */
.login {
  width: 320px;
  padding: 30px;
  padding-top: 60px;
  padding-left: 50px;
}

/* Mobile adjustments for form panel */
@media (max-width: 850px) {
  .login {
    width: 100%;
    padding: 30px 25px;
    padding-top: 30px;
  }
}

@media (max-width: 480px) {
  .login {
    padding: 20px 15px;
    padding-top: 20px;
  }
}

.login__field {
  padding: 20px 0;
  position: relative;
}

.login__icon {
  position: absolute;
  left: 0;
  top: 30px; /* Field padding (20px) + input padding-top (10px) = 30px to align with input text */
  color: #7a7a7a;
  font-size: 18px;
  z-index: 1;
  pointer-events: none;
  transition: color 0.3s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: -1px; /* Fine-tune vertical alignment with text */
}

.login__field:focus-within .login__icon {
  color: #28229b;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #00000000 inset !important;
}

.login__input {
  border: none;
  border-bottom: 2px solid #d1d1d4;
  background: none;
  padding: 10px;
  padding-left: 24px; /* Space for icon (20px) + small gap */
  font-weight: 700;
  width: 100%;
  transition: border-bottom-color 0.3s ease, background-color 0.3s ease;
  color: #000;
  font-size: 15px; /* Prevents zoom on iOS */
  box-sizing: border-box;
}

.login__input::placeholder {
  color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
}

.login__input:focus::placeholder {
  opacity: 0.6;
}

.login__input:active,
.login__input:focus,
.login__input:hover {
  outline: none;
  border-bottom-color: #28229b;
}

.login__input:focus {
  border-bottom-width: 3px;
  padding-bottom: 9px; /* Compensate for thicker border */
}

.login__input:read-only,
.login__input[readonly] {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.7;
}

.login__input.forced,
.login__input[data-forced="1"] {
  background-color: #e8f4fd;
  border-bottom-color: #379deb;
}

/* Mobile - full width inputs, larger touch targets */
@media (max-width: 480px) {
  .login__input {
    width: 100%;
    padding: 12px;
    padding-left: 24px;
    font-size: 16px; /* Prevents iOS zoom */
    min-height: 44px; /* Touch-friendly */
  }
}

.login__submit {
  background: #9dc1dd;
  font-size: 14px;
  margin-top: 30px;
  padding: 16px 30px;
  border-radius: 26px;
  border: 1px solid #247dc4;
  text-transform: uppercase;
  font-weight: 700;
  display: flex;
  align-items: center;
  width: 100%;
  color: #544fb9;
  box-shadow: 0px 2px 2px #5c5696;
  cursor: pointer;
  transition: all 0.3s ease;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login__submit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.login__submit:hover::before {
  width: 300px;
  height: 300px;
}

.login__submit:hover {
  background: #7ba8c9;
  border-color: #1e6ba0;
  box-shadow: 0px 4px 8px rgba(92, 86, 150, 0.4);
  transform: translateY(-2px);
}

.login__submit:active {
  transform: translateY(0);
  box-shadow: 0px 1px 2px #5c5696;
}

.login__submit:focus {
  outline: 3px solid rgba(40, 34, 155, 0.3);
  outline-offset: 2px;
}

.login__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login__submit:disabled:hover {
  background: #9dc1dd;
  transform: none;
}

/* Error popups */
.error-popup {
  position: absolute;
  display: none;
  background-color: #ff4f4f;
  color: #fff;
  border-radius: 5px;
  padding: 10px;
  font-size: 14px;
  width: auto;
  max-width: 300px;
  z-index: 100;
  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.25);
  margin-left: 10px;
  margin-top: 10px;
  white-space: normal;
  word-wrap: break-word;
  opacity: 0;
  transform: translateY(-5px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: shake 0.5s ease;
}

.error-popup.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.error-popup::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 15px;
  border-width: 0 10px 10px 10px;
  border-style: solid;
  border-color: transparent transparent #ff4f4f transparent;
  filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1));
}

.error-popup a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

.error-popup a:hover {
  text-decoration: none;
}

/* Mobile error popup adjustments */
@media (max-width: 480px) {
  .error-popup {
    position: relative;
    margin-left: 0;
    margin-top: 5px;
    max-width: 100%;
    font-size: 12px;
    padding: 8px;
  }

  .error-popup::before {
    display: none; /* Hide arrow on mobile */
  }
}

/* Password eye icon */
.field-icon {
  float: right;
  margin-right: 10px;
  margin-top: -25px;
  position: relative;
  z-index: 2;
  cursor: pointer;
  min-width: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a7a7a;
  transition: color 0.2s ease, transform 0.2s ease;
}

.field-icon:hover {
  color: #28229b;
  transform: scale(1.1);
}

.field-icon:active {
  transform: scale(0.95);
}

@media (max-width: 480px) {
  .field-icon {
    margin-top: -30px;
    margin-right: 5px;
    min-width: 32px; /* Larger touch target */
    min-height: 32px;
  }
}

/* Modal */
#requestModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 0;
  z-index: 9999;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#requestModal[style*="display: flex"],
#requestModal[style*="display:flex"] {
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

#requestModal .card {
  background: #fff;
  padding: 18px 20px;
  border-radius: 10px;
  width: 420px;
  max-width: 92vw;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
  margin: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

#requestModal[style*="display: flex"] .card,
#requestModal[style*="display:flex"] .card {
  transform: scale(1);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

#requestModal .card h4 {
  margin: 0 0 10px;
}

#requestModal .login__input {
  width: 100%;
  margin: 6px 0;
}

#request_msg {
  font-size: 14px;
}

/* Mobile modal */
@media (max-width: 480px) {
  #requestModal {
    padding: 20px 10px;
  }

  #requestModal .card {
    width: 100%;
    max-width: 100%;
    padding: 15px;
    border-radius: 8px;
    margin: 0;
  }

  #requestModal .card h4 {
    font-size: 18px;
  }
}

.hint {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.inline-check {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}

.inline-check:hover {
  opacity: 0.8;
}

.inline-check input[type="checkbox"] {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.inline-check input[type="checkbox"]:hover {
  transform: scale(1.1);
}

/* Stepper */
#stepper {
  margin-bottom: 10px;
}

#stepDots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

#stepDots .dot {
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  background: #9dc1dd;
  color: #544fb9;
  font-weight: 700;
  box-shadow: 0px 2px 2px #5c5696;
  flex-shrink: 0;
  transition: all 0.3s ease;
  cursor: default;
}

#stepDots .dot.active {
  outline: 2px solid #247dc4;
  background: #7ba8c9;
  transform: scale(1.1);
  box-shadow: 0px 3px 6px rgba(36, 125, 196, 0.4);
}

#stepDots .dot:not(.active):hover {
  background: #b5d4e8;
  transform: scale(1.05);
}

/* Mobile stepper */
@media (max-width: 480px) {
  #stepper {
    margin-bottom: 15px;
  }

  #stepDots {
    gap: 6px;
  }

  #stepDots .dot {
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 14px;
  }
}

/* Steps */
.step {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.step.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Step nav */
.step-nav {
  margin-top: 20px;
}

.step-nav .login__submit {
  width: auto;
  min-width: 140px;
}

.step-nav.row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

/* Mobile step nav */
@media (max-width: 480px) {
  .step-nav {
    margin-top: 15px;
    flex-direction: column;
    gap: 10px;
  }

  .step-nav.row {
    flex-direction: row;
    justify-content: space-between;
  }

  .step-nav .login__submit {
    min-width: 0;
    flex: 1;
    min-height: 44px; /* Touch-friendly */
  }
}

/* Additional mobile tweaks */
@media (max-width: 480px) {
  .login__field {
    padding: 15px 0;
  }

  .hint {
    font-size: 11px;
    margin-top: 4px;
  }

  .inline-check {
    font-size: 12px;
  }

  .optins {
    margin-top: 10px;
  }

  .optins label {
    font-size: 13px;
  }
}

.optins {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  transition: background-color 0.2s ease;
  border-radius: 4px;
}

.optins:hover {
  background-color: rgba(157, 193, 221, 0.1);
}

.optins label {
  cursor: pointer;
  user-select: none;
  flex: 1;
}

.optins input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.optins input[type="checkbox"]:hover {
  transform: scale(1.1);
}
/* === Smaller buttons === */
.login__submit {
  font-size: 12px; /* was 14px */
  padding: 8px 14px; /* was 16px 30px */
  border-radius: 18px; /* was 26px */
  box-shadow: 0 1px 1px #5c5696; /* subtler */
  gap: 6px; /* tighter icon spacing if flex */
  min-height: 34px;
  width: auto; /* don't force full width */
}

.step-nav .login__submit {
  min-width: 110px; /* smaller nav buttons */
}

/* Make the submit in step 3 not full-width either */
.step[data-step="2"] .login__submit[type="submit"] {
  width: auto;
}

/* Icon a touch smaller */
.button .button__icon,
.login__submit .button__icon,
.step-nav .button__icon {
  font-size: 12px; /* was inherited larger */
}

/* Even smaller on phones */
@media (max-width: 480px) {
  .login__submit {
    font-size: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    min-height: 44px; /* Touch-friendly minimum */
    width: 100%;
  }

  .step-nav .login__submit {
    min-width: 0;
    flex: 1;
  }

  /* Make sure buttons are touch-friendly */
  .button,
  .login__submit {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid #28229b;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Loading state (if needed) */
.login__submit.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.login__submit.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(84, 79, 185, 0.3);
  border-radius: 50%;
  border-top-color: #544fb9;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Better contrast for links in error messages */
.error-popup a:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Prevent text selection on buttons */
.login__submit,
.button {
  user-select: none;
  -webkit-user-select: none;
}

/* Improved placeholder styling */
.login__input::placeholder {
  transition: opacity 0.3s ease;
}

.login__input:focus::placeholder {
  opacity: 0.4;
}
