/* Auth Modal — center vertically */
.modal[data-modal="auth"] {
  align-items: center;
}

/* Auth Modal — screen switching */
.auth-screen {
  display: none;
}

.auth-screen--active {
  display: block;
}

/* Auth popup container */
.auth-popup {
  background: #fff;
  border-radius: 20px;
  padding: 25px;
  max-width: 466px;
  width: 100%;
  position: relative;
  max-height: 96vh;
  overflow-y: auto;
}

.auth-popup__title {
  text-align: center;
  margin-bottom: 25px;
}

/* Tabs */
.auth-popup__tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  width: fit-content;
  margin-inline: auto;
  padding: 4px;
  border-radius: 12px;
  background: #EDEDED;
}

.auth-popup__tab {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  opacity: 0.7;
  color: #393B40;
  font-family: Oswald;
  font-size: 15px;
  font-weight: 600;
  line-height: 112%;
  text-transform: uppercase;
  transition: all .3s;
  white-space: nowrap;
}

.auth-popup__tab:hover {
  opacity: 1;
}

.auth-popup__tab--active {
  background: #fff;
  color: #111212;
  opacity: 1;
}

/* Form layout */
.auth-popup__form {
  display: flex;
  flex-direction: column;
  position: relative;
}

.auth-popup__content {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 25px;
}

/* Buttons */
.auth-popup__button {
  width: 100%;
  border-radius: 10px;
}

.auth-popup__button--primary {
  padding: 16px 25px;
  color: #FFF;
  font-size: 15px;
  font-weight: 800;
  line-height: 139%;
}

.auth-popup__button--secondary {
  margin-top: 10px;
  padding: 9px 25px;
  font-size: 13px;
  font-weight: 700;
  line-height: 150%;
}

/* Password input — extra right padding for toggle button */
.auth-input--pass {
  padding-right: 41px;
}

.auth-input-wrapper--pass {
  position: relative;
}

/* Password toggle */
.auth-form-toggle-password {
  position: absolute;
  right: 15px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: opacity 0.2s ease;
}

.auth-form-toggle-password:hover {
  opacity: 0.7;
}

.auth-form-toggle-password .eye-open {
  transition: opacity 0.2s ease;
}

.auth-form-toggle-password .eye-closed {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.auth-form-toggle-password--active .eye-open {
  opacity: 0;
}

.auth-form-toggle-password--active .eye-closed {
  opacity: 1;
}

.auth-form-toggle-password--active path {
  stroke: #111212;
}

/* INN field with button inside */
.auth-input-wrapper--inn .base-input {
  padding-right: 155px;
}

.auth-form-link.auth-form-link--orange {
  color: #FC5417;
  font-size: 14px;
  font-weight: 600;
  position: absolute;
  right: 15px;
  border: none;
  border-bottom: 1px dashed #FC5417;
  border-radius: 0;
  line-height: 150%;
}

.auth-form-link.auth-form-link--orange:hover {
  opacity: 0.7;
}

/* OTP code inputs */
.auth-popup__content--code {
  gap: 12px;
}

.auth-popup__content--code .auth-form-field {
  gap: 12px;
}

.auth-popup__content--code .auth-form-label {
  text-align: center;
  color: #111212;
  font-size: 15px;
}

.auth-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-form-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 150%;
  color: #111212;
  display: block;
}

.auth-code-inputs {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.auth-code-input {
  width: 40px;
  height: 64px;
  border-bottom: 1px solid rgba(52, 56, 63, 0.20);
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: #303133;
  transition: border-color 0.2s ease;
}

.auth-code-input:focus {
  outline: none;
  border-color: #FCAF17;
}

.auth-code-input::placeholder {
  color: rgba(48, 49, 51, 0.2);
}

.auth-code-input:not(:placeholder-shown) {
  border-bottom: 1px solid rgba(52, 56, 63, 1);
}

/* Info / timer area */
.auth-form-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.auth-form-link {
  background: none;
  border: none;
  color: rgba(48, 49, 51, 0.7);
  font-size: 14px;
  font-weight: 500;
  line-height: 150%;
  cursor: pointer;
  transition: all .3s;
}

.auth-form-link:hover {
  color: #FC5417;
}

.auth-form-link--inline {
  display: inline;
  color: #FC5417;
  font-weight: 600;
  border-bottom: 1px dashed #FC5417;
  padding: 0;
}

.auth-form-link--inline:hover {
  color: #111212;
  border-color: #111212;
}

.auth-form-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 150%;
  color: #303133;
  text-align: center;
}

.auth-form-info--reg .auth-form-text {
  color: rgba(48, 49, 51, 0.7);
}

.auth-form-timer {
  font-weight: 700;
}

.auth-resend-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Registration screen — wider popup */
.auth-popup--registration {
  max-width: 954px;
}

/* Registration header */
.auth-popup__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
}

.auth-popup__header .auth-popup__title {
  margin-bottom: 0;
}

.auth-popup__login {
  color: #111212;
  font-family: Oswald;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 8px;
  gap: 4px;
}

/* Person type radios */
.auth-popup__person-type {
  display: flex;
  gap: 30px;
  margin-bottom: 25px;
}

.auth-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.auth-radio__label {
  font-size: 13px;
  font-weight: 500;
  line-height: 150%;
  color: #111212;
  cursor: pointer;
}

/* Custom radio indicator */
.custom-radio {
  cursor: pointer;
}

.custom-radio__indicator {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 1px solid #EDEDED;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: #fff;
  position: relative;
}

.auth-radio__input {
  display: none;
}

.auth-radio__input:checked + .custom-radio__indicator {
  border-color: #FCAF17;
}

.auth-radio__input:checked + .custom-radio__indicator::after {
  content: '';
  width: 12px;
  height: 12px;
  background: #FCAF17;
  border-radius: 50%;
}

/* Registration content */
.auth-popup__content--registration {
  gap: 25px;
}

.auth-popup__section-title {
  margin-bottom: -10px;
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

/* Legal fields wrapper */
.auth-legal-fields {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Auth error message */
.auth-error {
  color: #FC5417;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
  .auth-popup {
    border-radius: 16px;
    padding: 16px;
    max-width: 328px;
  }

  .auth-popup__title {
    margin-bottom: 15px;
    max-width: 90%;
    margin-inline: auto;
  }

  .auth-popup__header .auth-popup__title {
    margin: 0;
  }

  .auth-popup__tab {
    font-size: 13px;
    line-height: 1;
  }

  .auth-popup__tabs {
    margin-bottom: 15px;
  }

  .auth-popup__content {
    gap: 15px;
    margin-bottom: 15px;
  }

  .auth-popup__button--primary {
    padding: 12px 25px;
    font-size: 14px;
  }

  .auth-form-text {
    max-width: 242px;
  }

  .auth-popup--registration {
    max-width: 718px;
  }

  .auth-popup__header {
    margin-bottom: 15px;
  }

  .auth-popup__person-type {
    gap: 13px;
    margin-bottom: 15px;
  }

  .auth-form-row {
    gap: 15px;
  }

  .auth-radio__label {
    font-size: 12px;
  }

  .auth-popup__section-title {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .auth-form-row {
    grid-template-columns: 1fr;
  }

  .auth-popup__button--primary {
    padding: 12px 10px;
  }

  .auth-popup__section-title {
    font-size: 14px;
  }
}
