/* Shared entry controls. Small flags retain full-sized touch targets. */
.register-layout .register-nav .register-language{display:inline-flex;flex:none;gap:2px;padding:2px;margin:0;border:1px solid var(--afs-border,#d6dfef);border-radius:12px;box-shadow:none;background:var(--afs-surface,#fff)}
.register-layout .register-nav .register-language :is(a,button){display:grid;place-items:center;min-width:40px;min-height:40px;padding:8px;border:1px solid transparent;border-radius:9px;box-shadow:none}
.register-layout .register-nav .register-language img{width:22px;height:15px;object-fit:contain;border-radius:2px;box-shadow:0 0 0 1px #71829b40}
.register-layout .register-nav .register-language :is([aria-current=true],[aria-pressed=true]){border-color:var(--afs-brand,#075bd9);background:var(--afs-surface-hover,#e9f2ff)}
.register-layout .register-nav{justify-content:flex-start;flex-wrap:wrap;gap:12px}
/* Shared phone layout. Keep form IDs, submission, steps and locale handling. */
@media(max-width:575px){
 .register-layout.auth-container{padding:0 12px 28px}
 .register-layout .register-nav{gap:6px;min-height:70px;padding:7px 0}
 .register-nav .register-wordmark{margin:0;min-width:0}
 .register-nav .register-wordmark img{width:112px;height:auto}
 .register-nav .register-language{gap:2px;padding:3px}
 .register-nav .register-language :is(a,button){min-width:30px;min-height:36px;padding:4px}
 .register-nav .register-language img{width:24px;height:16px}
 .register-nav .afs-theme-toggle{min-width:36px;min-height:36px;padding:6px}
 .register-nav>.btn{min-height:36px;padding:7px 8px}
 .register-layout .register-grid{display:flex;flex-direction:column;gap:18px;padding:0;margin:15px auto 0}
 .register-layout .register-card{order:0;min-width:0;width:100%}
 .register-layout .register-intro{display:block;order:1;width:100%;padding:6px 2px}
 .register-layout .register-intro h1{font-size:27px;line-height:1.15}
 .register-layout .register-intro>p{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
 .register-layout .register-eyebrow{max-width:100%;white-space:normal}
 .register-layout .register-card.auth-card{padding:22px 16px!important}
 .register-card .register-fields{display:flex;flex-direction:column;gap:13px}
 .register-card .register-fields :is(.mb-3,.row>.mb-3){width:100%;min-width:0}
 .register-card .register-fields :is(.form-control,.form-select),
 .login-layout .login-card .form-control{min-height:46px;height:auto;font-size:16px!important}
 .register-card .register-fields .form-label{font-size:13px;line-height:1.4;margin-bottom:5px}
 .register-card .register-fields .input-group{min-width:0}
 .register-layout .register-card.auth-card .register-phone{grid-template-columns:112px minmax(0,1fr);gap:8px}
 .register-card .register-heading h2{font-size:20px}
 .register-card .custom-checkbox-label{font-size:13px;line-height:1.5}
 .register-card .register-subscription-description,
 .register-card .register-limited{font-size:13px;line-height:1.5}
 .register-card .register-promo-row :is(input,button){min-height:44px;font-size:14px}
 .register-layout .register-trust{flex-wrap:wrap;gap:10px}
 .register-layout .register-trust>span{min-width:0;white-space:normal}
 .login-layout .login-card h2{font-size:25px}
 .login-layout .login-card .login-wordmark{width:160px}
 .login-layout .login-card .btn-auth{min-height:48px}
}
.register-layout #register-business-type-description{display:block!important;color:var(--afs-text-muted,#596579)!important;font-size:13px;line-height:1.5;margin-top:6px;overflow-wrap:anywhere}
.register-fields .mb-3:has(#id_business_type option[value=person]:checked) .register-business-entity,
.register-fields .mb-3:has(#id_business_type option[value=business]:checked) .register-business-person{display:none}
html[data-bs-theme=dark] .register-layout .register-business-description{color:#c9d8ef!important}

/* Keep WebView forms inside the screen, including enlarged text and insets. */
@media(max-width:768px){
 .main-content.full-width:has(.register-layout){padding:0!important;min-width:0}
 .register-layout.auth-container{box-sizing:border-box;width:100%;max-width:100%;padding: max(24px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) max(72px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));-webkit-text-size-adjust:100%;text-size-adjust:100%}
 .register-layout .register-nav{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:8px;min-height:48px;padding:0 0 8px}
 .register-layout .register-nav .register-wordmark{margin:0;min-width:0}
 .register-layout .register-nav .register-wordmark img{width:96px;max-width:100%;height:auto}
 .register-layout .register-nav .register-language :is(a,button){min-width:44px;min-height:44px}
 .register-layout .register-nav .afs-theme-toggle{min-width:44px;min-height:44px}
 .register-layout .register-nav>.btn{margin:0;min-height:44px;display:inline-flex;align-items:center}
 .register-layout .register-grid{display:flex;flex-direction:column;gap:18px;width:100%;max-width:100%;margin:10px auto 0;padding:0;min-width:0}
 .register-layout .register-card.auth-card{order:0;box-sizing:border-box;width:100%;max-width:100%!important;min-width:0;padding:20px 16px!important;margin:0}
 .register-layout .register-intro{order:1;max-width:100%;min-width:0}
 .register-layout .register-heading{grid-template-columns:36px minmax(0,1fr);gap:10px}
 .register-layout .register-heading h2{font-size:20px;line-height:1.3;overflow-wrap:anywhere}
 .register-layout .register-heading p{font-size:14px;line-height:1.5}
 .register-layout .register-card .register-fields{display:flex;flex-direction:column;min-width:0}
 .register-layout .register-card .register-fields input.form-control{padding-inline-start:34px!important;min-width:0;max-width:100%;min-height:48px;font-size:16px!important}
 .register-layout .register-card .register-fields .register-phone input.form-control{padding-inline-start:12px!important}
 .register-layout .register-card .register-fields input[type=password]{padding-inline-end:40px!important}
 .register-layout .register-card .register-fields .register-password-toggle{width:40px}
 .register-layout .register-steps{font-size:11px;gap:4px}
 .register-layout .login-card .login-wordmark{width:156px;max-width:65%;height:auto;margin-bottom:18px}
 .register-layout .login-card .login-subtitle{font-size:15px;margin-bottom:22px}
 .register-layout .login-card .btn-auth{font-size:17px}
}

/* Register: brand left, flags and theme together right, sign-in below them. */
.register-page .register-nav{display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:auto auto;column-gap:12px;row-gap:8px;align-items:center}
.register-page .register-nav .register-wordmark{grid-column:1;grid-row:1 / 3;justify-self:start;max-width:100%;min-width:0;margin:0}
.register-page .register-nav .register-language{grid-column:2;grid-row:1}
.register-page .register-nav .afs-theme-toggle{grid-column:3;grid-row:1;justify-self:end;margin:0}
.register-page .register-nav>.btn{grid-column:2 / 4;grid-row:2;justify-self:end;margin:0}
@media(max-width:768px){
 .register-page .register-nav{column-gap:8px;row-gap:6px}
 .login-layout.auth-container{padding-top:max(12px,env(safe-area-inset-top,0px));padding-bottom:20px}
 .login-layout .register-nav{min-height:44px;padding-bottom:0}
 .login-layout .register-grid{margin-top:8px;gap:20px}
 .login-layout .login-card .login-wordmark{width:120px;margin-bottom:10px}
 .login-layout .login-card .login-subtitle{margin-bottom:16px}
 .login-layout .login-card h2{font-size:23px}
 .login-layout .login-card .btn-auth{min-height:48px}
 .login-layout .login-password button{width:44px;min-height:44px;top:1px;bottom:1px;color:var(--afs-text-muted,#52647d)}
 .login-layout .login-password input{padding-right:52px!important}
 .login-layout .forgot-row a,.login-layout form>.text-center:last-child a{display:inline-flex;align-items:center;min-height:44px}
 body:has(.login-layout) #myafs-privacy .privacy-open{position:relative;left:auto;bottom:auto;margin:0 12px max(12px,env(safe-area-inset-bottom));z-index:auto}
}
