/* ============================================================
   ACCOUNT BAR (shown when signed in, sits above site nav)
   ============================================================ */

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 200;
}

.account-bar {
  background: #0d1117;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: relative;
}
.account-bar .container {
  padding-top: 0;
  padding-bottom: 0;
}
.account-bar__inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 34px;
  position: relative;
}
.account-bar__context-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 1rem;
  margin-right: 0.5rem;
  border-right: 1px solid rgba(255,255,255,0.2);
}
.account-bar__action {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}
.account-bar__action:hover { color: var(--white); }
.account-bar__user-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.65);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0 0.5rem;
  height: 100%;
  transition: color 0.15s;
  border-radius: 0;
}
.account-bar__user-btn:hover,
.account-bar__user-btn--open {
  color: var(--white);
}
.account-bar__chevron {
  transition: transform 0.2s;
}
.account-bar__user-btn--open .account-bar__chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.account-bar__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 300;
  overflow: hidden;
}
.account-bar__user-info {
  padding: 0.75rem 1rem;
  background: #f9fafb;
}
.account-bar__user-name {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy-dark);
}
.account-bar__user-email {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.account-bar__divider {
  height: 1px;
  background: var(--border);
}
/* Links and form-row items share the same row styling */
.account-bar__menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
}
.account-bar__menu-item:hover {
  background: #f3f4f6;
  color: var(--navy-dark);
}
/* button_to wraps a <form>; the form gets form_class, button inside is transparent */
.account-bar__menu-item--signout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: #b91c1c;
  cursor: pointer;
  transition: background 0.12s;
}
.account-bar__menu-item--signout:hover {
  background: #fee2e2;
}
/* The actual <button> inside the form-row — make it invisible so the form styles show */
.account-bar__menu-item--signout button[type="submit"] {
  all: unset;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  cursor: pointer;
  color: inherit;
  font-size: inherit;
}
