/* account-menu.css — a circular person-icon avatar pinned to the bottom-left
   corner, its popup menu, and the Settings modal. Shares the visual language of
   feedback-widget.css (dark control, yellow primary, Libre Franklin). */

.am-avatar {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9998;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2D2A32;
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(45, 42, 50, 0.25);
  transition: background 0.15s, box-shadow 0.15s;
}
.am-avatar:hover { background: #46414f; }
.am-avatar:focus-visible { outline: 2px solid #DDD92A; outline-offset: 2px; }

/* --- Popup menu (anchored just above the avatar) ------------------------- */
.am-popup {
  position: fixed;
  left: 20px;
  bottom: 74px;
  z-index: 9999;
  width: 260px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border: 1px solid #dddbd8;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(45, 42, 50, 0.22);
  padding: 0.5rem;
  font-family: 'Libre Franklin', sans-serif;
  color: #2D2A32;
}
.am-popup[hidden] { display: none; }

.am-popup-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.5rem 0.6rem;
}
.am-popup-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2D2A32;
  color: #fff;
  border-radius: 999px;
}
.am-popup-id { min-width: 0; }
.am-popup-email {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2D2A32;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.am-popup-sub {
  font-size: 0.75rem;
  color: #8e8c96;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.am-popup-divider { height: 1px; background: #f0efed; margin: 0.25rem 0; }

.am-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: none;
  border: none;
  border-radius: 6px;
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2D2A32;
  padding: 0.55rem 0.5rem;
  cursor: pointer;
  text-align: left;
}
.am-menu-item:hover { background: #f0efed; }
.am-menu-item svg { flex-shrink: 0; color: #5a5860; }

/* --- Settings modal ----------------------------------------------------- */
.am-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(45, 42, 50, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.am-overlay[hidden] { display: none; }

.am-modal {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(45, 42, 50, 0.2);
  width: 100%;
  max-width: 460px;
  padding: 1.5rem;
  font-family: 'Libre Franklin', sans-serif;
  color: #2D2A32;
}
.am-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.am-modal-head h2 { font-size: 1.125rem; font-weight: 600; margin: 0; }
.am-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #8e8c96;
  cursor: pointer;
  padding: 0 0.25rem;
}
.am-close:hover { color: #2D2A32; }

.am-section { margin-bottom: 1.25rem; }
.am-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8e8c96;
  margin-bottom: 0.5rem;
}
.am-field-label { display: block; font-size: 0.8rem; color: #5a5860; margin-bottom: 0.25rem; }
.am-readonly {
  font-size: 0.9375rem;
  color: #2D2A32;
  background: #f0efed;
  border: 1px solid #dddbd8;
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  word-break: break-all;
}

.am-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 6px;
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  cursor: pointer;
}
.am-btn-secondary { background: #f0efed; color: #2D2A32; }
.am-btn-secondary:hover { background: #e4e2df; }
.am-btn-secondary:disabled { color: #8e8c96; cursor: not-allowed; }
.am-btn-danger { background: #fef2f4; color: #a13544; border: 1px solid #f3c9d0; }
.am-btn-danger:hover { background: #fde4e8; }
.am-btn-danger svg { color: currentColor; }

.am-message { font-size: 0.85rem; margin: 0.5rem 0 0; min-height: 1.1em; }
.am-message.success { color: #4a4800; }
.am-message.error { color: #E71D36; }
.am-hint { font-size: 0.8rem; color: #8e8c96; margin: 0.4rem 0 0; }

.am-note {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #5a5860;
  background: #fbfae8;
  border: 1px solid #EAE151;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 1.25rem;
}
.am-note strong { color: #2D2A32; }

.am-modal-foot { display: flex; justify-content: flex-end; }
