.account-login-logo { display:none; }
.account-dialog:has(> .portal-auth-grid:not(.hidden)) {
  width:min(420px,calc(100vw - 32px));
  height:fit-content;
  max-height:calc(100dvh - 32px);
  background:#fff;
}
.account-dialog:has(> .portal-auth-grid:not(.hidden)) .account-dialog-heading {
  position:relative;
  display:block;
  margin:0;
  padding:30px 30px 18px;
  border:0;
  text-align:center;
}
.account-dialog:has(> .portal-auth-grid:not(.hidden)) .account-login-logo {
  display:block;
  width:min(225px,80%);
  height:auto;
  margin:0 auto 21px;
}
.account-dialog:has(> .portal-auth-grid:not(.hidden)) .account-dialog-heading h2 {
  margin:0;
  color:var(--ink);
  font-size:30px;
}
.account-dialog:has(> .portal-auth-grid:not(.hidden)) .account-dialog-heading .eyebrow,
.account-dialog:has(> .portal-auth-grid:not(.hidden)) .account-session-pill {
  display:none;
}
.account-dialog:has(> .portal-auth-grid:not(.hidden)) .dialog-close {
  position:absolute;
  top:12px;
  right:12px;
  width:36px;
  height:36px;
}
.account-dialog > .portal-auth-grid {
  display:flex;
  flex-direction:column;
  gap:18px;
  width:calc(100% - 60px);
  margin:0 auto;
  padding-bottom:30px;
}
.portal-auth-grid > .portal-guest-card {
  order:0;
  border:0;
  background:none;
}
.portal-guest-card > .primary-button {
  min-height:44px;
  margin:0;
  padding:10px 12px;
  background:var(--green);
  font-size:16px;
}
.portal-login-divider { display:flex; align-items:center; gap:16px; color:var(--muted); }
.portal-login-divider::before,.portal-login-divider::after {
  content:"";
  flex:1;
  height:1px;
  background:var(--line);
}
.portal-auth-grid > #customerLoginForm {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  min-width:0;
  gap:12px;
  padding:0;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.portal-auth-grid.requesting-access > #customerLoginForm { display:none; }
#customerLoginForm label { min-width:0; margin:0; gap:5px; font-size:14px; }
#customerLoginForm input { width:100%; min-width:0; min-height:44px; margin:0; padding:10px 12px; font-size:16px; }
#customerLoginForm > .primary-button { min-height:44px; margin:0; padding:10px 12px; font-size:16px; }
#customerLoginForm > .portal-text-button { justify-self:end; margin:0; }
.portal-password-input { position:relative; display:block; }
#customerLoginForm .portal-password-input input { width:100%; padding-right:52px; }
#togglePortalPassword {
  position:absolute;
  right:0;
  top:0;
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  padding:10px;
  border:0;
  border-radius:8px;
  color:var(--muted);
  background:transparent;
  cursor:pointer;
}
#togglePortalPassword svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:2; }
.portal-login-links {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding-top:16px;
  border-top:1px solid var(--line);
}
.portal-login-links > .portal-text-button {
  margin:0;
  font-size:12px;
  text-align:center;
  text-decoration-color:var(--green);
}
.portal-login-links > :last-child { padding-left:12px; border-left:1px solid var(--line); }
.portal-auth-grid .portal-account-request { min-width:0; padding:16px; }
.portal-account-request .portal-form-grid { grid-template-columns:minmax(0,1fr); }
.portal-account-request .portal-form-grid .wide { grid-column:auto; }
.portal-account-request label { min-width:0; overflow-wrap:anywhere; }
.portal-account-request input,
.portal-account-request select,
.portal-account-request textarea { width:100%; min-width:0; max-width:100%; font-size:16px; }
.account-dialog:has(> .portal-auth-grid.requesting-access:not(.hidden)) .account-dialog-heading {
  position:sticky;
  top:0;
}
@media (max-width:640px) {
  .account-dialog:has(> .portal-auth-grid:not(.hidden)) {
    width:calc(100vw - 24px);
    max-width:420px;
    max-height:calc(100dvh - 24px);
    border-radius:18px;
  }
  .account-dialog:has(> .portal-auth-grid:not(.hidden)) .account-dialog-heading {
    padding:24px 24px 18px;
  }
  .account-dialog > .portal-auth-grid { width:calc(100% - 48px); padding-bottom:24px; }
  .portal-login-links { gap:12px; }
  .portal-login-links > .portal-text-button { font-size:12px; }
  .portal-login-links > :last-child { padding-left:12px; }
}
