/* ====== Layout ====== */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-gray-50);
}

.auth-content-limit {
  max-width: 1440px;
  margin: 0 auto;
}

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
  width: 100%;
}

.auth-signup-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.auth-signup-group__text {
  font-size: 1.25rem;
}

/* ====== Header ====== */
.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 3.5rem;
  width: 100%;
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .auth-header {
    padding: 1.5rem 1rem;
  }
}

.auth-header__logo {
  width: 4rem;
}

@media (min-width: 768px) {
  .auth-header__logo {
    width: 6.25rem;
    height: auto;
  }
}

/* ====== Auth Card & Slider ====== */
.auth-card {
  background-color: var(--color-white);
  border-radius: 1.875rem;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 37.125rem;
  height: auto;
  display: flex;
  flex-direction: column;
  align-self: center;
  overflow: hidden;
  position: relative;
  transition:
    transform 0.6s ease-in-out,
    height 0.5s ease-in-out;
  opacity: 0;
  will-change: height, transform, opacity;
}

@media (max-width: 767px) {
  .auth-card {
    min-height: 450px;
  }
}

.auth-card__slider {
  display: flex;
  width: 200%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  align-items: flex-start;
}

.slide-to-signup {
  transform: translateX(-50%);
}

.auth-form-wrapper {
  width: 50%;
  padding: 2rem 5.2rem 2rem 5.2rem;
  box-sizing: border-box;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .auth-form-wrapper {
    padding: 2rem clamp(1rem, 5vw, 4rem) 2rem clamp(1rem, 5vw, 4rem);
  }
}

.auth-card.ready {
  opacity: 1;
  transition:
    opacity 0.2s ease,
    transform 0.6s ease-in-out,
    height 0.5s ease-in-out;
}

/* ====== Form Elements ====== */
.auth-card__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
  width: 100%;
}

.auth-card__title {
  font-size: var(--font-size-6xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-black);
}

@media (max-width: 767px) {
  .auth-card__title {
    font-size: var(--font-size-5xl);
  }
}

.auth-card__arrow {
  position: absolute;
  left: -2rem;
  top: 30%;
  width: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

@media (max-width: 767px) {
  .auth-card__arrow {
    left: 0;
  }
}

.auth-card__arrow:hover {
  transform: scale(1.1);
}

.auth-card__form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-card__input-group {
  display: flex;
  align-items: center;
  background-color: white;
  border: 0.0625rem solid var(--color-gray-200);
  border-radius: 0.625rem;
  padding: 0 1.3125rem;
  transition: border-color 0.2s ease;
}

.auth-card__input-group:focus-within {
  border-color: var(--color-accent);
}

.auth-card__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 0.75rem 0;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-primary);
  background-color: transparent;
}

.auth-card__input:-webkit-autofill,
.auth-card__input:-webkit-autofill:hover,
.auth-card__input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px white inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

.auth-card__input,
.auth-card__input-group,
.auth-card__input:focus,
.auth-card__input-group:focus-within {
  outline: none !important;
  box-shadow: none;
}

.auth-card__input::placeholder {
  color: var(--color-gray-200);
  font-size: 1rem;
}

.auth-card__icon {
  width: 1.25rem;
  height: auto;
  margin-left: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
}

.auth-card__input-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.error-placeholder {
  color: var(--color-error);
  font-size: 0.875rem;
  height: 1rem;
  visibility: hidden;
  padding-left: 0.5rem;
}

.error-placeholder.show {
  visibility: visible;
}

.auth-card__input-group--error {
  border-color: var(--color-error) !important;
}

/* ====== Checkbox ====== */
.auth-card__checkbox-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.auth-card__checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  line-height: 1;
}

.auth-card__checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.875rem;
}

.auth-card__custom-checkbox {
  display: inline-block;
  height: 1.5rem;
  width: 1.5rem;
  margin-right: 8px;
  margin-top: -2px;
  background-image: url("../assets/img/auth/checkbox-default.svg");
  transition: transform 0.1s ease-in-out;
}

.auth-card__checkbox-input:checked + .auth-card__checkbox-label .auth-card__custom-checkbox {
  background-image: url("../assets/img/auth/checkbox-checked.svg");
}

.auth-card__custom-checkbox:active {
  transform: scale(0.9);
}

.auth-card__policy-error {
  text-align: center;
  padding-left: 0;
}

/* ====== Modal ====== */
.signup-success-modal {
  position: fixed;
  left: 50%;
  bottom: -100px;
  transform: translate(-50%, 100%);
  opacity: 0;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 15px 30px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.4s ease-in-out,
    opacity 0.3s ease-in-out;

  z-index: 1000;
}

.signup-success-modal.show {
  bottom: 50%;
  transform: translate(-50%, 50%);
  opacity: 1;
}

/* ====== Footer ====== */
.auth-footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  padding: 1rem;
  min-height: 120px;
  flex: 0 0 auto;
}

.footer-links-group {
  display: flex;
  gap: 2rem;
  color: var(--color-gray-200);
}

@media (min-width: 768px) {
  .auth-footer {
    flex-direction: row;
    align-items: end;
    gap: 1.5rem;
  }
}

.footer-links-group:hover {
  color: var(--color-accent);
  text-shadow:
    0.4px 0 0 currentColor,
    -0.4px 0 0 currentColor;
}

/* ====== Buttons & Links ====== */
.auth-card__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .auth-card__actions {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

.auth-card__actions .btn {
  width: 100%;
  max-width: 12rem;
}

@media (min-width: 768px) {
  .auth-card__actions .btn {
    width: auto;
    max-width: none;
  }
}

.auth-card__link {
  text-decoration: none;
  color: var(--color-accent);
}

/* ====== Utilities ====== */
.auth-card.transition-ready {
  transition:
    transform 0.6s ease-in-out,
    height 0.5s ease-in-out;
}

.d-none-smooth {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 767px) {
  .desktop-only {
    display: none;
  }
}

@media (min-width: 768px) {
  .mobile-only-signup {
    display: none;
  }
}
