body,
html {
  height: 100%;
}

main {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 0px 50px;
  background-image: url(../Resources/login/login-bg.jpg);
  background-size: cover;
  background-repeat: no-repeat;
}

#login-logo-ajm {
  width: 80px;
}

#login-logo-ruta {
  width: 150px;
  margin-bottom: 30px;
}

#login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#login-form input,
#login-form select {
  width: -webkit-fill-available;
  padding: 12px;
  color: black;
  background-color: white;
  border: 0;
  border-radius: 10px;
  box-shadow: 0px 1px 4px 0px #00000040;
  padding-left: 42px; /* Space for the icon */
  box-sizing: border-box;
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 24px 24px;
}

#input-email {
  background-image: url("../Resources/login/icono_email.png");
}

#input-code {
  background-image: url("../Resources/login/icono_ruta.png");
}

.language-selector {
  position: relative;
  width: 150px;
  margin: 10px 0;
  z-index: 0;
}
.language-dropdown {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.language-selected {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.language-flag {
  width: 24px;
  margin-right: 8px;
  object-fit: cover;
  border-radius: 2px;
}
.language-text {
  flex-grow: 1;
  color: #333;
}
.language-arrow {
  margin-left: 8px;
  font-size: 0.8em;
  color: #666;
}
.language-dropdown:focus + .language-selected {
  outline: 2px solid #4d90fe;
}

button {
  width: fit-content;
  padding: 10px 32px;
  font-size: 16px;
  font-weight: 500;
  background: var(--main-color);
  color: white;
  border: 0;
  border-radius: 100px;
  box-shadow: 0px 1px 4px 0px #00000040;
  margin-top: 30px;
}

.error-message {
  width: 100%;
  font-size: 14px;
  font-style: italic;
  font-weight: 600;
  color: red;
  margin-bottom: 15px;
  margin-top: 5px;
}

#login-logo-identify {
  width: 129px;
}

#login-footer {
  display: flex;
  align-items: center;
  gap: 25px;
}

.login-footer-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-footer-column p {
  font-size: 14px;
  font-weight: 400;
  color: white;
  margin-bottom: 10px;
}

.login-footer-column img {
  width: 80px;
}

/*** SignUp ***/
#signup-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: none;
  align-content: center;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.4);
  padding: 0px 15px;
}

#signup-back {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 35px;
  height: 35px;
}

.signup-dialog {
  max-height: 90%;
  overflow: auto;
  display: none;
  padding: 30px 15px 30px 15px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  position: absolute;
  left: 20px;
  right: 20px;
}

.signup-dialog > input,
.signup-dialog > select {
  width: -webkit-fill-available;
  height: 46px;
  padding-left: 48px;
  border-radius: 10px;
  box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.25);
  border: 0;
  margin-bottom: 14px;
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 24px 24px;
}

.signup-dialog-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.signup-dialog-subtitle {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 16px;
  font-style: italic;
}

.signup-dialog-label {
  font-size: 14px;
  margin-bottom: 6px;
}

.signup-dialog-button {
  width: 100%;
  margin-top: 15px;
}

#signup-name-input {
  background-image: url("../Resources/login/ic_text.png");
}

#signup-phone-input {
  background-image: url("../Resources/login/ic_phone.png");
}

#signup-age-input {
  background-image: url("../Resources/login/ic_age.png");
}

#signup-course-input {
  background-image: url("../Resources/login/ic_course.png");
}

#signup-companion-options {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-bottom: 40px;
}

.signup-companion-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 10px;
  padding: 9px 6px 9px 6px;
  box-shadow: 0px 1px 4px 0px #00000040;
  flex: 1;
  border: 2px solid transparent;
}

.signup-companion-option-selected {
  border: 2px solid var(--main-color);
}

.signup-companion-option img {
  height: 40px;
  margin-bottom: 4px;
}

.signup-companion-option p {
  text-align: center;
  font-size: 14px;
}

#signup-label-terms {
  margin-bottom: 10px;
}

/* Media query for screens more than 1000px wide */
@media screen and (min-width: 1001px) {
  /* Login */
  #login-form {
    width: 40%;
  }

  /* Route Index */
  #route-header {
    width: 40%;
    margin: auto;
  }

  /* Dialogs */
  .dialog-container > div {
    width: 40% !important;
    margin: auto !important;
  }
}

/* Language Selector */
.language-selector {
  margin: 0 0 10px 0;
  color: #1f2937;
}

.person-section .signup-dialog-label {
  font-size: 13px;
  color: #374151;
  margin: 10px 0 6px 0;
}

.person-section input,
.person-section select {
  width: -webkit-fill-available;
  /* height: 44px; */
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.person-section input:focus,
.person-section select:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 0 3px rgba(39, 109, 233, 0.15);
}

.person-section hr {
  border: 0;
  border-top: 1px solid #f1f5f9;
}

/* Number of people selector (step 1) */
#number-of-people.form-control {
  width: 100%;
  height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

#number-of-people.form-control:focus {
  border-color: var(--main-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(39, 109, 233, 0.15);
}

/* Navigation buttons */
.form-navigation {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.signup-dialog-button {
  background: var(--main-color);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 12px 16px;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.05s ease, filter 0.15s ease;
}

.signup-dialog-button:hover {
  filter: brightness(0.98);
}

.signup-dialog-button:active {
  transform: translateY(1px);
}

/* Secondary style for previous button if needed */
#prev-button.signup-dialog-button {
  background: #f3f4f6;
  color: #111827;
}

#prev-button.signup-dialog-button:hover {
  filter: brightness(0.97);
}

/* Terms label and checkbox */
#terms-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 12px;
  color: #374151;
}

#terms-label a {
  color: var(--main-color);
  font-weight: 600;
  text-decoration: underline;
}

#signup-terms {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
