/* =========================================================
   ALLHIR FORMS — LOGIN + REGISTER (CARD STYLE)
   Scope: только login/register страницы и только формы ALLHIR
   ========================================================= */

/* ---------- Page scoping (по id страниц) ---------- */
/* login-2 = post 3329, register = post 3325, forgot = 3332 */
body.page-id-3329,
body.page-id-3325,
body.page-id-3332 {}

/* ---------- Общая белая карточка ---------- */
body.page-id-3329 .allhir-card,
body.page-id-3325 .allhir-card,
body.page-id-3332 .allhir-card{
  width: min(760px, 92vw);
  margin: 56px auto 40px;
  padding: 32px 36px;
  box-sizing: border-box;

  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.25);

  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Заголовок */
body.page-id-3329 .allhir-card h2,
body.page-id-3325 .allhir-card h2,
body.page-id-3332 .allhir-card h2{
  margin: 0 0 18px !important;
  text-align: center;
  color: #ff8a00 !important;
  font-size: 30px;
  font-weight: 800;
}

/* ---------- Tabs (если есть Email/Телефон) ---------- */
body.page-id-3329 .login-tabs,
body.page-id-3325 .login-tabs{
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
}

body.page-id-3329 .tab-btn,
body.page-id-3325 .tab-btn{
  flex: 1;
  padding: 12px 10px;
  border: 1px solid #d5d5d5;
  background: #f7f7f7;
  cursor: pointer;
  border-radius: 10px;
  font-weight: 700;
  transition: 0.2s;
}

body.page-id-3329 .tab-btn.active,
body.page-id-3325 .tab-btn.active{
  background: #4a8df8;
  color: #fff;
  border-color: #4a8df8;
}

/* ---------- Поля ALLHIR (твоя разметка) ---------- */
body.page-id-3329 .allhir-form,
body.page-id-3325 .allhir-form,
body.page-id-3332 .allhir-form{
  width: 100%;
  max-width: 100%;
}

body.page-id-3329 .allhir-field,
body.page-id-3325 .allhir-field,
body.page-id-3332 .allhir-field{
  margin: 0 0 16px;
}

body.page-id-3329 .allhir-field label,
body.page-id-3325 .allhir-field label,
body.page-id-3332 .allhir-field label{
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  color: #222;
}

body.page-id-3329 .allhir-field input,
body.page-id-3325 .allhir-field input,
body.page-id-3332 .allhir-field input{
  width: 100%;
  box-sizing: border-box;
  padding: 12px 12px;
  border: 1px solid #2b2b2b;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.2;
}

/* ---------- WP LOGIN FORM (wp_login_form() на login-2) ---------- */
body.page-id-3329 #loginform{
  margin: 0 !important;
}

body.page-id-3329 #loginform p{
  margin: 0 0 16px !important;
}

body.page-id-3329 #loginform label{
  display: block;
  margin: 0 0 8px !important;
  font-weight: 700;
  color: #222;
}

body.page-id-3329 #loginform input[type="text"],
body.page-id-3329 #loginform input[type="password"]{
  width: 100%;
  box-sizing: border-box;
  padding: 12px 12px;
  border: 1px solid #2b2b2b;
  border-radius: 12px;
  font-size: 15px;
}

/* Фикс “кнопка прилипла к паролю” */
body.page-id-3329 #loginform p.login-submit{
  margin-top: 12px !important;
  margin-bottom: 0 !important;
}

/* ---------- Кнопки (и для твоей формы, и для wp_login_form) ---------- */
body.page-id-3329 .allhir-btn,
body.page-id-3325 .allhir-btn,
body.page-id-3332 .allhir-btn,
body.page-id-3329 .allhir-form input[type="submit"],
body.page-id-3325 .allhir-form input[type="submit"],
body.page-id-3332 .allhir-form input[type="submit"],
body.page-id-3329 #loginform input[type="submit"]{
  width: 100%;
  margin-top: 12px;
  padding: 12px 0 !important;

  background: #ff8a00 !important;
  color: #fff !important;

  border: 0 !important;
  border-radius: 12px !important;

  font-size: 16px !important;
  font-weight: 800 !important;

  cursor: pointer;
  transition: 0.25s;
}

body.page-id-3329 .allhir-btn:hover,
body.page-id-3325 .allhir-btn:hover,
body.page-id-3332 .allhir-btn:hover,
body.page-id-3329 .allhir-form input[type="submit"]:hover,
body.page-id-3325 .allhir-form input[type="submit"]:hover,
body.page-id-3332 .allhir-form input[type="submit"]:hover,
body.page-id-3329 #loginform input[type="submit"]:hover{
  background: #ff9c33 !important;
}

/* ---------- Links block ---------- */
body.page-id-3329 .allhir-links,
body.page-id-3325 .allhir-links,
body.page-id-3332 .allhir-links{
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  flex-wrap: wrap;
}

body.page-id-3329 .allhir-links a,
body.page-id-3325 .allhir-links a,
body.page-id-3332 .allhir-links a{
  color: #ff8a00 !important;
  font-weight: 700;
  text-decoration: none;
}

body.page-id-3329 .allhir-links a:hover,
body.page-id-3325 .allhir-links a:hover,
body.page-id-3332 .allhir-links a:hover{
  text-decoration: underline;
}

