/* CSS for the signup page. */

.signup-page-wrapper {
  width: 100%;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* Add a gradient overlay from bottom to middle */
.signup-page-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 40%; /* The gradient will cover the bottom half of the screen */
  background: linear-gradient(to top, rgba(125, 10, 18, 0.9), transparent);
}

.signup-form-container {
  position: absolute;
  bottom: 40px;
  left: 40px;
  width: 600px;
  max-width: 90%;
  height: calc(100vh - 175px);
  overflow: auto;
  padding: 30px;
  padding-top: 50px;
  /* Adding a background for readability, assuming a dark theme */
  background-color: #020202;
  border-radius: 8px;
  color: white; /* Assuming text should be white on the dark background */
  /* Hide scrollbar for IE, Edge and Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  border: 1px solid rgba(255,255,255,0.16);
  opacity: 0;
  z-index: 1; /* Ensure form is above the gradient overlay */
  transition: opacity 0.5s ease-in-out;
}

.signup-form-container.visible {
  opacity: 1;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.signup-form-container::-webkit-scrollbar {
  display: none;
}

.form-header {
  display: flex;
  flex-direction: column;
  gap: 0px;
  align-items: center;
  justify-content: center;
}
.form-header * {
  margin: 0;
}
.form-title {
  font-family: var(--font-title);
  font-size: 48px;
  font-weight: 400;
  margin-bottom: 23px;
  width: 100%;
  text-align: center;
  line-height: 100%;
  max-width: 296px;
  text-transform: uppercase;
}

.form-title strong {
  font-weight: 400;
  color: var(--orange);
}

.form-description {
  font-family: var(--font-normal);
  font-size: 16px;
  font-weight: 500;
  line-height: 135%; /* Using 135% for readability, as 35% would be too small */
  margin-bottom: 40px;
  width: 100%;
  text-align: center;
  max-width: 404px;
  margin-top: 0;
}

.form-progress {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 252px;
  margin: 0 auto 30px;
  margin-top: 6px;
  margin-bottom: 44px;
}

.form-progress::before,
.form-progress::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  height: 4px;
  transform: translateY(-50%);
}

.form-progress::before {
  width: 100%;
  background-color: #222222;
  z-index: 1;
}

.form-progress::after {
  width: var(--progress-width, 0%);
  background-color: white;
  z-index: 2;
  transition: width 0.4s ease;
}

.progress-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plexes', sans-serif;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.4s ease, color 0.4s ease;
  background-color: #222222;
  color: white;
  position: relative;
  z-index: 3;
}

.progress-dot.is-active {
  background-color: white;
  color: black;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px; /* To mimic the gap from the profile form */
}

.form-group label {
  margin-bottom: 4px;
  font-family: 'Plexes', sans-serif;
}

/* Add asterisk for required fields */
.form-group:has(> .required) > label::after,
.form-check:has(> .required) > label::after {
  content: " *";
  color: var(--orange);
}

.form-group input,
.form-group select {
  border-radius: 8px;
  min-height: 41px;
  background-color: var(--input-background);
  border: 1px solid var(--input-border);
  color: var(--white);
  font-family: 'Plexes', sans-serif;
  font-size: 16px;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
  width: 100%;
}

/* Replicating custom select arrow from profile page */
.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('/sites/app-latam-gatorade-lat/themes/gatorade_latam_skin/img/icons/ico-chevron-down.svg');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 2.5rem; /* Make space for the arrow */
}

.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
  border-color: var(--orange);
}

.form-check.has-error label {
  color: var(--orange);
}

.error-message {
  color: var(--orange);
  font-size: 10px;
  display: block;
  min-height: 1.2em; /* Adjust min-height to prevent layout shifts with new font size */
  margin-top: 4px;
  font-family: var(--font-normal);
}

