/* 3.1.2 — only the requested auth, footer and profile corrections. */

/* The left panel remains fully controlled by the Elementor portal widget. */
.elementor-widget-sp_portal_block .sp-elementor-portal-widget :is(.sp-auth-intro,.sp-registration-intro){
  background:var(--spw-intro-bg,var(--e-global-color-secondary,#eee7fa))!important;
  color:var(--spw-intro-text,var(--spw-text,inherit));
}
.elementor-widget-sp_portal_block .sp-elementor-portal-widget :is(.sp-auth-intro,.sp-registration-intro) :is(h1,p,li){
  color:var(--spw-intro-text,var(--spw-text,inherit))!important;
}

/* The password eye is a control inside a field, never a primary action button. */
.elementor-widget-sp_portal_block .sp-elementor-portal-widget button:is(.sp-auth-password-toggle,.sp-password-toggle),
button:is(.sp-auth-password-toggle,.sp-password-toggle){
  position:absolute!important;
  top:50%!important;
  right:8px!important;
  display:flex!important;
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  margin:0!important;
  padding:8px!important;
  align-items:center!important;
  justify-content:center!important;
  transform:translateY(-50%)!important;
  border:1px solid #9ca3af!important;
  border-radius:50%!important;
  background:#fff!important;
  color:#6b7280!important;
  box-shadow:none!important;
  opacity:1!important;
  visibility:visible!important;
  z-index:2;
}
.elementor-widget-sp_portal_block .sp-elementor-portal-widget button:is(.sp-auth-password-toggle,.sp-password-toggle):hover,
button:is(.sp-auth-password-toggle,.sp-password-toggle):hover{
  border-color:#6b7280!important;
  background:#fff!important;
  color:#4b5563!important;
  transform:translateY(-50%)!important;
}
.sp-auth-password-toggle svg,.sp-password-toggle svg{width:20px!important;height:20px!important;flex:none}

/* Forms keep clear breathing room between fields and actions. */
.sp-auth-form,.sp-registration-form{row-gap:18px!important}
.sp-auth-form :is(.sp-auth-submit,button[type=submit]),
.sp-registration-form :is(.sp-registration-submit,button[type=submit]){margin-top:6px!important}
.sp-auth-reset-card{text-align:center}
.sp-auth-reset-card .sp-auth-form{text-align:left}
.sp-auth-logout-page .sp-auth-logout{
  max-width:none;
  margin:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

/* Footer cookie text has exactly the same static link appearance and no action. */
.sp-elementor-site-footer .sp-footer-cookie-label{
  display:inline;
  animation:none!important;
  transition:none!important;
  transform:none!important;
  opacity:1!important;
}

/* Profile: retain Elementor colours while fixing layout and alignment. */
.sp-editable-page-shell:has(.sp-elementor-portal-profile){
  max-width:1380px!important;
}
.sp-profile-page{
  width:min(1320px,calc(100vw - 32px))!important;
}
.elementor-widget-sp_portal_block .sp-elementor-portal-widget .sp-profile-page>.student-dashboard-card,
.sp-profile-page>.student-dashboard-card{
  border:0!important;
  box-shadow:none!important;
}
.sp-profile-page :is(input:not([type=checkbox]):not([type=radio]),select,textarea){
  line-height:1.35!important;
}
.sp-profile-page :is(input:not([type=checkbox]):not([type=radio]),select){
  min-height:48px!important;
  height:auto!important;
  padding-top:11px!important;
  padding-bottom:11px!important;
}
.sp-profile-contact-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
}
.sp-profile-contact-grid p{min-width:0;margin-top:0}
.sp-profile-contact-grid input{width:100%}
.sp-profile-main-fields{max-width:780px!important}
.sp-profile-details{width:100%;max-width:none!important}
.sp-profile-goals{margin-top:12px}
.sp-profile-goal-options{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  max-width:100%;
  padding:4px 0;
  overflow:visible;
}
.sp-profile-goal{
  display:inline-flex!important;
  flex:0 0 auto;
  align-items:center!important;
  gap:8px;
  margin:8px 16px 8px 0!important;
  white-space:nowrap;
  line-height:1.3;
}
.sp-profile-goal input[type=checkbox]{flex:0 0 auto;margin:0!important;vertical-align:middle}
.sp-profile-avatar-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
.sp-profile-photo-select{
  display:inline-flex!important;
  min-height:48px;
  padding:12px 22px!important;
  align-items:center;
  justify-content:center;
  border:0!important;
  border-radius:var(--spw-button-radius,999px)!important;
  background:var(--spw-button-bg,#1e2b43)!important;
  color:var(--spw-button-text,#fff)!important;
  cursor:pointer;
  font-weight:700;
  line-height:1.2;
}
.elementor-widget-sp_portal_block .sp-elementor-portal-widget button.sp-profile-icon-remove,
.sp-profile-page button.sp-profile-icon-remove{
  display:inline-flex!important;
  width:32px!important;
  min-width:32px!important;
  height:32px!important;
  min-height:32px!important;
  margin:0!important;
  padding:0!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #111!important;
  border-radius:50%!important;
  background:transparent!important;
  color:#111!important;
  box-shadow:none!important;
  font-size:22px!important;
  font-weight:400!important;
  line-height:1!important;
  transform:none!important;
}
.sp-profile-page .sp-language-row .sp-profile-icon-remove{justify-self:center}
.sp-profile-logout-form{
  display:flex;
  max-width:860px;
  justify-content:center;
  margin-top:14px;
  padding-top:22px;
  border-top:1px solid var(--spw-card-border,#e5e7eb);
}
.sp-profile-logout-form button[type=submit]{margin-inline:auto!important}

@media(max-width:680px){
  .sp-profile-page{width:calc(100vw - 20px)!important}
  .sp-profile-contact-grid{grid-template-columns:1fr}
  .sp-profile-goal-options{
    display:grid;
    grid-template-columns:1fr;
  }
}
