/* SecretID email/password entry. Keep the everyday login self-contained. */
.account-dialog:has(.secret-email-auth):not(.secret-center) {
  width: min(94vw, 500px);
  box-sizing: border-box;
  padding: clamp(18px, 3.5vh, 28px);
  max-height: none;
  overflow: visible;
}
.account-dialog:has(.secret-email-auth):not(.secret-center) .account-brand img { width: 31px; height: 31px; }
.account-dialog:has(.secret-email-auth):not(.secret-center) #signedOutView > h2 {
  font-size: clamp(24px, 5vw, 30px);
  line-height: 1.12;
  margin: 14px 0 6px;
}
.account-dialog:has(.secret-email-auth):not(.secret-center) #signedOutView > p:first-of-type {
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 8px;
}
.account-dialog:has(.secret-email-auth):not(.secret-center) #signedOutView > small { display: none; }
.account-dialog:has(.secret-email-auth):not(.secret-center) .legal-auth-note {
  font-size: 11px;
  line-height: 1.4;
  margin: 9px 0 0;
}
.account-dialog:has(.secret-email-auth):not(.secret-center) .auth-status {
  min-height: 0;
  margin: 6px 0;
}
.secret-email-auth { margin-top: 12px; }
.secret-email-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); }
.secret-email-tabs button { flex: 1; border: 0; border-radius: 12px; background: transparent; color: #aab3c6; padding: 9px 6px; font: inherit; font-size: 12px; cursor: pointer; }
.secret-email-tabs button.active { background: rgba(255,255,255,.13); color: white; box-shadow: 0 1px 8px rgba(0,0,0,.2); }
.secret-email-form { display: grid; gap: 6px; margin-top: 10px; }
.secret-email-form[hidden] { display: none !important; }
.secret-email-form label { font-size: 12px; color: #c9d2df; margin-top: 0; }
.secret-email-form input {
  width: 100%; min-height: 40px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.055);
  padding: 8px 12px; color: #fff; font: inherit; font-size: 14px;
  box-sizing: border-box; transition: border-color .2s, background .2s;
}
.secret-email-form input:focus { outline: 2px solid rgba(133,182,255,.5); outline-offset: 1px; border-color: #8db9fa; }
.secret-email-form input::placeholder { color: #7c879a; }
.secret-email-primary {
  margin-top: 5px; min-height: 42px; border-radius: 13px; border: 1px solid rgba(255,255,255,.35);
  color: #08172b; background: linear-gradient(115deg,#edf4ff,#8dc3ff);
  font: inherit; font-size: 14px; font-weight: 750; cursor: pointer;
}
.secret-email-primary:hover { filter: brightness(1.06); }
.secret-email-text { background: none; border: none; color: #a2c9ff; font: inherit; font-size: 12px; margin: 0 auto; cursor: pointer; padding: 5px; }
.secret-email-form button:disabled { cursor: wait; opacity: .6; }
.secret-email-auth #secretEmailCaptcha { margin: 6px 0 0; min-height: 65px; }
.secret-email-auth #secretEmailMessage { color: #afd1ff; font-size: 12px; min-height: 18px; margin: 7px 0 0; text-align: center; }
.secret-email-auth #secretEmailMessage.error { color: #ffabb0; }
.secret-email-divider { display: flex; align-items: center; justify-content: center; gap: 12px; color: #7e8fa6; font-size: 12px; margin: 9px 0 0; }
.secret-email-divider::before, .secret-email-divider::after { content: ''; height: 1px; background: rgba(255,255,255,.12); flex: 1; }
.secret-email-auth + .google-button-wrap { margin-top: 10px; min-height: 40px; }

/* Compact two-column layout when a phone is rotated to landscape. */
@media (max-height: 620px) and (min-width: 700px) {
  .account-dialog:has(.secret-email-auth):not(.secret-center) {
    width: min(94vw, 760px);
    padding: 16px 22px;
  }
  .account-dialog:has(.secret-email-auth):not(.secret-center) .account-brand img { width: 26px; height: 26px; }
  .account-dialog:has(.secret-email-auth):not(.secret-center) #signedOutView {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 255px);
    column-gap: 20px;
    align-items: start;
  }
  .account-dialog:has(.secret-email-auth):not(.secret-center) #signedOutView > h2 { grid-column: 1 / -1; margin: 7px 0 4px; font-size: 24px; }
  .account-dialog:has(.secret-email-auth):not(.secret-center) #signedOutView > p:first-of-type { grid-column: 1 / -1; margin-bottom: 5px; }
  .account-dialog:has(.secret-email-auth):not(.secret-center) .secret-email-auth { grid-column: 1; grid-row: 3 / span 4; margin-top: 2px; }
  .account-dialog:has(.secret-email-auth):not(.secret-center) .google-button-wrap { grid-column: 2; grid-row: 3; margin-top: 10px; }
  .account-dialog:has(.secret-email-auth):not(.secret-center) .auth-status { grid-column: 2; grid-row: 4; }
  .account-dialog:has(.secret-email-auth):not(.secret-center) .legal-auth-note { grid-column: 2; grid-row: 5; }
  .account-dialog:has(.secret-email-auth):not(.secret-center) .secret-email-divider { display: none; }
  .account-dialog:has(#secretEmailRegister:not([hidden])):not(.secret-center) .secret-email-auth {
    grid-column: 1 / -1;
  }
  .account-dialog:has(#secretEmailRegister:not([hidden])):not(.secret-center) .google-button-wrap,
  .account-dialog:has(#secretEmailRegister:not([hidden])):not(.secret-center) .auth-status,
  .account-dialog:has(#secretEmailRegister:not([hidden])):not(.secret-center) .legal-auth-note { display: none; }
  .account-dialog:has(#secretEmailRegister:not([hidden])):not(.secret-center) #secretEmailRegister {
    grid-template-columns: repeat(2, minmax(0,1fr));
    column-gap: 16px;
  }
  #secretEmailRegister label[for="secretRegisterName"] { grid-column: 1; grid-row: 1; }
  #secretRegisterName { grid-column: 1; grid-row: 2; }
  #secretEmailRegister label[for="secretRegisterEmail"] { grid-column: 2; grid-row: 1; }
  #secretRegisterEmail { grid-column: 2; grid-row: 2; }
  #secretEmailRegister label[for="secretRegisterPassword"] { grid-column: 1; grid-row: 3; }
  #secretRegisterPassword { grid-column: 1; grid-row: 4; }
  #secretEmailCaptcha { grid-column: 2; grid-row: 3 / span 2; }
  #secretEmailRegister .secret-email-primary { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .secret-email-tabs button { font-size: 11px; }
  .secret-email-form input { font-size: 16px; }
}
/* Extremely short viewports and open virtual keyboards must still allow access to all controls. */
@media (max-height: 560px) and (max-width: 699px) {
  .account-dialog:has(.secret-email-auth):not(.secret-center) {
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .account-dialog:has(.secret-email-auth):not(.secret-center)::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .secret-email-form input { transition: none; }
}
