/* Match DSM/Py's account control sizing and menu treatment. */
#thinkpress-account {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  z-index: 1100;
  font-family: inherit;
}
#thinkpress-account summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--pst-color-primary, #176de8);
  color: white;
  cursor: pointer;
  list-style: none;
  line-height: 1;
}
#thinkpress-account summary::-webkit-details-marker { display: none; }
#thinkpress-account summary svg { display: none; }
#thinkpress-account summary::before {
  content: "";
  position: absolute;
  top: .42rem;
  width: .48rem;
  height: .48rem;
  border-radius: 999px;
  background: white;
}
#thinkpress-account summary::after {
  content: "";
  position: absolute;
  bottom: .36rem;
  width: .92rem;
  height: .46rem;
  border-radius: 999px 999px .45rem .45rem;
  background: white;
}
#thinkpress-account nav {
  position: absolute;
  top: 0;
  right: calc(1.75rem + .45rem);
  width: max-content;
  max-width: calc(100vw - 80px);
  border: .5px solid var(--pst-color-primary, #176de8);
  border-radius: 6px;
  overflow: hidden;
  background: var(--pst-color-background, white);
}
#thinkpress-account a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 1.8rem;
  padding: .25rem .45rem;
  color: var(--pst-color-primary, #176de8) !important;
  font-size: var(--pst-sidebar-font-size, .85rem);
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none !important;
}
#thinkpress-account a + a {
  border-top: .5px solid var(--pst-color-primary, #176de8);
}
#thinkpress-account a:hover {
  background: var(--pst-color-primary, #176de8);
  color: white !important;
  text-decoration: none;
}
#thinkpress-account a:focus-visible,
#thinkpress-account summary:focus-visible {
  outline: 2px solid var(--pst-color-primary, #176de8);
  outline-offset: 3px;
}
@media print { #thinkpress-account { display: none; } }

#thinkpress-auth-modal {
  width: min(24rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid #cfd5df;
  border-radius: 8px;
  background: white;
  color: #252a34;
  box-shadow: 0 12px 36px rgb(0 0 0 / 20%);
}
#thinkpress-auth-modal::backdrop { background: rgb(20 28 45 / 45%); }
#thinkpress-auth-modal header { display: flex; align-items: center; justify-content: space-between; padding: .65rem 1rem; border-bottom: 1px solid #cfd5df; }
#thinkpress-auth-modal h2 { font-size: 1rem; font-weight: 500; margin: 0; }
#thinkpress-auth-modal button { font: inherit; font-size: 1.3rem; border: 1px solid #cfd5df; border-radius: 6px; background: #f6f7fa; color: #252a34; cursor: pointer; width: 2rem; height: 2rem; }
#thinkpress-auth-modal iframe { display: block; width: 100%; height: min(30rem, calc(100dvh - 6rem)); border: 0; background: white; }

#thinkpress-account summary.has-initials {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 0;
}
#thinkpress-account summary.has-initials::before,
#thinkpress-account summary.has-initials::after { display: none; }
