/* Email step uses Arne's onboarding.css, public-brand.css and
   registration-background.css (design handoff 2026-09-30).
   Existing registration fields/actions stay connected to the Service Hub.
   Scope excludes the carousel, password, partner and signed-in views. */
.email-showcase-eyebrow, .email-showcase-edition-label { display: none; }
#login-shell:has(#register-view:not([hidden])):has(.email-registration-mode) {
  --email-top-space: 100px;
  --email-bottom-space: 50px;
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  width: 100%; max-width: none; height: var(--dialog-viewport-height, 100dvh);
  min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: #f4f8f8; color: #102a44; font-family: Inter, "Segoe UI", sans-serif;
}
#login-shell:has(#register-view:not([hidden])):has(.email-registration-mode)::before {
  content: ""; position: fixed; inset: -6px; z-index: -1; pointer-events: none;
  background: url("./assets/registration/registration-background-D.jpg") center top / cover no-repeat;
  filter: blur(3px);
}
#email-showcase-topbar {
  display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center;
  gap: 20px; min-height: var(--email-top-space); padding: 28px 6.15%;
}
#email-showcase-topbar button {
  width: auto; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; color: #007c80; font: inherit;
}
#email-showcase-topbar .email-showcase-brand {
  color: #008b93; font-size: clamp(30px, min(2.8vw, 5.2vh), 49px);
  line-height: 1.05; letter-spacing: -.055em; font-weight: 350; white-space: nowrap;
}
#email-showcase-topbar .email-showcase-brand strong { color: #082a34; font-weight: 720; }
#email-showcase-topbar .email-showcase-brand > span {
  text-decoration: underline #d6af56 2px; text-underline-offset: .09em; text-decoration-skip-ink: auto;
}
#login-shell:has(#register-view:not([hidden])):has(.email-registration-mode) .auth-panel {
  display: flex; flex: 1 1 auto; flex-direction: column; align-items: center;
  justify-content: flex-start; min-height: 0; height: auto;
  padding: 10px 24px 20px; gap: 0; background: transparent;
}
#login-shell #auth-card.email-registration-mode {
  --ui-color-text: #102a44;
  --ui-color-text-heading: #10253e;
  --ui-color-text-label: #102a44;
  --ui-color-text-muted: #597176;
  --ui-color-border: #b5cfce;
  --ui-color-gold-light: #007078;
  --ui-color-surface: #fff;
  --ui-color-accent: #009b99;
  --ui-color-accent-strong: #00646d;
  width: min(100%, 660px); min-width: 0; min-height: 0; height: auto;
  max-height: calc(var(--dialog-viewport-height, 100dvh) - var(--email-top-space) - var(--email-bottom-space));
  flex: 0 1 auto; margin: 0; padding: 35px 47px 30px;
  background: linear-gradient(150deg, #fffffffa, #fffffff2); color: #102a44;
  border: 1px solid #e4dfcf; border-radius: 22px; box-shadow: 0 18px 38px #28515c0d;
  font-family: Inter, "Segoe UI", sans-serif;
}
#login-shell #auth-card.email-registration-mode::before,
#login-shell #auth-card.email-registration-mode::after { display: none; }
#auth-card.email-registration-mode #register-view .registration-topbar {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px;
}
#auth-card.email-registration-mode .registration-brand-label { display: none; }
#auth-card.email-registration-mode .email-showcase-eyebrow {
  display: block; margin: 0; color: #a47d31; font-size: 12px;
  line-height: 1.65; font-weight: 650; letter-spacing: 2.4px;
}
#auth-card.email-registration-mode #register-view .registration-heading { display: block; margin: 0 0 22px; }
#auth-card.email-registration-mode #registration-account-heading {
  margin: 0; color: #10253e; font-size: 39px; font-weight: 570;
  line-height: 1.2; letter-spacing: -.8px; text-shadow: none; overflow-wrap: anywhere;
}
#auth-card.email-registration-mode #register-view #register-form { display: block; margin: 0; padding: 0; }
#auth-card.email-registration-mode #register-view .registration-progress {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 0 23px; gap: 12px; color: #597176; font-size: 12px; font-weight: 400;
}
#auth-card.email-registration-mode .registration-progress-dots i { background: #d6e4e4; }
#auth-card.email-registration-mode .registration-progress-dots i.active { background: #009b99; }
#auth-card.email-registration-mode #registration-selected-license {
  display: inline-flex; flex-wrap: wrap; justify-self: start; justify-content: flex-start;
  width: auto; min-height: 0; padding: 9px 13px; gap: 4px;
  margin: 0; border: 0; border-radius: 8px; background: #edf6f4; color: #45656b;
  font-size: 13px; font-weight: 400; line-height: 1.65;
}
#auth-card.email-registration-mode .email-showcase-edition-label { display: inline; }
#auth-card.email-registration-mode #registration-selected-license strong {
  color: inherit; font-weight: 700; white-space: normal; overflow: visible; overflow-wrap: anywhere;
}
#auth-card.email-registration-mode #register-view .registration-step { display: block; }
#auth-card.email-registration-mode #register-view .field { margin: 0; }
#auth-card.email-registration-mode #register-login-label {
  position: static; display: block; width: auto; height: auto; clip: auto; clip-path: none;
  overflow: visible; white-space: normal; margin: 0 0 8px; padding: 0;
  color: #102a44; font-size: 16px; font-weight: 600; line-height: 1.4;
}
#auth-card.email-registration-mode #register-login-name {
  width: 100%; min-width: 0; height: auto; min-height: 57px; margin: 0; padding: 14px;
  border: 1px solid #b5cfce; border-radius: 10px; background: #fff;
  color: #102a44; font-size: 17px; line-height: 1.4; box-shadow: none;
}
#auth-card.email-registration-mode #register-login-name:focus {
  outline: none; border-color: #009e9c; box-shadow: 0 0 0 3px #00a4a41c;
}
#auth-card.email-registration-mode #register-view .field small {
  display: block; color: #5c7378; margin: 12px 0 0; font-size: 12px; line-height: 1.6;
  overflow-wrap: anywhere;
}
#auth-card.email-registration-mode #register-view .registration-trial-note {
  margin: 19px 0 0; color: #597176; font-size: 14px; line-height: 1.5;
}
#auth-card.email-registration-mode #register-message,
#auth-card.email-registration-mode #register-view #registration-login-availability.unavailable { color: #9a452e; }
#auth-card.email-registration-mode #register-message.success,
#auth-card.email-registration-mode #register-view #registration-login-availability.available { color: #007078; }
#auth-card.email-registration-mode #register-message:empty,
#auth-card.email-registration-mode #register-view #registration-login-availability:empty { display: none; }
#auth-card.email-registration-mode #register-view .registration-actions {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 12px;
  margin: 22px 0 0; padding: 0; border: 0;
}
#auth-card.email-registration-mode #registration-next {
  width: 100%; min-height: 59px; margin: 0; padding: 15px 18px;
  font-size: 17px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere;
}
#auth-card.email-registration-mode #registration-next:disabled {
  background: #e1e8e8; color: #617477; opacity: 1; cursor: default;
}
#auth-card.email-registration-mode #registration-previous {
  width: auto; min-height: 48px; padding: 12px; margin: 0;
  border: 1px solid #b5cfce; border-radius: 11px; background: #edf6f4;
  color: #007078; box-shadow: none; font-size: 14px; font-weight: 400;
}
#auth-card.email-registration-mode #register-view #show-login {
  justify-self: start; text-align: left; margin: 0; padding: 0; width: auto; min-height: 0;
  border: 0; background: transparent; box-shadow: none; color: #007c80;
  font-size: 13px; font-weight: 400; line-height: 1.5;
}
#login-shell:has(#register-view:not([hidden])):has(.email-registration-mode) .legal-links { flex: 0 0 auto; margin: 10px 0 0; }
#login-shell:has(#register-view:not([hidden])):has(.email-registration-mode) .legal-links button { color: #007c80; font-size: 12px; }
#email-showcase-topbar button:focus-visible,
#auth-card.email-registration-mode button:focus-visible { outline: 2px solid #008f94; outline-offset: 3px; }
@media (min-width: 1001px) and (max-height: 950px) {
  #login-shell:has(#register-view:not([hidden])):has(.email-registration-mode) { --email-top-space: 82px; }
  #email-showcase-topbar { padding-block: 20px; }
}
@media (max-width: 1000px) {
  #login-shell:has(#register-view:not([hidden])):has(.email-registration-mode) { --email-top-space: 91px; }
  #email-showcase-topbar { padding-inline: 5%; }
  #email-showcase-topbar .email-showcase-brand { font-size: 33px; }
  #login-shell #auth-card.email-registration-mode { width: min(100%, 620px); padding: 32px 44px 27px; }
  #auth-card.email-registration-mode #registration-account-heading { font-size: 36px; }
  #auth-card.email-registration-mode #register-login-name { min-height: 52px; }
  #auth-card.email-registration-mode #registration-next { min-height: 54px; font-size: 16px; }
}
@media (max-width: 600px) {
  #login-shell:has(#register-view:not([hidden])):has(.email-registration-mode) { --email-top-space: 78px; }
  #email-showcase-topbar { padding: 22px 20px; }
  #email-showcase-topbar .email-showcase-brand { font-size: 32px; }
  #login-shell:has(#register-view:not([hidden])):has(.email-registration-mode) .auth-panel { padding: 14px 16px 20px; }
  #login-shell #auth-card.email-registration-mode { padding: 28px 23px 25px; }
  #auth-card.email-registration-mode #registration-account-heading { font-size: 29px; }
  #auth-card.email-registration-mode #register-login-label { font-size: 14px; }
  #auth-card.email-registration-mode #registration-next { font-size: 14px; }
}
/* Compact first; the existing measured dialog paginator handles real overflow,
   including zoom, translations, validation and the on-screen keyboard. */
