/* Sidebar foot: theme switch row, "Feedback & follow", account row.
   A separate file because app.css is at its size cap. Spacing 4/8/12/16, type 13px/600,
   targets >= 32px (DESIGN.md). Selectors are compound so they beat the !important rules
   app.css keeps on .help-icon and .user-info-card. */

.sb-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; padding-bottom: 16px; }

.sbf-btn {
  appearance: none; position: relative;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 36px; padding: 0 12px;
  background: transparent; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; text-align: center;
  cursor: pointer;
  transition: border-color .18s, background-color .18s, transform .18s;
}
.sbf-btn:hover { border-color: var(--gold); background: var(--gold-bg); }
.sbf-btn:active { transform: translateY(1px); }
.sbf-label { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Row 1: theme switch + Feedback. One flex row with no gap: Feedback carries its own 10px
   margin, so when the open switch takes the row nothing is left behind. The switch itself is
   drawn by theme.js (.pk-ts-*); this file only moves the space between the two. */
.sbf-row { display: flex; height: 40px; }
.sbf-row > .pk-ts-slot {
  width: auto; height: 40px; flex: 0 0 40px;
  transition: flex .7s cubic-bezier(.22, 1, .36, 1);
}
.sbf-row > .sbf-fb {
  flex: 1 1 0; min-width: 0; height: 40px; margin-left: 10px;
  overflow: hidden; white-space: nowrap; opacity: 1; visibility: visible;
  border-color: var(--ts-border, var(--border)); border-radius: 10px;
  transition: flex .7s cubic-bezier(.22, 1, .36, 1), margin-left .7s cubic-bezier(.22, 1, .36, 1),
    padding .7s cubic-bezier(.22, 1, .36, 1), border-width .7s, opacity .2s, visibility 0s,
    border-color .18s, background-color .18s;
}
.sbf-row > .sbf-fb:hover { border-color: var(--gold); }
.sbf-row[data-ts-open] > .pk-ts-slot { flex: 1 1 40px; }
.sbf-row[data-ts-open] > .sbf-fb {
  flex: 0 0 0; margin-left: 0; padding: 0; border-width: 0; opacity: 0; visibility: hidden;
  transition: flex .7s cubic-bezier(.22, 1, .36, 1), margin-left .7s cubic-bezier(.22, 1, .36, 1),
    padding .7s cubic-bezier(.22, 1, .36, 1), border-width .7s, opacity .2s, visibility 0s .7s;
}

/* Feedback & follow */
.sbf-ico { flex: none; width: 18px; height: 18px; color: var(--gold); transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.sbf-fb:hover .sbf-ico { transform: rotate(-8deg) scale(1.08); }
.sbf-chev { position: absolute; right: 12px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--gold); opacity: 0; transform: translateX(-4px); transition: opacity .18s, transform .25s cubic-bezier(.16, 1, .3, 1); }
.sbf-fb:hover .sbf-chev, .sbf-fb:focus-visible .sbf-chev { opacity: 1; transform: none; }

/* Account row */
.sbf-acct.user-info-card {
  display: flex !important; align-items: center; gap: 4px;
  margin: 0; min-height: 40px; padding: 4px 4px 4px 40px; /* 40px left mirrors the 32px sign-out button + gap, so the email sits at the row's centre */
  background: var(--gold-bg); border: 1px solid var(--gold); border-radius: 10px;
}
.sbf-acct .user-pref-btn {
  gap: 8px; justify-content: center; min-height: 32px; padding: 0 4px 0 0; border-radius: 6px;
  transition: background-color .18s;
}
.sbf-acct .user-pref-btn:hover { background: rgba(var(--gold-rgb), .12); }
.sbf-avatar {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--bg); font-size: 12px; font-weight: 600; line-height: 1;
}
.sbf-avatar:empty { display: none; }
.sbf-acct #user-email-line { flex: 0 1 auto; font-size: 12px; font-weight: 400; }
.sbf-acct .user-pref-gear { display: none; }
.sbf-out {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--gold); cursor: pointer;
  transition: background-color .18s, color .18s;
}
.sbf-out:hover { background: rgba(var(--gold-rgb), .2); color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .sbf-btn, .sbf-ico, .sbf-chev, .sbf-out, .sbf-acct .user-pref-btn,
  .sbf-row > .pk-ts-slot, .sbf-row > .sbf-fb, .sbf-row[data-ts-open] > .sbf-fb { transition: none; }
}
