/* ТВІЙ ПРОСТІР — інтегрована авторизація v1.4.0. Скоуп: tpa-auth-root. */
.tpa-auth-root {
  --tpa-blue: #1D9CE6;
  --tpa-purple: #654EA3;
  --tpa-ink: #17182B;
  --tpa-teal: #38B6FF;
  --tpa-sun: #FFBD59;
  --tpa-muted: #626985;
  --tpa-line: #E3E7F4;
  position: relative !important;
  box-sizing: border-box !important;
  width: 100vw !important;
  max-width: 100vw !important;
  min-height: 690px;
  margin: 0 0 0 calc(50% - 50vw) !important;
  padding: clamp(38px, 5vw, 76px) max(22px, calc((100vw - 1240px)/2)) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 84px);
  background: radial-gradient(ellipse 54% 75% at 0% 35%, rgba(185, 203, 255, 0.38) 0%, transparent 100%),
              radial-gradient(ellipse 38% 50% at 100% 100%, rgba(220, 205, 250, 0.38) 0%, transparent 100%),
              linear-gradient(145deg, #F7F9FF 0%, #FFFFFF 58%, #F8F7FD 100%);
  isolation: isolate;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--tpa-ink);
}
.tpa-auth-root *, .tpa-auth-root *::before, .tpa-auth-root *::after { box-sizing: border-box; }
body.tpa-auth-page { overflow-x: clip; }
.tpa-auth-root::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(87, 111, 206, .11) .7px, transparent .7px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 65%);
}