/* --- Custom Checkbox Styles --- */
.form-check {
  display: block;
  position: relative;
  padding-left: 28px; /* 16px checkbox + 12px gap */
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.form-check label {
  cursor: pointer;
  display: inline;
  font-family: var(--font-normal);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 2px;
  text-transform: none;
}

/* Style for links within checkbox labels */
.form-check label a {
  color: var(--orange);
  text-decoration: underline;
}

/* Hide the browser's default checkbox */
.form-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Create a custom checkbox */
.form-check label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px; /* Align with text */
  width: 16px;
  height: 16px;
  background: transparent;
  border: 2px solid white;
  border-radius: 2px;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

/* On check, change background and add icon */
.form-check input[type="checkbox"]:checked + label::before {
  background-color: white;
  border-color: white;
  background-image: url('/sites/app-latam-gatorade-lat/themes/gatorade_latam_skin/img/icons/ico-check-dark.svg');
  background-size: 8px 8px;
  background-repeat: no-repeat;
  background-position: center;
}

/* --- Form Pagination Styles --- */
.signup-form {
  position: relative;
  overflow: hidden;
  /* Animate height changes between pages */
  transition: height 0.4s ease-in-out;
}

.form-page {
  width: 100%;
  transition: transform 0.4s ease-in-out;
}

.form-page.active {
  /* Active page is in the document flow */
  position: relative;
  transform: translateX(0);
}

.form-page:not(.active) {
  /* Non-active pages are positioned absolutely to not affect layout */
  position: absolute;
  top: 0;
  left: 0;
}

/* State for pages that have been passed */
.form-page.page-left {
  transform: translateX(-100%);
}

.form-navigation {
  display: flex;
  justify-content: flex-start; /* Align buttons to the left */
  margin-top: 20px;
  gap: 16px;
}

.form-navigation button {
  padding: 12px 24px;
  border-radius: 100px;
  border: none;
  min-width: 120px;
  width: fit-content;
  font-family: 'Plexes', sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.3s;
  text-transform: uppercase;
  font-weight: bold;
}

.form-navigation button:hover {
  opacity: 0.85;
}

/* 'Atrás' and 'Salir' buttons */
#prev-btn,
#exit-btn {
  background-color: #333333;
  color: white;
}

/* 'Siguiente' and 'Registrarme' buttons */
#next-btn,
.form-navigation button[type="submit"] {
  background-color: white;
  color: black;
}

/* State for pages yet to come */
.form-page.page-right {
  transform: translateX(100%);
}

/* --- Success Overlay Styles --- */
.signup-success-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #020202; /* Same as form container */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
  z-index: 10; /* Above the form */
  padding: 30px;
  box-sizing: border-box;
  border-radius: 8px;
}

.signup-success-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.signup-success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.success-logo {
  width: 48px;
  height: auto;
  margin-bottom: 10px;
}

.success-title {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 400;
  line-height: 110%;
  text-transform: uppercase;
  margin: 0;
}

.success-title strong {
  color: var(--orange);
  font-weight: 400; /* Anton font only has 400 weight */
  display: block;
}

.success-description {
  font-family: var(--font-normal);
  font-size: 16px;
  max-width: 400px;
  line-height: 1.4;
  margin: 0;
}

.success-cta {
  padding: 12px 24px;
  border-radius: 100px;
  border: none;
  font-family: 'Plexes', sans-serif;
  font-size: 16px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: bold;
  background-color: white;
  color: black;
  text-decoration: none;
  margin-top: 10px;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  .signup-page-wrapper {
    height: auto;
    min-height: 100vh;
    padding: 30px 15px;
    padding-top: 115px;
    display: flex;
    align-items: flex-start; /* Align to top on mobile */
  }

  .signup-form-container {
    position: static;
    width: 100%;
    max-width: none;
    height: auto !important; /* Override JS height animation for fluid height */
    margin: 0;
    overflow: visible;
    padding: 24px;
    bottom: auto;
    left: auto;
  }

  .form-title {
    font-size: 32px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }
}