@media (max-height: 780px) {
  #login-shell:has(#register-view:not([hidden])):has(.email-registration-mode) { --email-top-space: 58px; --email-bottom-space: 38px; }
  #email-showcase-topbar { padding-block: 10px; }
  #login-shell:has(#register-view:not([hidden])):has(.email-registration-mode) .auth-panel { padding-block: 4px 8px; }
  #login-shell #auth-card.email-registration-mode { padding-block: 20px; }
  #auth-card.email-registration-mode #registration-account-heading { font-size: clamp(26px, 4vw, 34px); }
  #auth-card.email-registration-mode #register-view :is(.registration-heading, .registration-progress) { margin-bottom: 14px; }
  #auth-card.email-registration-mode #register-login-name { min-height: 46px; padding-block: 10px; }
  #auth-card.email-registration-mode #registration-next { min-height: 48px; padding-block: 12px; }
  #auth-card.email-registration-mode #register-view .registration-actions { margin-top: 15px; gap: 12px; }
}
#login-shell #auth-card.email-registration-mode.dialog-compact { padding: 12px 20px; }
#auth-card.email-registration-mode.dialog-compact #registration-account-heading { font-size: 26px; }
#auth-card.email-registration-mode.dialog-compact #register-view :is(.registration-heading, .registration-progress) { margin-bottom: 8px; }
#auth-card.email-registration-mode.dialog-compact #register-view .field small { margin-top: 6px; }
#auth-card.email-registration-mode.dialog-compact #register-view .registration-trial-note { margin-top: 10px; font-size: 13px; }
#auth-card.email-registration-mode.dialog-compact #register-view .registration-actions { margin-top: 12px; gap: 8px; }
#auth-card.email-registration-mode .dialog-page-navigation { color: #45656b; border-color: #d6e4e4; }
#auth-card.email-registration-mode .dialog-page-navigation button { background: #edf6f4; color: #007078; border: 1px solid #b5cfce; box-shadow: none; }