/* Ліва інформаційна панель */
.tpa-auth-root .tpa-auth-aside { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; position: relative; }
.tpa-auth-root .tpa-auth-eyebrow, .tpa-auth-root .tpa-auth-form-eyebrow {
  margin: 0 0 18px !important; color: var(--tpa-purple); font-size: 11px; font-weight: 800; line-height: 1.5; letter-spacing: .17em;
}
.tpa-auth-root .tpa-auth-display { max-width: 620px; margin: 0 0 21px !important; font: 750 clamp(29px, 2.75vw, 41px)/1.27 'Unbounded', 'Manrope', sans-serif; letter-spacing: -.045em; color: var(--tpa-ink); text-wrap: balance; }
.tpa-auth-root .tpa-auth-lead { max-width: 525px; margin: 0 !important; color: var(--tpa-muted); font-size: 17px; line-height: 1.78; }
.tpa-auth-root .tpa-auth-benefits { list-style: none; padding: 0; margin: 30px 0 0 !important; display: grid; gap: 16px; }
.tpa-auth-root .tpa-auth-benefit { display: flex; align-items: center; gap: 12px; color: #40435E; font-size: 14px; line-height: 1.45; font-weight: 570; }
.tpa-auth-root .tpa-auth-check { flex: 0 0 27px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: rgba(101,78,163,.09); color: var(--tpa-purple); font-size: 15px; font-weight: 700; }
.tpa-auth-root .tpa-auth-aside-foot { margin: auto 0 0 !important; padding-top: 64px; font-size: 11px; color: #9098AC; line-height: 1.55; }
/* Три можливості платформи — акуратна сітка, без накладань */
.tpa-auth-root .tpa-auth-formats { display:flex; flex-wrap:wrap; align-items:stretch; gap:10px; margin-top:29px; max-width:510px; }
.tpa-auth-root .tpa-auth-format { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:44px; padding:10px 13px; border:1px solid #e4e2ef; border-radius:12px; background:rgba(255,255,255,.76); color:#42405a; box-shadow:0 8px 23px rgba(42,33,93,.045); font-size:12px; font-weight:750; white-space:nowrap; }
.tpa-auth-root .tpa-auth-format-icon { display:grid; place-items:center; width:24px; height:24px; flex:none; border-radius:8px; background:#f1ecf9; color:#654EA3; font-size:17px; line-height:1; font-weight:800; }
.tpa-auth-root .tpa-auth-format:nth-child(2) .tpa-auth-format-icon { color:#0879bb; background:#e6f6ff; }
.tpa-auth-root .tpa-auth-format:nth-child(3) .tpa-auth-format-icon { color:#995d05; background:#fff2db; }

/* Права картка: Tutor LMS розмітка збережена */
.tpa-auth-root > .tpa-auth-panel {
  position: relative !important; z-index: 1; align-self: center; min-width: 0;
  width: 100% !important; max-width: none !important;
  margin: 0 !important; padding: clamp(26px, 3vw, 43px) !important;
  background: #FFFFFF !important; border: 1px solid #E8EBF5 !important;
  border-radius: 26px !important; box-shadow: 0 25px 75px rgba(44,54,111,.11), 0 6px 24px rgba(52,68,120,.04) !important;
  overflow: visible;
}
.tpa-auth-root .tpa-auth-panel-heading { margin: 0 0 30px; }
.tpa-auth-root .tpa-auth-form-eyebrow { margin: 0 0 10px !important; }
.tpa-auth-root .tpa-auth-form-title { margin: 0 0 11px !important; padding: 0 !important; color: var(--tpa-ink); font: 750 clamp(22px, 1.85vw, 27px)/1.35 'Unbounded', 'Manrope', sans-serif; letter-spacing: -.045em; }
.tpa-auth-root .tpa-auth-form-description { margin: 0 !important; color: var(--tpa-muted); font-size: 14px; line-height: 1.65; }
.tpa-auth-root .tutor-login-form-wrapper { padding: 0 !important; }
.tpa-auth-root .tutor-login-form-wrapper > .tutor-h3 { display: none !important; }
.tpa-auth-root #tutor-registration-form { padding: 0 !important; }
.tpa-auth-root .tutor-forgot-password-form { padding: 0 !important; }
.tpa-auth-root .tutor-forgot-password-form > .tutor-small { display: none !important; }
.tpa-auth-root .tutor-forgot-password-form > .tutor-mb-8:empty { display: none !important; }


/* FIX: reset сторінки не торкається parent Elementor / header / footer. */
.tpa-auth-root.tpa-auth-reset-self {
  max-width:100vw !important; border:0!important; box-shadow:none!important;
  grid-template-rows:auto auto; align-content:center; align-items:stretch;
  background:radial-gradient(ellipse 54% 75% at 0% 35%, rgba(185,203,255,.38) 0%, transparent 100%), radial-gradient(ellipse 38% 50% at 100% 100%, rgba(220,205,250,.38) 0%, transparent 100%), linear-gradient(145deg,#f7f9ff 0%,#fff 58%,#f8f7fd 100%) !important;
}
.tpa-auth-root.tpa-auth-reset-self > .tpa-auth-aside { grid-column:1; grid-row:1 / 3; z-index:1; }
.tpa-auth-root.tpa-auth-reset-self::after {
  content:""; grid-column:2; grid-row:1 / 3; background:#fff; border:1px solid #e8ebf5;
  border-radius:26px; box-shadow:0 25px 75px rgba(44,54,111,.11),0 6px 24px rgba(52,68,120,.04);
  z-index:0; min-width:0;
}
.tpa-auth-root.tpa-auth-reset-self > .tpa-auth-panel-heading { grid-column:2;grid-row:1;align-self:end;z-index:1;margin:0;padding:clamp(26px,3vw,43px) clamp(25px,3vw,43px) 20px; }
.tpa-auth-root.tpa-auth-reset-self > form.tutor-forgot-password-form {grid-column:2;grid-row:2;align-self:start;z-index:1;min-width:0;max-width:none;width:100%;margin:0!important;padding:0 clamp(25px,3vw,43px) clamp(26px,3vw,43px)!important;background:transparent!important;border:0!important;box-shadow:none!important;}

/* Поля і стани */
.tpa-auth-root form .tutor-label, .tpa-auth-root form label:not(.tpa-auth-visually-hidden) { display: inline-block; margin-bottom: 8px; color: #32354C; font-size: 13px; font-weight: 650; line-height: 1.5; }
.tpa-auth-root form .tutor-label-required::after { color: #B64A58; }
.tpa-auth-root form input.tutor-input:not([type="checkbox"]),
.tpa-auth-root form input.tutor-form-control:not([type="checkbox"]) {
  display: block; width: 100%; max-width: 100%; min-height: 53px; height: 53px;
  padding: 11px 15px; border: 1px solid #DDE3F0; border-radius: 12px;
  background: #FAFBFE; color: #25263C; font-family: inherit; font-size: 15px;
  line-height: 1.5; box-shadow: none; transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.tpa-auth-root form input.tutor-input::placeholder, .tpa-auth-root form input.tutor-form-control::placeholder { color: #969CB0; opacity: 1; font-size: 13px; }
.tpa-auth-root form input.tutor-input:focus, .tpa-auth-root form input.tutor-form-control:focus { outline: none; border-color: var(--tpa-purple); background: #FFFFFF; box-shadow: 0 0 0 4px rgba(101,78,163,.10); }
.tpa-auth-root form input[aria-invalid="true"] { border-color: #C64256 !important; }
.tpa-auth-root form .tutor-input-wrapper { width: 100%; }
.tpa-auth-root form .tutor-input-content-right { padding-right: 46px !important; }
.tpa-auth-root form .tutor-input-password-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; color: #676F8B; border-radius: 8px; }
.tpa-auth-root form .tutor-input-password-toggle:hover { background: #F3F0F9; }
.tpa-auth-root form .tutor-input-field { min-width: 0; }
.tpa-auth-root form .tutor-label-required { white-space: normal; }
.tpa-auth-root form input[type="checkbox"] { accent-color: var(--tpa-purple); }
.tpa-auth-root form input[type="checkbox"]:focus-visible { outline: 3px solid rgba(101,78,163,.35); outline-offset: 3px; }
.tpa-auth-root form a { color: var(--tpa-purple); text-decoration: none; font-weight: 650; }
.tpa-auth-root form a:hover, .tpa-auth-root .tpa-auth-back-link:hover { color: #57418F; text-decoration: underline; }
.tpa-auth-root .tutor-btn.tutor-btn-primary {
  display: flex; align-items: center; justify-content: center; min-height: 54px;
  background: linear-gradient(105deg, #654EA3, #1D9CE6); color: #FFFFFF;
  border: 1px solid var(--tpa-purple); border-radius: 12px; box-shadow: 0 10px 22px rgba(101,78,163,.17);
  font-weight: 700; font-size: 15px; letter-spacing: 0; line-height: 1.3;
  transition: transform .17s ease, filter .17s ease, box-shadow .17s ease;
}
.tpa-auth-root .tutor-btn.tutor-btn-primary:hover { background: linear-gradient(105deg, #57418F, #178BD3); border-color: #57418F; color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 13px 26px rgba(101,78,163,.22); }
.tpa-auth-root .tutor-btn.tutor-btn-primary:active { transform: translateY(0); }
.tpa-auth-root .tutor-btn-link, .tpa-auth-root .tutor-btn-link-gray { color: var(--tpa-purple) !important; }
.tpa-auth-root .tutor-small { color: #686F86; line-height: 1.6; }
.tpa-auth-root .tutor-login-error:not(:empty) { margin-bottom: 14px; }
.tpa-auth-root .tutor-alert, .tpa-auth-root [role="alert"]:not(:empty) { border-radius: 10px; }

/* Login: на відміну від інших форм Tutor використовує тільки placeholder */
.tpa-auth-root.tpa-mode-login #tutor-login-form > .tutor-input-field { margin-bottom: 19px !important; }
.tpa-auth-root.tpa-mode-login #tutor-login-form .tutor-flex.tutor-justify-between { gap: 10px; flex-wrap: wrap; margin-top: 20px !important; }
.tpa-auth-root.tpa-mode-login #tutor-login-form .tutor-flex.tutor-justify-between .tutor-label { font-weight: 500; font-size: 12px; margin-bottom: 0; }
.tpa-auth-root.tpa-mode-login #tutor-login-form > .tutor-btn.tutor-btn-primary { margin-top: 24px !important; }
.tpa-auth-root.tpa-mode-login #tutor-login-form > .tutor-flex.tutor-items-center.tutor-justify-center { margin-top: 21px !important; gap: 7px !important; flex-wrap: wrap; text-align: center; }
.tpa-auth-root.tpa-mode-login #tutor-login-form > .tutor-flex.tutor-items-center.tutor-justify-center .tutor-btn { padding: 0; }

/* Registration: 2 стовпці на широких екранах; 1 на телефонах */
.tpa-auth-root.tpa-mode-register #tutor-registration-form { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px 15px !important; }
.tpa-auth-root.tpa-mode-register #tutor-registration-form > .tutor-form-row,
.tpa-auth-root.tpa-mode-register #tutor-registration-form > .tutor-input-field:has(#tutor-terms-conditions),
.tpa-auth-root.tpa-mode-register #tutor-registration-form > div:has(> button[name="tutor_register_student_btn"]) { grid-column: 1 / -1; }
.tpa-auth-root.tpa-mode-register #tutor-registration-form .tutor-input-field { margin: 0 !important; }
.tpa-auth-root.tpa-mode-register #tutor-registration-form .tutor-form-row { margin-top: 0 !important; }
.tpa-auth-root.tpa-mode-register #tutor-registration-form .tutor-form-row .tutor-form-col-12 { padding: 0 !important; }
.tpa-auth-root.tpa-mode-register #tutor-registration-form label[for="tutor-terms-conditions"] { margin: 0 !important; font-size: 12px !important; font-weight: 470 !important; line-height: 1.6; }
.tpa-auth-root.tpa-mode-register #tutor-registration-form .tutor-input-wrapper:has(#tutor-terms-conditions) { display: flex; align-items: flex-start; gap: 10px; }
.tpa-auth-root.tpa-mode-register #tutor-registration-form #tutor-terms-conditions { flex: 0 0 auto; margin-top: 4px; }
.tpa-auth-root.tpa-mode-register #tutor-registration-form .tutor-flex.tutor-justify-center { flex-wrap: wrap; gap: 6px !important; margin-top: 20px !important; text-align: center; }
.tpa-auth-root .tpa-auth-hint { display: block; margin-top: 6px; color: #80879E; font-size: 11px; line-height: 1.5; }

/* Відновлення пароля */
.tpa-auth-root.tpa-mode-reset .tutor-forgot-password-form .tutor-input-field { margin-bottom: 20px !important; }
.tpa-auth-root.tpa-mode-reset .tutor-forgot-password-form .tutor-form-row { margin: 0 !important; }
.tpa-auth-root.tpa-mode-reset .tutor-forgot-password-form .tutor-form-col-12 { padding: 0 !important; }
.tpa-auth-root .tpa-auth-back { margin-top: 18px; text-align: center; }
.tpa-auth-root .tpa-auth-back-link { color: var(--tpa-purple); text-decoration: none; font-size: 13px; font-weight: 650; }

/* Соціальний вхід: оригінальний контейнер Google та iframe не змінюємо */
.tpa-auth-root .tutor-social-authentication { margin: 27px 0 0 !important; padding: 22px 0 0 !important; border-top: 1px solid var(--tpa-line) !important; gap: 14px !important; }
.tpa-auth-root .tutor-social-authentication::before { content: "АБО ПРОДОВЖИТИ ЧЕРЕЗ"; align-self: center; color: #9297AB; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.tpa-auth-root .tutor-social-authentication:empty { display: none; }

/* reCAPTCHA v2: не приховувати й не втручатися у внутрішній iframe */
.tpa-auth-root .g-recaptcha { margin: 15px 0 6px !important; max-width: 100%; transform: scale(.89) !important; transform-origin: left center !important; }
.tpa-auth-root.tpa-mode-register .g-recaptcha { margin-top: 0 !important; }
.tpa-auth-root form .tutor-input-password-toggle, .tpa-auth-root form button { cursor: pointer; }
.tpa-auth-root .tpa-auth-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 990px) {
  .tpa-auth-root { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 25px; padding: 45px 25px !important; }
  .tpa-auth-root .tpa-auth-display { font-size: clamp(30px, 4.1vw, 40px); }
  .tpa-auth-root .tpa-auth-aside-foot { padding-top: 26px; }
  .tpa-auth-root > .tpa-auth-panel { padding: 29px !important; }
}
@media (max-width: 760px) {
  .tpa-auth-root { min-height: 0; display: flex !important; flex-direction: column; align-items: stretch; gap: 25px; padding: 30px 18px 56px !important; }
  .tpa-auth-root .tpa-auth-aside { max-width: 600px; width: 100%; margin: 0 auto; }
  .tpa-auth-root .tpa-auth-eyebrow { margin-bottom: 7px !important; font-size: 10px; }
  .tpa-auth-root .tpa-auth-display { margin-bottom: 8px !important; font-size: clamp(26px, 6.3vw, 36px); line-height: 1.2; }
  .tpa-auth-root .tpa-auth-lead { font-size: 13px; line-height: 1.6; }
  .tpa-auth-root .tpa-auth-benefits, .tpa-auth-root .tpa-auth-formats, .tpa-auth-root .tpa-auth-aside-foot { display: none; }
  .tpa-auth-root > .tpa-auth-panel { width: 100% !important; max-width: 600px !important; margin: 0 auto !important; border-radius: 20px !important; padding: 25px !important; }
  .tpa-auth-root .tpa-auth-panel-heading { margin-bottom: 24px; }
  .tpa-auth-root .tpa-auth-form-title { font-size: 27px; }
}
@media (max-width: 540px) {
  .tpa-auth-root { gap: 20px; padding: 24px 14px 42px !important; }
  .tpa-auth-root .tpa-auth-display { font-size: clamp(25px, 7vw, 33px); }
  .tpa-auth-root > .tpa-auth-panel { border-radius: 18px !important; padding: 23px 19px !important; }
  .tpa-auth-root.tpa-mode-register #tutor-registration-form { grid-template-columns: minmax(0, 1fr); gap: 15px !important; }
  .tpa-auth-root.tpa-mode-register #tutor-registration-form > .tutor-form-row,
  .tpa-auth-root.tpa-mode-register #tutor-registration-form > .tutor-input-field:has(#tutor-terms-conditions),
  .tpa-auth-root.tpa-mode-register #tutor-registration-form > div:has(> button[name="tutor_register_student_btn"]) { grid-column: 1; }
  .tpa-auth-root .g-recaptcha { transform: scale(.86) !important; margin-bottom: 0 !important; }
  .tpa-auth-root .tpa-auth-form-title { font-size: 25px; }
}
@media (max-width: 359px) {
  .tpa-auth-root { padding-left: 10px !important; padding-right: 10px !important; }
  .tpa-auth-root > .tpa-auth-panel { padding: 22px 14px !important; }
  .tpa-auth-root .g-recaptcha { transform: scale(.77) !important; }
}
@media (prefers-reduced-motion: reduce) {
  .tpa-auth-root *, .tpa-auth-root *::before, .tpa-auth-root *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Мобільна ізоляція форми скидання пароля. */
@media (max-width:760px) {
 .tpa-auth-root.tpa-auth-reset-self {display:flex!important;flex-direction:column;align-items:stretch;gap:0;}
 .tpa-auth-root.tpa-auth-reset-self > .tpa-auth-aside {max-width:600px;width:100%;margin:0 auto 22px;}
 .tpa-auth-root.tpa-auth-reset-self::after {display:none;}
 .tpa-auth-root.tpa-auth-reset-self > .tpa-auth-panel-heading {width:100%;max-width:600px;margin:0 auto!important;padding:26px 25px 14px;background:#fff;border:1px solid #e8ebf5;border-bottom:0;border-radius:20px 20px 0 0;box-shadow:0 15px 35px rgba(44,54,111,.07);}
 .tpa-auth-root.tpa-auth-reset-self > form.tutor-forgot-password-form {width:100%;max-width:600px;margin:0 auto!important;padding:0 25px 25px!important;background:#fff!important;border:1px solid #e8ebf5!important;border-top:0!important;border-radius:0 0 20px 20px;box-shadow:0 24px 45px rgba(44,54,111,.08)!important;}
}
@media (max-width:540px) {
 .tpa-auth-root.tpa-auth-reset-self > .tpa-auth-panel-heading {padding:24px 19px 13px;}
 .tpa-auth-root.tpa-auth-reset-self > form.tutor-forgot-password-form {padding:0 19px 24px!important;}
}