/* ---------- Register: 2 колонки на десктопе ---------- */
/* Включается, если у формы регистрации есть класс .allhir-form--register
   (или если ты добавишь .allhir-card--register на контейнер) */
@media (min-width: 981px){

  body.page-id-3325 .allhir-form--register,
  body.page-id-3325 .allhir-card--register .allhir-form{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px 18px !important;
    align-items: start !important;
  }

  /* На всю ширину: чекбокс, submit, большие блоки */
  body.page-id-3325 .allhir-form--register .allhir-field--full,
  body.page-id-3325 .allhir-form--register input[type="submit"],
  body.page-id-3325 .allhir-form--register .allhir-btn,
  body.page-id-3325 .allhir-card--register .allhir-field--full,
  body.page-id-3325 .allhir-card--register input[type="submit"],
  body.page-id-3325 .allhir-card--register .allhir-btn{
    grid-column: 1 / -1 !important;
  }

  /* чекбокс не растягиваем */
  body.page-id-3325 .allhir-form--register input[type="checkbox"],
  body.page-id-3325 .allhir-card--register input[type="checkbox"]{
    width: auto !important;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 980px){
  body.page-id-3329 .allhir-card,
  body.page-id-3325 .allhir-card,
  body.page-id-3332 .allhir-card{
    width: min(520px, 92vw);
    margin: 22px auto 28px;
    padding: 22px 18px;
  }

  body.page-id-3329 .allhir-card h2,
  body.page-id-3325 .allhir-card h2,
  body.page-id-3332 .allhir-card h2{
    font-size: 24px;
  }

  /* регистрация в 1 колонку */
  body.page-id-3325 .allhir-form--register,
  body.page-id-3325 .allhir-card--register .allhir-form{
    display: block !important;
  }

  body.page-id-3329 .allhir-links,
  body.page-id-3325 .allhir-links,
  body.page-id-3332 .allhir-links{
    justify-content: center;
  }
}
/* =========================================================
   ALLHIR — LOGIN FIX (card width + Google button full width)
   ========================================================= */

body.page-id-3329 .allhir-card{
  width: min(720px, 92vw) !important;
  max-width: 720px !important;
  margin: 60px auto 40px !important;
  padding: 34px 38px !important;
  box-sizing: border-box !important;
}

@media (min-width: 1400px){
  body.page-id-3329 .allhir-card{
    max-width: 680px !important;
  }
}

body.page-id-3329 .allhir-google-btn,
body.page-id-3329 .nsl-container .nsl-button,
body.page-id-3329 .nsl-container .nsl-button-default,
body.page-id-3329 .nsl-container .nsl-button-google{
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 0 !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
}

body.page-id-3329 .nsl-container{
  width: 100% !important;
  max-width: 100% !important;
}

body.page-id-3329 .nsl-container .nsl-button{
  border: 1px solid #ddd !important;
  background: #fff !important;
}

body.page-id-3329 .nsl-container img,
body.page-id-3329 .allhir-google-btn img{
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;
}

@media (max-width: 700px){
  body.page-id-3329 .allhir-card{
    width: min(520px, 92vw) !important;
    max-width: 520px !important;
    padding: 22px 16px !important;
    margin: 22px auto 28px !important;
  }
}


/* =========================================================
   ALLHIR — COMPACT AUTH CARDS (login + register)
   ========================================================= */

body.page-id-3329 .allhir-card,
body.page-id-3325 .allhir-card{
  width: min(640px, 92vw) !important;
  max-width: 640px !important;
  margin: 48px auto 34px !important;
  padding: 30px 32px !important;
  box-sizing: border-box !important;
  border-radius: 18px !important;
}

@media (min-width: 1400px){
  body.page-id-3329 .allhir-card,
  body.page-id-3325 .allhir-card{
    max-width: 600px !important;
  }
}

@media (max-width: 700px){
  body.page-id-3329 .allhir-card,
  body.page-id-3325 .allhir-card{
    width: min(520px, 92vw) !important;
    max-width: 520px !important;
    padding: 22px 16px !important;
    margin: 22px auto 26px !important;
  }
}


/* =========================================================
   REGISTER: 2 columns + checkbox on same row as repeat password
   ========================================================= */

@media (min-width: 981px){

  body.page-id-3325 .allhir-card .allhir-form{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px 18px !important;
    align-items: start !important;
  }

  body.page-id-3325 .allhir-card .allhir-btn,
  body.page-id-3325 .allhir-card input[type="submit"]{
    grid-column: 1 / -1 !important;
  }

  body.page-id-3325 .allhir-card .allhir-form .allhir-field:nth-of-type(5){
    grid-column: 1 / 2 !important;
  }

  body.page-id-3325 .allhir-card .allhir-form .allhir-field:nth-of-type(6){
    grid-column: 2 / 3 !important;
    grid-row: 3 !important;
    align-self: end !important;
    margin: 0 0 6px !important;
  }

  body.page-id-3325 .allhir-card .allhir-form .allhir-field:nth-of-type(6) label{
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    font-weight: 700 !important;
  }

  body.page-id-3325 .allhir-card .allhir-form .allhir-field:nth-of-type(6) input[type="checkbox"]{
    width: auto !important;
    margin: 0 !important;
  }
}