/* Avatar picker overlay — square thumbnails, not circles */
#gl92-avatar-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#gl92-avatar-overlay[hidden] {
  display: none !important;
}

.gl92-avatar-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.gl92-avatar-panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  max-height: min(92vh, 520px);
  overflow-y: auto;
  background: linear-gradient(180deg, #2a2a2e 0%, #1a1a1e 100%);
  border-radius: 14px;
  padding: 18px 16px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.gl92-avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.gl92-avatar-option {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: #111;
  transition: border-color 0.15s, transform 0.12s;
}

.gl92-avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.gl92-avatar-option:hover {
  transform: scale(1.02);
}

.gl92-avatar-option.is-selected {
  border-color: #e53935;
  box-shadow: 0 0 0 1px rgba(229, 57, 53, 0.35);
}

.gl92-avatar-caption {
  margin: 14px 0 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #f0f0f0;
}

.gl92-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gl92-avatar-save {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #e53935, #c62828);
}

.gl92-avatar-save:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.gl92-avatar-close {
  position: absolute;
  right: -6px;
  top: -6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #444;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.gl92-avatar-err {
  margin-top: 8px;
  font-size: 13px;
  color: #ff8a80;
  text-align: center;
  min-height: 1.2em;
}
