/* The signed in account at the foot of the rail: theme picker, name and
   address, and Logg ut, each on its own row so a button never covers the
   text. The rules for Logg ut come from ligo-shell.css in
   ligo/manedsrapportering, where the rail has the same block. */

.side-footer {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.account-copy {
  padding-inline: 8px;
}

.account-copy :is(strong, small) {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
}

.side-footer-actions {
  display: flex;
  min-width: 0;
  gap: 6px;
}

.side-footer-logout {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.side-footer-button {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: transparent;
  font: 400 var(--fs-ui-label)/1.2 var(--font-mono);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.side-footer-button:is(:hover, :focus-visible) {
  border-color: var(--primary);
  color: var(--ink);
  background: var(--primary-soft);
}

.side-footer-button svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-footer-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px), (pointer: coarse) {
  .side-footer-button {
    min-height: 44px;
  }
}

/* The folded rail keeps Logg ut as an icon. The label stays for screen
   readers and the tooltip names the action. */
@media (min-width: 961px) {
  html[data-sidebar="collapsed"] .side-footer-button {
    position: relative;
    justify-content: center;
    padding-inline: 0;
  }

  html[data-sidebar="collapsed"] .side-footer-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  html[data-sidebar="collapsed"] .side-footer-actions {
    justify-self: stretch;
  }
}
